Exemplo n.º 1
0
        public static void ShowOptionalWarning(string text, string showNextTimeOptionName, string checkBoxText = null)
        {
            WaitDialog.Hide();
            var messageForm = new BvOptionalWarning();
            var options     = new BvOptionalWarningArgs(text, showNextTimeOptionName, checkBoxText);

            messageForm.ShowForm(options);
            WaitDialog.Restore();
        }
Exemplo n.º 2
0
        public static DialogResult Show(string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton)
        {
            WaitDialog.Hide();
            DialogResult res;

            if (ParentWindowHandle == null)
            {
                res = XtraMessageBox.Show(InsertCrlf(text), caption, buttons, icon, defaultButton);
            }
            else
            {
                res = XtraMessageBox.Show(ParentWindowHandle, InsertCrlf(text), caption, buttons, icon, defaultButton);
                ParentWindowHandle = null;
            }
            WaitDialog.Restore();
            return(res);
        }
Exemplo n.º 3
0
 private static DialogResult ShowForm(ErrorForm f, Form owner)
 {
     if (owner == null)
     {
         owner = ActiveForm;
     }
     try
     {
         WaitDialog.Hide();
         f.TopMost = true;
         if (UnitTestMode)
         {
             f.Show(owner);
             Thread.Sleep(2000);
             return(DialogResult.OK);
         }
         return(f.ShowDialog(owner));
     }
     finally
     {
         WaitDialog.Restore();
     }
 }