Exemplo n.º 1
0
 public static System.Windows.Forms.DialogResult Show(string text, string caption, System.Windows.Forms.MessageBoxButtons buttons, System.Windows.Forms.MessageBoxIcon icon, System.Windows.Forms.MessageBoxDefaultButton defaultButton, System.Windows.Forms.MessageBoxOptions options, bool displayHelpButton)
 {
     return(System.Windows.Forms.MessageBox.Show(text: text, caption: caption, buttons: buttons, icon: icon, defaultButton: defaultButton, options: options | System.Windows.Forms.MessageBoxOptions.RightAlign | System.Windows.Forms.MessageBoxOptions.RtlReading, displayHelpButton: displayHelpButton));
 }
Exemplo n.º 2
0
 public static System.Windows.Forms.DialogResult Show(System.Windows.Forms.IWin32Window owner, string text, string caption, System.Windows.Forms.MessageBoxButtons buttons, System.Windows.Forms.MessageBoxIcon icon, System.Windows.Forms.MessageBoxDefaultButton defaultButton, System.Windows.Forms.MessageBoxOptions options, string helpFilePath, System.Windows.Forms.HelpNavigator navigator, object param)
 {
     return(System.Windows.Forms.MessageBox.Show(owner: owner, text: text, caption: caption, buttons: buttons, icon: icon, defaultButton: defaultButton, options: options | System.Windows.Forms.MessageBoxOptions.RightAlign | System.Windows.Forms.MessageBoxOptions.RtlReading, helpFilePath: helpFilePath, navigator: navigator, param: param));
 }
Exemplo n.º 3
0
 public static System.Windows.Forms.DialogResult Show(string text, string caption, System.Windows.Forms.MessageBoxButtons buttons, System.Windows.Forms.MessageBoxIcon icon)
 {
     return(System.Windows.Forms.MessageBox.Show(text: text, caption: caption, buttons: buttons, icon: icon));
 }
Exemplo n.º 4
0
 public static System.Windows.Forms.DialogResult Show(System.Windows.Forms.IWin32Window owner, string text, string caption, System.Windows.Forms.MessageBoxButtons buttons, System.Windows.Forms.MessageBoxIcon icon, System.Windows.Forms.MessageBoxDefaultButton defaultButton)
 {
     return(System.Windows.Forms.MessageBox.Show(owner: owner, text: text, caption: caption, buttons: buttons, icon: icon, defaultButton: defaultButton, options: System.Windows.Forms.MessageBoxOptions.RtlReading | System.Windows.Forms.MessageBoxOptions.RightAlign));
 }
Exemplo n.º 5
0
 public static System.Windows.Forms.DialogResult Show(System.Windows.Forms.IWin32Window owner, string text, string caption, System.Windows.Forms.MessageBoxButtons buttons, System.Windows.Forms.MessageBoxIcon icon, System.Windows.Forms.MessageBoxDefaultButton defaultButton, System.Windows.Forms.MessageBoxOptions options, string helpFilePath, string keyword)
 {
     return(System.Windows.Forms.MessageBox.Show(owner: owner, text: text, caption: caption, buttons: buttons, icon: icon, defaultButton: defaultButton, options: options | System.Windows.Forms.MessageBoxOptions.RightAlign | System.Windows.Forms.MessageBoxOptions.RtlReading, helpFilePath: helpFilePath, keyword: keyword));
 }
Exemplo n.º 6
0
        public static System.Windows.Forms.DialogResult ShowMessge(string Caption, string Message, System.Windows.Forms.MessageBoxButtons buttons, bool FocuseOnYes = true, bool ShowAllButton = true)
        {
            System.Windows.Forms.DialogResult Result = System.Windows.Forms.DialogResult.None;
            switch (buttons)
            {
            case System.Windows.Forms.MessageBoxButtons.OK:
                using (var Temp = new System.Windows.Forms.Form())
                {
                    Temp.Dock            = System.Windows.Forms.DockStyle.Fill;
                    Temp.WindowState     = System.Windows.Forms.FormWindowState.Maximized;
                    Temp.BackColor       = System.Drawing.Color.Silver;
                    Temp.Opacity         = 0.7D;
                    Temp.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
                    Temp.KeyDown        += (sender, e) =>
                    {
                        if (e.KeyCode == System.Windows.Forms.Keys.Escape)
                        {
                            Temp.Close();
                        }
                    };
                    Temp.Load += (sender, e) =>
                    {
                        using (var Confirm = new ConfirmMessageBox())
                        {
                            Confirm.Caption    = Caption;
                            Confirm.SetMessage = Message;
                            Result             = Confirm.ShowDialog();
                            Temp.Close();
                        }
                    };
                    Temp.ShowDialog();
                }
                break;

            case System.Windows.Forms.MessageBoxButtons.OKCancel:
                break;

            case System.Windows.Forms.MessageBoxButtons.AbortRetryIgnore:
                break;

            case System.Windows.Forms.MessageBoxButtons.YesNoCancel:
                break;

            case System.Windows.Forms.MessageBoxButtons.YesNo:
                using (var Temp = new System.Windows.Forms.Form())
                {
                    Temp.BackColor       = System.Drawing.Color.Black;
                    Temp.ClientSize      = new System.Drawing.Size(1280, 769);
                    Temp.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
                    Temp.Opacity         = 0.7D;
                    Temp.ShowIcon        = false;
                    Temp.StartPosition   = System.Windows.Forms.FormStartPosition.CenterScreen;
                    Temp.WindowState     = System.Windows.Forms.FormWindowState.Maximized;
                    Temp.ResumeLayout(false);
                    Temp.KeyDown += (sender, e) =>
                    {
                        if (e.KeyCode == System.Windows.Forms.Keys.Escape)
                        {
                            Temp.Close();
                        }
                    };
                    Temp.Load += (sender, e) =>
                    {
                        using (var Confirm = new YesNoMessageBox())
                        {
                            Confirm.Caption         = Caption;
                            Confirm.SetMessage      = Message;
                            Confirm.LoadOnYesButton = FocuseOnYes;
                            Confirm.ShowAllButton   = ShowAllButton;
                            Result = Confirm.ShowDialog();
                            Temp.Close();
                        }
                    };
                    Temp.ShowDialog();
                }
                break;

            case System.Windows.Forms.MessageBoxButtons.RetryCancel:
                break;
            }
            return(Result);
        }
Exemplo n.º 7
0
 public static System.Windows.Forms.DialogResult Show(System.Windows.Forms.IWin32Window owner, string text, string caption, System.Windows.Forms.MessageBoxButtons buttons)
 {
     return(System.Windows.Forms.MessageBox.Show(owner: owner, text: text, caption: caption, buttons: buttons));
 }
 public static void ShowMessage(string content, string caption, System.Windows.Forms.MessageBoxButtons messageBoxButton, System.Windows.Forms.MessageBoxIcon messageBoxImage)
 {
     System.Windows.Forms.MessageBox.Show(content, caption, messageBoxButton, messageBoxImage);
 }
Exemplo n.º 9
0
 public static System.Windows.Forms.DialogResult MessageBox(string text, string title, System.Windows.Forms.MessageBoxButtons buttons)
 {
     Debug.Assert(false);
     return(System.Windows.Forms.DialogResult.None);
 }
Exemplo n.º 10
0
        public static System.Windows.Forms.DialogResult ShowAlert(string text, string title, System.Windows.Forms.MessageBoxButtons buttons)
        {
            var alert = SendIntPtr(SendIntPtr(clsNSAlert, selAlloc), selInit);

            SendIntPtr(alert, selSetMessageText, ToNSString(title));
            SendIntPtr(alert, selSetInformativeText, ToNSString(text));
            SendIntPtr(alert, selSetAlertStyle, 2);

            if (buttons == System.Windows.Forms.MessageBoxButtons.YesNo ||
                buttons == System.Windows.Forms.MessageBoxButtons.YesNoCancel)
            {
                SendIntPtr(alert, selAddButtonWithTitle, ToNSString("Yes"));
                SendIntPtr(alert, selAddButtonWithTitle, ToNSString("No"));

                if (buttons == System.Windows.Forms.MessageBoxButtons.YesNoCancel)
                {
                    SendIntPtr(alert, selAddButtonWithTitle, ToNSString("Cancel"));
                }
            }

            var ret = SendInt(alert, selRunModal);

            SetNSWindowFocus(nsWindow);

            if (buttons == System.Windows.Forms.MessageBoxButtons.YesNo ||
                buttons == System.Windows.Forms.MessageBoxButtons.YesNoCancel)
            {
                if (ret == NSAlertFirstButtonReturn)
                {
                    return(System.Windows.Forms.DialogResult.Yes);
                }
                if (ret == NSAlertSecondButtonReturn)
                {
                    return(System.Windows.Forms.DialogResult.No);
                }

                return(System.Windows.Forms.DialogResult.Cancel);
            }
            else
            {
                return(System.Windows.Forms.DialogResult.OK);
            }
        }
Exemplo n.º 11
0
 static public bool MessageBoxIsOK(string message, string caption, System.Windows.Forms.MessageBoxButtons buttons, System.Windows.Forms.MessageBoxIcon icon)
 {
     return(System.Windows.Forms.MessageBox.Show(message, caption, buttons, icon) == System.Windows.Forms.DialogResult.OK);
 }
Exemplo n.º 12
0
        public static System.Windows.Forms.DialogResult ShowMessage(string message, string caption, System.Windows.Forms.MessageBoxButtons button, System.Windows.Forms.MessageBoxIcon icon)
        {
            System.Windows.Forms.DialogResult dlResult = System.Windows.Forms.DialogResult.None;
            switch (button)
            {
            case System.Windows.Forms.MessageBoxButtons.OK:
                using (GUI.frmMessageOK msgOK = new GUI.frmMessageOK())
                {
                    msgOK.Width               = 376;
                    msgOK.lblMessage.Width    = 376;
                    msgOK.lblMessage.Location = new System.Drawing.Point(0, 66);
                    msgOK.btnOK.Location      = new System.Drawing.Point(104, 109);
                    msgOK.Caption             = caption;
                    msgOK.Message             = message;

                    switch (icon)
                    {
                    case System.Windows.Forms.MessageBoxIcon.Information:
                        msgOK.MessageIcon = GestionBasica.Properties.Resources.Information;
                        break;

                    case System.Windows.Forms.MessageBoxIcon.Question:
                        msgOK.MessageIcon = GestionBasica.Properties.Resources.Question;
                        break;

                    case System.Windows.Forms.MessageBoxIcon.Error:
                        msgOK.MessageIcon = GestionBasica.Properties.Resources.Error;
                        break;
                    }
                    dlResult = msgOK.ShowDialog();
                }
                break;

            case System.Windows.Forms.MessageBoxButtons.YesNo:
                using (GUI.frmMessageYesNo msgYesNo = new GUI.frmMessageYesNo())
                {
                    msgYesNo.Caption = caption;
                    msgYesNo.Message = message;
                    switch (icon)
                    {
                    case System.Windows.Forms.MessageBoxIcon.Information:
                        msgYesNo.MessageIcon = GestionBasica.Properties.Resources.Information;
                        break;

                    case System.Windows.Forms.MessageBoxIcon.Question:
                        msgYesNo.MessageIcon = GestionBasica.Properties.Resources.Question;
                        break;

                    case System.Windows.Forms.MessageBoxIcon.Error:
                        msgYesNo.MessageIcon = GestionBasica.Properties.Resources.Error;
                        break;
                    }
                    dlResult = msgYesNo.ShowDialog();
                }
                break;
            }
            return(dlResult);
        }
Exemplo n.º 13
0
 public static System.Windows.Forms.DialogResult ShowTSSS(System.String text, System.String caption, System.Windows.Forms.MessageBoxButtons buttons, System.Windows.Forms.MessageBoxIcon icon)
 {
     return(System.Windows.Forms.DialogResult.Yes);
 }
Exemplo n.º 14
0
        public static System.Windows.Forms.DialogResult ShowMSSS(System.String text, System.String caption, System.Windows.Forms.MessageBoxButtons buttons, System.Windows.Forms.MessageBoxIcon icon)
        {
            object result;

            if (TestSpecificStubsUtil.RunTestSpecificStub(System.Reflection.MethodBase.GetCurrentMethod(), new object[] { text, caption, buttons, icon }, out result))
            {
                return((System.Windows.Forms.DialogResult)result);
            }
            else
            {
                return(STEE.ISCS.MulLanguage.MessageBoxDialog.Show(text, caption, buttons, icon));
            }
        }