Example #1
0
 public static bool Start(CloseAndBackConfirm.Actions action)
 {
     if (IsNeedConfirm)
     {
         if (MessageWindow.Show(Application.Current.MainWindow, State + ",确认" + Enum.ToObject(typeof(Actions), action) + "?", MessageBoxButton.OKCancel) == MessageBoxResult.OK)
         {
             IsNeedConfirm = false;
             ClearOutput();
             return true;
         }
         else
         {
             return false;
         }
     }
     ClearOutput();
     return true;
 }
Example #2
0
 public static void Set(CloseAndBackConfirm.States state)
 {
     IsNeedConfirm = true;
     State = Enum.ToObject(typeof(States), state).ToString();
 }