Entries:
Comments:
Posts:

Loading User Information from Channel 9

Something went wrong getting user information from Channel 9

Latest Achievement:

Loading User Information from MSDN

Something went wrong getting user information from MSDN

Visual Studio Achievements

Latest Achievement:

Loading Visual Studio Achievements

Something went wrong getting the Visual Studio Achievements

Day 1 Homework Assignment Solution

Download

Right click “Save as…”

Got stuck with the homework assignment?  No worries, simply watch enough of the solution video to get un-stuck, OR compare your solution with Bob's version. IMPORTANT: before you peek at this video, please—for your own sake—try to complete this homework assignment on your own.  You'll only learn through practice, frustration, and exploration.

Download the source code in c#

Download the source code in VB.Net

Follow the Discussion

  • TheeThee

    You could ofcourse use the
    string message = (textBox1.Text == "20 10 30") ? "You saved the world" : "You die!";
    Which would be the easiest way here ;)

  • @Thee -- Yes, of course.  Please keep in mind that I'm assuming the viewer has only one day of experience.  There will be many ways to re-write these silly examples to make them more compact.  At this point (again, target audience is the absolute beginner), I'm just happy people are able to write this much!!!  But your point is well taken!  Smiley

  • edrandomedrandom

    Hi Clint and Bob, I mashed some up  here :) No story,  I will take a repeat on the previous videos. Can you tell me how to remove safely an unintentional namespace for let's say a button.click event, seems helpful to me. (English is not my first language, and my C is not that sharp yet, so excuse me on the occasion.)

  • Hi Bob,

    I was wondering if it would be possible to create a count down timer for the '108 minutes' in the header?

    Thanks

  • Hi Bob, good video, but at the end you didnt explain how to do the extra bit of the assignment where you get the title page to change (where currently it says 108). I managed to do it, I set it to have a message saying Saved world or End of the World depending on what you typed, but would be nice to add that to the end of the video for people who managed to do that.

     

    Cheers

  • PeterNLPeterNL

    Like to add two requests/remarks:  In the phone emulator one can go back (<-) to see a page with  a choice list (with e.g. the choice Settings). To make the name of this app equal Brahma Initiative one (after some trials I discover) finds this name to change hidden in the file WMAppManifest.xml under tag <App xmlns...<Title= "Brahma Inititaive"> ....>. It also takes a restart of the phone emulator to see it appear.  Secondly: I like to know after setting the focus on the textbox how one can set (programmatically) the keyboard to the numeric keyboard on the top so the user can immediately startting to type the numbers.  By the way: nice to follow these sequences of steps so far in the serie. Thanks.

  • @PeterNL:

    Reference this:  http://www.ginktage.com/?p=603

  • Here is the code I used...

        if (myTextBox.Text == "2 4 15 17 23 42")
                    {
                        myTextBlock.Text = "Recalibrating Energy Core Complete...";
                    }
                    else myTextBlock.Text = "You lose Sucka!!!"; 
    

    The reason I bring it up is the I ommitted, and it worked just fine, the

    string message = ""'; or the string userValue = myTextBox.Text 

    Can someone explain what the purpose of doing it the other two ways above would ever have been for in the first place? 

    I am a super noob so all the help the better.

  • This works too:

    textBlock.Text=(textBox.Text=="4 8 15 16 23 42")?"OK":"KO";

  • very easy! Thanks! 

  • JonathanJonathan

    Thanks for this! Other than forgetting how to set the input scope focus, I think I'm quite on track here.

  • did we have to include a countdown to count down to 0 fdorm 180 if they eneter in the wrong code cux i thought we had to and that's what i got sstuck on

Remove this comment

Remove this thread

close

Comments Closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.