private bool MinimizeOnClose(IModelOptionsApplicationExit modelOptionsApplicationExit) {
     if (modelOptionsApplicationExit.MinimizeOnExit) {
         _closeFormController.Form.WindowState = FormWindowState.Minimized;
         return true;
     }
     return false;
 }
 private bool HideOnClose(IModelOptionsApplicationExit modelOptionsApplicationExit) {
     if (modelOptionsApplicationExit.HideOnExit) {
         _closeFormController.Form.Hide();
         return true;
     }
     return false;
 }
 private static bool PromptOnExit(IModelOptionsApplicationExit modelOptionsApplicationExit) {
     if (modelOptionsApplicationExit.PromptOnExit) {
         var promptOnExitTitle = CaptionHelper.GetLocalizedText(XpandSystemWindowsFormsModule.XpandWin, "PromptOnExitTitle");
         var promptOnExitMessage = CaptionHelper.GetLocalizedText(XpandSystemWindowsFormsModule.XpandWin, "PromptOnExitMessage");
         return WinApplication.Messaging.GetUserChoice(promptOnExitMessage, promptOnExitTitle, MessageBoxButtons.YesNo) != DialogResult.Yes;
     }
     return false;
 }
Exemple #4
0
 private bool MinimizeOnClose(IModelOptionsApplicationExit modelOptionsApplicationExit)
 {
     if (modelOptionsApplicationExit.MinimizeOnExit)
     {
         _closeFormController.Form.WindowState = FormWindowState.Minimized;
         return(true);
     }
     return(false);
 }
Exemple #5
0
 private bool HideOnClose(IModelOptionsApplicationExit modelOptionsApplicationExit)
 {
     if (modelOptionsApplicationExit.HideOnExit)
     {
         _closeFormController.Form.Hide();
         return(true);
     }
     return(false);
 }
Exemple #6
0
 private static bool PromptOnExit(IModelOptionsApplicationExit modelOptionsApplicationExit)
 {
     if (modelOptionsApplicationExit.PromptOnExit)
     {
         var promptOnExitTitle   = CaptionHelper.GetLocalizedText(XpandSystemWindowsFormsModule.XpandWin, "PromptOnExitTitle");
         var promptOnExitMessage = CaptionHelper.GetLocalizedText(XpandSystemWindowsFormsModule.XpandWin, "PromptOnExitMessage");
         return(WinApplication.Messaging.GetUserChoice(promptOnExitMessage, promptOnExitTitle, MessageBoxButtons.YesNo) != DialogResult.Yes);
     }
     return(false);
 }