Пример #1
0
 public static Result Show(IWin32Window parent, string text, string caption, string checkBoxText, bool isChecked, string[] buttons, int[] results, string cancelButton, string acceptButton)
 {
     using (MessageBoxWithCheckBox messageBox = new MessageBoxWithCheckBox(text, caption, checkBoxText, isChecked, buttons, results, cancelButton, acceptButton))
     {
         if (parent == null)
         {
             messageBox.StartPosition = FormStartPosition.CenterScreen;
         }
         return(messageBox.Show(parent));
     }
 }
Пример #2
0
 public static Result ShowYesNo(IWin32Window parent, string text, string caption, string checkBoxText, bool isChecked)
 {
     using (MessageBoxWithCheckBox messageBox = new MessageBoxWithCheckBox(text, caption, checkBoxText, isChecked,
                                                                           new string[] { BUTTON_YES, BUTTON_NO }, new int[] { (int)DialogResult.Yes, (int)DialogResult.No }, BUTTON_NO, BUTTON_YES))
     {
         if (parent == null)
         {
             messageBox.StartPosition = FormStartPosition.CenterScreen;
         }
         return(messageBox.Show(parent));
     }
 }