Day 3 Homework Solution
- Posted: Nov 11, 2010 at 6:08 PM
- 18,252 Views
- 6 Comments
Loading User Information from Channel 9
Something went wrong getting user information from Channel 9
Loading User Information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
Right click “Save as…”
Got stuck with the homework assignment? No worries, simply watch enough of this 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.
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.
Follow the Discussion
Oops, something didn't work.
What does this mean?
Following an item on Channel 9 allows you to watch for new content and comments that you are interested in. You need to be signed in to Channel 9 to use this feature.What does this mean?
Following an item on Channel 9 allows you to watch for new content and comments that you are interested in and view them all on your notifications page.sign up for email notifications?
You mentioned in your instructions to catch / trap for the user clicking save, delete, edit button at the wrong time and didn't cover it is in the solution. I just went ahead and set the isEnabled for each of the buttons to prevent the user form clicking the wrong button in the first place...
I did this with a method setIconButtons(bool edit, bool save, bool delete) and then in each icon button click I told it which icon buttons to turn on / off…
Great lesson!
Thanks,
Scott
Hey theres actually an enumeration for Filemode called "Truncate" that will Completely wipe all data in the file without creating another.
Love the Series Marco
I made a mess of mine. I did everything up to the save point. When trying to save it I was using the technique from the Tombstoning lesson, it didnt work
Ahh, I've just finished the full thing and I did the delete function different, with fewer lines of code.
I called the isolated storage and deleted the file, then set the textbox to "".
3 lines of code is all it took
@Mintydog: Same
Oh yeah, GREAT TUTORIALS BOB
Also, to delete the file, couldn't you have just used -
private void delete_click(object sender, EventArgs e) { string fileName = "My_Note.txt"; IsolatedStorageFile storage = IsolatedStorageFile.GetUserStoreForApplication(); storage.DeleteFile(fileName); outputBox.Text = ""; inputBox.Text = ""; } // DeleteRemove this comment
Remove this thread
close