« first day (684 days earlier)      last day (3465 days later) » 
00:00 - 18:0018:00 - 23:00

12:06 AM
use a server
@user2442335 hey
 
Heyyyy
 
you've been asking that question for like a week now lol
 
Been struggling with trying to get a listbox to update, but I got my label I was working on to update.
Dude I just don't know, but I keep at it, I'm dillegent.
I put all my food groups into a IFood interface, made an ObservableCollection<IFood>
 
tell me what you have or something
 
Like do I have IFood, impliment Inotifypropertychanged?
When I already have a class that implements it? Isn't that redundant?
 
12:08 AM
you put all your food groups into an ifood interface?
show me code dude
 
Yes.
 
The code is faily short
I can post on here
namespace Cooksim
{
    public interface IFood
    {
        int Skill { get; set; }

        int Cost { get; set; }

        int Quality { get; set; }

        string Name { get; set; }

        Bonus Bonus { get; set; }

    }
}
 
go ahead
 
namespace Cooksim
{
    public class Vegetable : IFood
    {
        int skill;
        Bonus bonus;
        string fullName;
        int quality;
        string name;
        int cost;

        public int Skill { get; set; }
        public Bonus Bonus { get; set; }
        public string FullName { get; set; }
        public int Quality { get; set; }
        public string Name { get; set; }
        public int Cost { get; set; }




        public Vegetable(string name, int value, int cost)
        {
In then in the game class I have this.
public ObservableCollection<IFood> foodInventory = new ObservableCollection<IFood>();
Which is to keep track of all the food you own.
 
12:10 AM
make that a public property
public ObservableCollection<IFood> FoodInventory
{
    get; private set;
}
then in the constructor of game, do FoodInventory = new ObservableCollection<IFood>();
 
Ok, but why?
 
because you're using a public field, not a public property
then you'll have <ListBox ItemsSource="{Binding FoodInventory}" /> or something similar
 
Do I still need to have IFood inherit Inotifypropertychanged?
 
You need to have the right datacontext
are you calling FoodInventory.Add anywhere?
 
private void buyButton_Click(object sender, RoutedEventArgs e)
        {
            if(thisGame.currentVegetable.Cost > thisGame.Money)
            {
                MessageBox.Show("Not enough money!");
            }
            else
            {
                thisGame.FoodInventory.Add(thisGame.currentVegetable);
                thisGame.Money -= thisGame.currentVegetable.Cost;
                vegShopList.Remove(thisGame.currentVegetable);
            }
        }
 
12:18 AM
where do you set the datacontext?
 
 public MainWindow()
        {

            InitializeComponent();
            DataContext = game.FoodInventory;
            if (!game.cookRoster.Any())
            {
                Cook x = new Cook();
                game.cookRoster.Add(x);
            }
            cookListBox.ItemsSource = game.cookRoster;
            cookListBox.DisplayMemberPath = "Name";
        }
 
what the
 
Yeah bro, I've only been at it a couple months.
I'm sure my code looks janky as fuk
 
you're biggest goal is to not use anything in .xaml.cs
 
I could move that ifcheck into the game constructor couldn't I?
 
12:23 AM
where are your view models?
 
That's the game class, the one that implements InotifyPropertychanged right?
or is that the ui
 
you should send me your entire project
 
k how would I send it to you
 
how many files do you have?
 
It's only 407kb
haha
 
12:25 AM
HOW MANY FILES DO YOU HAVE
put them up on gist.github.com
 
its simple dude
 
ohh
zip it
and put it on a file sharing site
dropbox? google drive? onedrive? filesnack.com
 
There you go.
Be patient with it, I know it's terrible.
Thanks dude.
 
12:31 AM
i can be patient with it... i can't be patient with questions and no code though :p
 
I'm sorry!
I'm learning, but I'm eager to learn.
and after I finish my pre-reqs I'll be taking coding classes.
Hey it compiles at least.
 
lol
 
Also you can buy onions and tomatoes
 
12:46 AM
you're basically trying to do too much at once right now
 
I figured.
 
whats the cooklistbox
 
Where the cooks go.
Displays their names
click on them displays the stats
 
1:09 AM
....
vs might have froze
 
Was it because of my code :(
 
no
its all good
 
1:29 AM
So any suggestions to me?
Especially on having food show up in my list box when purchased haha.
 
here is something half ass
basically its a mess and you need to read up on mvvm
 
So you re-wrote my stuff? I've been reading on MVVM but it's kind of goes over my head a bit.
 
yeah i did
 
Oh ok cool, I'll look at it here.
Then ask questions, etc.
Thanks so much for this.
How old are you btw? Just curious
 
24
 
1:45 AM
Oh ok cool, I'm 30 wish I started sooner.
I always thought I was too dumb to code :( I might be right though haha
 
never
i wish i started sooner and i thought i was too dumb also
but i've come a long way
you just need to ask questions and read/research yourself
 
Yeah reading is hard for me to do, I have some serious ADHD.
but I just try, try, try.
 
understandable
i did a lot of downloading code examples
 
Well another thing is it's weird but I learn better in game terms.
and I can't find much RPG source code
 
ahh. probably not heh... also read up on object oriented coding... you were using public fields instead of properties which is generally something you don't want to do
 
1:56 AM
Any recommended reading?
So you make a seperate view model for each item? Game, cook, vegetable, etc?
 
2:37 AM
@NETscape I'm going to bed, thanks again. It makes a little bit more sense with the cleaned up code. Any recommended reading/projects/anything let me know. I'm going to try and write my own FoodViewModel tomorrow, thanks so much again! If yer ever near TN let me buy you a beer sometime.
 
 
7 hours later…
9:38 AM
Morning Denver
 
10:09 AM
Morns all
 
Morning André
Does anyone know if there is a shortcut in VS to highlight the current file in the solution explorer?
 
Highlight ?
Like clicking in it ?
 
Yeah
I googled it.
 
._. About clicking it ?
 
So if you're using VS2013, you can click the little two-way sync arrow icon thingy at the top of solution explorer, and the shortcut for that is Ctrl+[, S but that doesn't work if you're using ReSharper unless you don't care for the R# shortcuts that start with Ctrl+[
I could click it, but when I hit F12 to navigate to something and it gives me a file and I want to see that file's history, you need to right click in Solution Explorer
 
10:23 AM
Weird ;p The only ReSharper thing I see is something about Image
 
And if that file happens to be nested in a couple of folders or down the list a way, it's inconvenient
"ReSharper_GotoContainingDeclaration conflicts with the following Visual Studio shorcuts:" and it lists 7
The Image one you said and then 6 for Solution Explorer shortcuts
 
10:36 AM
hey peeps
 
Hey, Sean, André, Maverik.
 
10:51 AM
o7
 
Morning.
 
_o7
||
fuk
Sadface.
 
wha-wha
 
why is vmware such a sad company that nobody in their forums has attempted to use wcf since 2009 O.o
anybody done any work with ws-trust ?
 
Not me :(
 
11:36 AM
hey hey hey!
wazzup wpf?
 
Nm
Just boredom and paying my bills
 
@Maverik PaaS m8 that's where all the cool devs are now, didn't you know?
 
good, then I have a beginners problem for you(all) so I have a list filled with ExpandoObjects the expando is a dictionary with key-value pairs, and now I want to know how I show them in a list, and I want the key to be my header, and the values in all list objects the values in the list
 
Like a dictionary become a list<class> and that class contains the parameters of Header and Value ?
 
kind of... but each listobject is a dictionary
so the problem comes from sql
 
11:47 AM
Wut
 
if I want the user to be able to create there own sql expression, how will I then fill the result in a list
I can't possibly foresee what the user are going to ask for..
 
Do you send the result set to a dictionary ?
 
They are going to ask for DROP * FROM *;
 
hehe yes
that's been taken care of
the dataformat comes from this adrianphinney.com/post/18900251364/…
 
If I can ruin your data, will you give me a cookie?
Reading. This still seems like a really bad idea to me.
 
11:52 AM
hehe, actually it's only the "super users" that have access to this part of the program, and they also have direct access to the database. never the less we have made a block for all drop, delete, alter etc
 
Aah, okay.
 
and this is a cooperate program which at least decreases the risk of evil hackers..
 
The guy on the other side of my row of cubes does nothing but walk into companies, plug in a shitty old laptop. The shitty old laptop spits out databases and user credentials.
I think we get paid to demonstrate this so that competitors/thieves don't do the same thing.
 
yes, I see you point!
 
I'll assume your password policy is great and your databases are properly locked down. :)
 
11:58 AM
hehe absolutely! actually, we have discussed this with the managers of the program (the database password thingy) and they have said that it is ok... I guess that they are seeing it as a money-to-security-not-problem
but back to the datagrid problem...
 
http://stackoverflow.com/a/14172511/1284102
Is that what you're looking for?
No, it's not. You're asking how to display an undetermined dataset. I don't have a good answer for you.
 
it doesn't need to be a datagrid (i think)
btw, I think you said that for db authentication you should have some kind of server to do that. but how. I mean, should the server then send that password to your app, that doesn't seem to secure, should have some kind of socket for each user through the server then?
I mean where do my connection string go?
 
12:18 PM
Is this a web app?
 
no
standard application
 
I don't know how you guys do it.
I'd encrypt a text file and decrypt it with a key it phones home for, if I wanted to be a tight ass about it.
 
but wouldn't it be possible to just disassemble your program, and catch the password as it comes back?
 
They can disassemble it but if they can get into the memory space of your program, that means the entire system is already compromised (unless you have a glaring bug of course) so in that sense, it's almost a non-issue
You should look into SecureString though, I'm not sure how secure it is but it's a start. I think the data is encrypted in-memory
So if they're running their own queries, why not go old-school and just return a recordset and let your DataGrid or w/e auto-generate the columns?
If you can get it into a DataTable you have enumerable properties for all the columns and their data types
 
ho key...
 
12:32 PM
Late to the party :D
 
anyway.. I have made a very short example of what I want here... https://github.com/tb2johhm/ShowListContentInList
but now I have to go for today.. see ya
 
12:46 PM
mornin' all
 
Morning =]
 
hey DPP
 
Hello all.
 
morning Denver
 
I have a DependencyProperty of Color[] type. How can I fire PropertyChanged event, when one or few colors change?
One of the ways is to create new Color[] which would be a copy of DP + few changed elements. And then assign this new Color[] to my Property.
But it does not sound right.
Gonna google meanwhile. :)
 
12:59 PM
why an array instead of ObservableCollection?
 
Yes, why?
 
(if you want to monitor changes)
 
Denver, why? Why do not you use OC, it is so obvious.
Well, I guess the reason is 5 pm.
Thanks, Mav. Helpful as always. <3
 
umm yw
 
Wooden Maverik.
Rubber Maverik.
Maverik the dog.
Are there any others I may have missed?
For clarification: the wooden programmer principle, or the rubber ducky, or the dog. Everyone knows about these phenomena, right?
 
1:16 PM
Hm, ObservableCollection.Add() does not fire PropertyChanged.
Should it?
I am expecting my OnObservableCollectionChanged method to be called whenever I add an element in the collection.
So far, Color arrays worked better. :D
@Sean No, not right.
 
So wiki calls it Rubber duck debugging
I heard it first from an old guy in my last job and he referred to it as being the wooden programmer. When you go to someone's desk and figure out the problem because you had to explain it to them
@Denver This sounds like you've subscribed to the CollectionChanged event, I would expect that to work but I've not used this myself
 
    public static DependencyProperty CursoredRowColorsProperty = DependencyProperty.Register(
                "CursoredRowColors", typeof(ObservableCollection<Color>), typeof(MyControl),
                new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnCursoredRowColorsChanged));

            public ObservableCollection<Color> CursoredRowColors
            {
                get { return (ObservableCollection<Color>)GetValue(CursoredRowColorsProperty); }
I expect OnCursoredRowColorsChanged method to get fired on every CursoredRowColors.Add() call.
But so far it gets fired only when I create a new instance of collection.
Ow, I have to explicitly subscribe CollectionChanged event.
I thought it is kinda build-in.
Awww.
Well, I can't use it in my case.
 
You can't?
 
So, back to Color[]!
Because I bind GradientStopCollection to this ObservableCollection from xaml.
 
Stahp.
 
1:31 PM
I already watched it.
 
Oh, right
 
It requires explicit subscribing from code.
And I want to bind from xaml. I need my UI to know when collection is getting changed.
 
Uhhhh
I dunno. I uhm.. Don't use dependency properties...
 
And the approach in the removed link suggests handling CollectionChanged in code. I guess I can't tell my UI to update itself from code.
 
>_<
 
1:34 PM
private static void SpecialDays_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
{
    // handle CollectionChanged
}
What would I write in this method to tell my UI to update?
Probably it is possible, but my brain is failing me. Home time.
 
Yeah I can't get that from some cursory glancing
 
denver
look at e
 
2:18 PM
so
writing IMessageBoxService... what do
 
kodez
↑↑↓↓←→←→BA
Try that one, I heard it unlocks "awesome developer mode"
What have you got so far, anything?
 
not sure where to start
I know i'm wanting to pass IMessageBoxService to my viewmodels
but not sure the implementation of that is supposed to be
and how i'll connect it with a custom message box window that I plan on styling
 
You have a complex application, too.. Hmmmmm strokes beard
Which I totally can't do anymore cos I shaved it all off... For shame.
 
haha how long was it... if you know what i'm saying
@Maverik this might peak your interest, stackoverflow.com/questions/25646246/…
 
My application is fairly simple so I just put mine in my App.xaml (also because I can't write a well-architected applicatino to save my life) and call it from there
pique *
Although it doesn't really matter where you put it
Just that if you're calling it cross-thread and it's not on the UI thread, you will need to call into Application.Dispatcher or w/e
Tangent.
Oh yes that's why I put it there, so I could have it as an actual modal window/dialog. I was struggling with setting its owner and I call it from "plugins"
How were you thinking of styling it? Would it be a universal style or do you want to be able to change its style from wherever is calling it?
 
2:35 PM
just a universal one
 
I could probably copy-pasta you my code lol
I just made a custom window and passed it strings and things
public NotificationDialogWindow(string message, string caption, NotificationDialogIcon icon, NotificationDialogButtons buttons) I pretty much robbed MessageBox's constructor
 
right, and that is just a view?
 
Yeah it's just a view with the textblock text set directly in the constructor.
The way I see it, you've separate the view from the vm by making your service
And it is a stupidly simple implementation so why complicate things
I also have a modal content window which is a bit more involved. I wonder if you remember seeing me trying to figure out some code to select a data template from a resource dictionary based on the type of the data context given to it
I tell a lie. I didn't do that shit with setting the textbox text in the constructor. I created properties on the window.xaml.cs file and bound to them like a good boy.
 
mhhmmm
 
But yeah it's just a custom window
 
2:40 PM
right, and my service is in the "view" side of things, calling the Show() etc. of my control
 
No, never
Yeah so that's why I said put the service somewhere with access to the UI thread. You will want to be able to set the owner but again, you could pass your App class to your service constructor and access MainWindow like that if you want to get all clever with DI and that
or IoC, w/e
So your viewmodel calls notificationService.Show("message", "title");
IMessageBoxService.Show() calls var messageBox = new FancyMessageBoxWindow(message, title); messageBox.Owner = myApp.MainWindow; messageBox.ShowDialog(); or something like that
Is this helping at all?
I feel like I am waffling
 
no, you're asserting my assumptions
its helping :)
@Sean responding tooo?
you might as well just repro it and put it on github :D
 
3:07 PM
Sorry, someone brought me a toy
A broken toy.... But still a toy!
 
don't fall for it
 
Sales rep wanted the password changing on the Surface he uses for presentations
 
@Maverik is going to jump out of it
 
Oh boy, it's my lucky day!
I made a right hash of it. Mainly because I didn't see the email verification code come to my email account and I had forgotten I set it up like that
Anyway... =P
I could repro it
In fact just because I love you, that's exactly what I'm going to do.
You now owe me
Bwahahahahaha
 
3:25 PM
i'll pay you in WPFxual favors
 
I love it.
 
3:41 PM
I really need someone to develop the ISBHP, the Internet Slap on the Back of the Head Protocol, so that I can effectively train the offshore morons I have to deal with
 
amagawd its franssu!!
how is!
 
woooooooooooooooooooooohouuuuuuuuuuuuuuuu
I feel like dying every second of my life but appart from that everything is fine
I'm learning haskell
how are you ?
 
look who it is
why haskell?
n knot F#?!
@franssu employer finally blocked that site :(
 
mostly because I like the drawings in learnyouahaskell.com
also I'm stuck with VS2010 which is not great for F#
 
3:53 PM
ahh
what does haskell use? notepad?
 
any text editor I guess
maybe eclipse has some plug in
 
ahh
you like it so far?
and how did that app go that you wrote for that guy in here
 
yes it's awesome
the app is still under development
 
@NETscape What version of VS are you on?
Can I just upload a file to github?
I don't want to create a project and upload the damn thing...
 
i got them all
 
3:58 PM
You are a pokémaster
 
zip it and put it on drive or something
or commit to github repo
 
Yeah I don't have any xD
La la laaaaaa....
Right-click the zip, properties, then unblock before trying to extract
Otherwise it won't run straight off the bat
Or something...
Cos DL-ed from interwebs from non-trusted source
I couldn't be bothered replicating my constructors and all the buttons and enums and shit I made
So the custom window is really simple
But I put an example in that uses the result from System.Windows.MessageBox, hopefully you get the gist
Also I totally didn't make an interface
So what I'm saying is: it's really half-assed and simple
 
posted on September 03, 2014 by ericlippert

I’m back! As always, I had a delightful August visiting friends and relatives in Canada. It was even more fun than usual because I’ve got a new boat. That is, a new-to-me boat; the boat is almost as old as … Continue reading →

 
Things happen in OnStartup of App.xaml.cs because MainWindowViewModel isn't constructor-less so I couldn't just whack it in the XAML for MainWindow
Resisting urge to ping for feedback...... hnnnnnnngh
 
> Right-click the zip, properties, then unblock before trying to extract
 
4:09 PM
oh Haskell! nice
 
so what do i do?
unzip and open .sln
haha
 
Download it...
 
i've been trying to get my head to work with that, but i keep getting stuck at monads
 
Then unblock it
Then extract and open sln, yeah
Mav did you not try F#?
 
i read it and still skipped it
 
4:12 PM
@NETscape Well let me know when/if you get it to work lol
 
4:24 PM
nah i needed haskell to fix a program
thats still broken because i can't figure out how to fix it
 
Oh I thought you had, is all
 
evening guys! (in my local time ofc :P)
i know you already know Mouse
(class)
it's a static class, but has some dynamic property Mouse.Position for example
do you know how to make such static class?
or maybe the keyword for google material
 
You could try "static class" ;]
Right that's me
Later guys
@NETscape I might pop on when I get home, leave me a message either way =]
 
4:49 PM
FINALLY!!!
IT (sorry forgot caps) LIVES!
 
5:06 PM
I've been getting random weird errors on shit all day. Couldn't figure it out.
Turns out the debug profile was set to release.
goddamn I feel dumb.
 
well i spent a week trying to figure something out that turned out to be a problem in serializer code that's plastered all over the net!
 
5:26 PM
@Maverik GRATS
 
Yay, we're both stupid.
 
well yea kinda
i should have plugged it out first but i was dealing with 5 unknowns in combo and i was brute forcing them
now it works at least, except now it susceptible to replay attacks (i had to take the nonce bit out to figure that serializer was screwing up)
 
@Sean I got the full understanding of it. thx m8
@Maverik pay @Sean for me if you would
 
leans back, puts hands behind head
This is gonna be good
 
nah i prefer to stick with favors
 
5:32 PM
WPFxual favours?
They're the best kind
 
nah any *ual favors.. i'm not picky
 
I want to dip my bread in my milk
But I also don't want to dip my bread in my milk, because if it's bad I don't want crumbs in my milk
Has anyone ever dipped their bread in their milk before?
Well, I'll save you the hassle: it's awful. Don't do it.
@NETscape You're welcome, by the way
 
My buddy's doing soylent. He just gave me a taste. You ever have a cookie dough slim fast bar? It tastes like that.
 
I imagine that's bad... I've not tried any slim fast food
I am a lean, mean, coding machine with a body to die for. I don't need slimming products.
 
bread in milk
are you drunk
 
5:41 PM
I totally don't have a body to die for, btw
Drunk on MILK, YEAH BABY
That's funny cos I said milk and baby in the same sentence
 
00:00 - 18:0018:00 - 23:00

« first day (684 days earlier)      last day (3465 days later) »