« first day (1415 days earlier)      last day (3525 days later) » 

3:19 AM
@CCInc seeing you after a long time ;)
 
oh yeah, hi!
 
4:06 AM
help!!!!
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WindowsFormsApplication2
{
    public partial class Hello_World : Form
    {
        public Hello_World()
        {
            InitializeComponent();
        }

        private void label1_Click(object sender, EventArgs e)
        {
            if (10 * 2 = 20)

        }
So my problem is that I don't know how to make a number problem for a label and if I select a radio button as an answer it will will atoumattically tell me if I am correct or not.
So my label says "What is 10 times 2?" now I have four radio buttons to select from. So say I clicked my first radio box which is 20 as an answer and then clicked submit it will tell me if my answer is right else any other answer that is or was chosen is incorrect.
I am using Visual Studio Professional 2013.2 or what ever this free version is and I am using Windows 7
 
 
1 hour later…
5:16 AM
Hello
 
 
3 hours later…
7:47 AM
Hi friends
 
 
9 hours later…
4:37 PM
@juanvan @NETscape Unfortonutally .. no
This still workd
 var c1 = Enumerable.Empty<SomeClass>();
            var e1 = c1.Select(s1=>s1.Id).ToList();
 
4:49 PM
Anyone read my question?
 
Is there any company that provide the exams to be a MS certified online or they are all physical exams? For instance MSCD, etc...
@PsychOPhobiA why don't you post that as a question on the site?
 
I don't want to be baaned ^
 
@PsychOPhobiA banned for?
 
Not asking the question right and for hardness of understanding
 
down votes do not get you banned they only show that your question was poorly written or lack of something that can be seen by the comments.
in most cases people will point out with comments why was that
and you can edit your question to reflect changes to improve your question
there is nothing to be afraid of
You can further see the TOUR page as how the site works
@PsychOPhobiA here is a tip, you already have a checkedchange event, with that you want to uncheck other options but the one that was just checked, when the button is clicked you want to process the calculation not when the label is clicked. If you post that as a question it will indeed get you some down votes as you haven't tried anything nor searched for anything you could have done. However that would not get you banned ever, at most your question would be put on-hold.
 
5:10 PM
Hey guys
 
Okay
@Guapo Tahnks
 
 
3 hours later…
8:09 PM
What do they mean by business logic and presentation logic?
 
8:29 PM
Logic tier = Business tier
Oops
forget the last sentence
Business logic is about your data, how it works, regardless of the GUI
Presentation logic is about what the user will see, when, how, etc
 
Uh a wiki article is probably going to be too over my head haha.
My internet is fucked up right now.
 
For example, you have an application where users are either admins or simple users : this is business logic
 
So like in game terms the business would be like checking the rolls and stuff.
and then the presentation would be presenting what said roll means?
 
Now, your application show 2 buttons for simple users, and 4 buttons for admins : presentation logic
In
In a game, business logic would be the rules and all the abstract concepts : hero, ennemi, dice, rolls, etc
And presentation logic would be the rules about what you show to the player, when, how
For example, a player can make normal and critical hits, those are business related facts and logic
When a player makes a critical strike on an ennemi, damage number is bigger and red, this is presentation logic
 
8:39 PM
Would I put the player information "name, class, strength" in the business side then?
Which I guess is considered the model right?
 
Yes, this is the model
The model (or domain) is the subject of the application, and the answer of the question : what is this application about ?
 
It's just a windows form game I've been making to learn coding then I hit this huge wall of user interfaces.
I didn't know how complex they were.
I noticed it when I made a shop and the money wasn't changing on the UI but was in the code. Didn't know it was so hard just to refresh all that stuff, I just kind of thought the UI knew it haha.
 
Yes, that's because your interface stores some values that are independent of the ones in your business objects, so you need to manually synchronize them
Unless you go for observer pattern
 
I don't know what that is.
I've only been coding a few months heh.
 
(an object, the subscriber, register himself to another object, the publisher. whenever the latter do something, he notices all the subscribers registered to him)
 
8:45 PM
and this MVVM stuff has been a struggle but I'm trying to keep at it.
 
Oh, I thought you were doing Windows Forms
But actually you are doing WPF
In WPF, you can do data binding instead
wpf-tutorial.com very nice tutorial
 
Well I guess I'll just read the tutorial
I did the Inotifypropertychanged
 
The main trick about data binding is DataContext inheritance
 
Meaning?
<Label x:Name="moneyLabel" Content="{Binding Path=Money, UpdateSourceTrigger=PropertyChanged}" HorizontalAlignment="Left" Margin="147,246,0,0" VerticalAlignment="Top" RenderTransformOrigin="0.184,0"/>
It still isn't updating?
I also forget how to format code on here -.-
 
9:12 PM
Either use four spaces or backticks for inline code
 
9:25 PM
Huh?
 
code code code code code code code code code code code
or
some inline code
 
Still not following :( I'm sorry
 
prepend your code block with four spaces to code format it
or simply press ctrl+k
 
oh ok got you
I thought you were talking about the code I posted.
 
:)
 
9:31 PM
 public int Money
        {
            get { return money; }
            set { if (value != money)
                 { money = value; OnPropertyChanged("Money"); } } }
protected void OnPropertyChanged(string name)
        {
            PropertyChangedEventHandler handler = PropertyChanged;
            if (handler != null)
            {
                handler(this, new PropertyChangedEventArgs(name));
            }
        }
Does that all look right? For data binding?
oh and I have this in the code behind of the xml file
DataContext = new Game();
 
user3002370
heya
 
9:59 PM
@user2442335 The Money property is well written
If the user interface is not updated, you may have issues with your DataContext
 
10:22 PM
Gotta be kidding
-1 one is what I get for my question
I told you guys I get downvoted
See this is why I post my code in the chat
 
11:00 PM
@DavidKhuu I posted my data context, I see nothing in the tutorial about doing it wrong.
 
From which class does the Money property come from ?
Where did you put the line DataContext = new Game() ?
@PsychOPhobiA You want to write a quizz that use radiobuttons to select the answer
You must read tutorials about RadioButtons, they will teach you everything you need
Basically, RadioButtons are useless if you can't detect which one is selected
 
It comes from the game class.
DataContext = new Game();

            InitializeComponent();
 
@user2442335 I guess you put the DataContext = new Game() in your MainWindow class constructor ?
What happens if you put it after InitializeComponent() ? (not sure it will help ...)
 
11:28 PM
@DavidKhuu Still not updating :(
 
Can you post all the code, using pastebin or something ?
XAML, its codebehind, and the Game class
 
...
    public ProduceShop(Game game)
    {
        thisGame = game;
         // ...
        DataContext = new Game();
    }
why don't you write DataContext = game ?
 
I'm not sure, I was just doing it as I saw it used.
 
Because by doing so, you have two Game objects
you change one, the other is untouched
furthermore, you are changing the one that is not set as DataContext
 
11:43 PM
Ah, I was wondering If I should of changed it or not. I changed it but the UI still doesn't update.
 
thisGame.Money -= thisGame.currentVegetable.Cost;
put a breakpoint
there, and checks that a correct value is stored in the Money property
 
I think it stores a correct value because if I keep hitting buy eventually it says out of money.
 
change the binding of the moneyLabel Label to
{Binding Money}
it should be enough
UpdateSourceTrigger has no utility in this case
 

« first day (1415 days earlier)      last day (3525 days later) »