コード例 #1
0
ファイル: PropEditorViewModel.cs プロジェクト: priyanr/Vixen
 /// <summary>
 /// Method to invoke when the Closing command is executed.
 /// </summary>
 private void Closing(CancelEventArgs e)
 {
     if (TestIsDirty())
     {
         MessageBoxService mbs = new MessageBoxService();
         var response          = mbs.GetUserConfirmation($"Save Prop \"{CleanseNameString(Prop.Name)}\" ", "Save");
         if (response.Result == MessageResult.OK)
         {
             SaveModel();
         }
         else if (response.Result == MessageResult.Cancel)
         {
             e.Cancel = true;
         }
     }
 }