Example #1
0
 public void SaveAll(object sender, RoutedEventArgs e)
 {
     foreach (object o in tabControl.Items)
     {
         Editors.Editor edit = (Editors.Editor)o;
         edit.Save();
     }
 }
Example #2
0
 public void CloseFile(object sender, RoutedEventArgs e)
 {
     Editors.Editor edit = ((Editors.Editor)((TabItem)tabControl.SelectedItem).Content);
     if (!edit.IsSaved)
     {
         MessageBoxResult messageBoxResult =
             System.Windows.MessageBox.Show("Would you like to save before closing?", "File Not Saved", System.Windows.MessageBoxButton.YesNo);
         if (messageBoxResult == MessageBoxResult.Yes)
         {
             edit.Save();
         }
     }
     tabControl.Items.Remove(tabControl.SelectedItem);
 }
Example #3
0
 public void SaveFile(object sender, RoutedEventArgs e)
 {
     Editors.Editor edit = ((Editors.Editor)((TabItem)tabControl.SelectedItem).Content);
     edit.Save();
 }