Sign in to queue

The Discussion

  • User profile image
    spier

    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

     

     

  • User profile image
    Marco Forte

    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

  • User profile image
    Mintydog

    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 Sad

  • User profile image
    Mintydog

    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 Smiley

  • User profile image
    Jaguma

    @Mintydog: Same Wink

    Oh yeah, GREAT TUTORIALS BOB Smiley

  • User profile image
    Jaguma

    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 = "";
            } // Delete

Add Your 2 Cents