Esempio n. 1
0
 private void saveButton_Click(object sender, RoutedEventArgs e)
 {
     if (this.Title == "new - Easy Note")
     {
         var newFileDialog = new NewFileDialog();
         if (newFileDialog.ShowDialog() == true)
         {
             this.Title = newFileDialog.Answer;
         }
     }
     SaveOrUpdate();
 }
Esempio n. 2
0
        private void newFile_Click(object sender, RoutedEventArgs e)
        {
            if (ShouldSaveChanges())
            {
                Globals.CurrentlyOpenedFile = null;
                this.SetWindowName("new");
                fileContent.Text            = string.Empty;
                Globals.CurrentlyOpenedFile = null;
                TextChanged = false;

                var newFile = new NewFileDialog();
                if (newFile.ShowDialog() == true)
                {
                    this.Title = newFile.Answer;
                    newFile.Close();
                }
            }
        }