예제 #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);
 }