Пример #1
0
        private static CustomMessageBoxDialogResult ShowCore(IWin32Window owner, String text, String caption, CustomMessageBoxButtons buttons, CustomMessageBoxIcon icon, CustomMessageBoxDefaultButton defaultButton)
        {
            var mbex = MessageBoxExManager.CreateMessageBox(Guid.NewGuid().ToString());
            mbex.AllowSaveResponse = false;
            mbex.UseSavedResponse = false;
            mbex.Timeout = -1;

            mbex.Text = text;
            mbex.Caption = caption;
            buttons.Apply(mbex);
            icon.Apply(mbex);
            defaultButton.Apply(mbex);

            var result = mbex.Show(owner);
            return new CustomMessageBoxDialogResult(mbex, result);
        }
Пример #2
0
        private static CustomMessageBoxDialogResult ShowCore(IWin32Window owner, String text, String caption, CustomMessageBoxButtons buttons, CustomMessageBoxIcon icon, CustomMessageBoxDefaultButton defaultButton)
        {
            var mbex = MessageBoxExManager.CreateMessageBox(Guid.NewGuid().ToString());

            mbex.AllowSaveResponse = false;
            mbex.UseSavedResponse  = false;
            mbex.Timeout           = -1;

            mbex.Text    = text;
            mbex.Caption = caption;
            buttons.Apply(mbex);
            icon.Apply(mbex);
            defaultButton.Apply(mbex);

            var result = mbex.Show(owner);

            return(new CustomMessageBoxDialogResult(mbex, result));
        }
Пример #3
0
 public static CustomMessageBoxDialogResult Show(IWin32Window owner, String text, String caption, CustomMessageBoxButtons buttons, CustomMessageBoxIcon icon, CustomMessageBoxDefaultButton defaultButton)
 {
     return(ShowCore(owner, text, caption, buttons, icon, defaultButton));
 }
Пример #4
0
 public static CustomMessageBoxDialogResult Show(String text, String caption, CustomMessageBoxButtons buttons, CustomMessageBoxIcon icon)
 {
     return(ShowCore(null, text, caption, buttons, icon, MessageBoxDefaultButton.Button1));
 }
Пример #5
0
 public static CustomMessageBoxDialogResult Show(IWin32Window owner, String text, String caption, CustomMessageBoxButtons buttons, CustomMessageBoxIcon icon, CustomMessageBoxDefaultButton defaultButton)
 {
     return ShowCore(owner, text, caption, buttons, icon, defaultButton);
 }
Пример #6
0
 public static CustomMessageBoxDialogResult Show(String text, String caption, CustomMessageBoxButtons buttons, CustomMessageBoxIcon icon)
 {
     return ShowCore(null, text, caption, buttons, icon, MessageBoxDefaultButton.Button1);
 }