Esempio n. 1
0
 private void SetsView_OnSetClosing(object sender, SetClosingEventArgs e)
 {
     if (!(e.Set.Content is ITextEditor textEditor))
     {
         return;
     }
     if (!textEditor.IsModified)
     {
         return;
     }
     if (TextEditorClosingWithUnsavedContent != null)
     {
         e.Cancel = true;
         TextEditorClosingWithUnsavedContent.Invoke(this, textEditor);
     }
 }
Esempio n. 2
0
 private void SetsView_OnSetClosing(object sender, SetClosingEventArgs e)
 {
     //LoggingService.LogInfo("Closing a text editor.");
     if (!(e.Set.Content is TextEditor textEditor))
     {
         return;
     }
     if (!textEditor.IsModified)
     {
         return;
     }
     if (TextEditorClosingWithUnsavedContent != null)
     {
         e.Cancel = true;
         TextEditorClosingWithUnsavedContent.Invoke(this, textEditor);
     }
 }