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; }
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); }