コード例 #1
0
        public static MessageBoxResult Show(string messageBoxText, string caption, MessageBoxButton button, MessageBoxImage icon)
        {
            MessageBoxFace msg = new MessageBoxFace(messageBoxText, caption, button, icon);

            msg.left   = left;
            msg.top    = top;
            msg.width  = width;
            msg.height = height;
            msg.ShowDialog();

            return(msg.Result);
        }
コード例 #2
0
        public static MessageBoxResult Show(string messageBoxText)
        {
            MessageBoxFace msg = new MessageBoxFace(messageBoxText);

            msg.left   = left;
            msg.top    = top;
            msg.width  = width;
            msg.height = height;
            msg.ShowDialog();

            return(msg.Result);
        }
コード例 #3
0
        public static MessageBoxResult ShowOK(string messageBoxText, string caption, string okButtonText)
        {
            MessageBoxFace msg = new MessageBoxFace(messageBoxText, caption, MessageBoxButton.OK);

            msg.left         = left;
            msg.top          = top;
            msg.width        = width;
            msg.height       = height;
            msg.OKButtonText = okButtonText;
            msg.ShowDialog();

            return(msg.Result);
        }
コード例 #4
0
        public static MessageBoxResult Show(Window owner, string messageBoxText, string caption)
        {
            MessageBoxFace msg = new MessageBoxFace(messageBoxText, caption);

            msg.Owner  = owner;
            msg.left   = left;
            msg.top    = top;
            msg.width  = width;
            msg.height = height;
            msg.ShowDialog();

            return(msg.Result);
        }
コード例 #5
0
        public static MessageBoxResult ShowYesNo(string messageBoxText, string caption, string yesButtonText, string noButtonText, MessageBoxImage icon)
        {
            MessageBoxFace msg = new MessageBoxFace(messageBoxText, caption, MessageBoxButton.YesNo, icon);

            msg.left          = left;
            msg.top           = top;
            msg.width         = width;
            msg.height        = height;
            msg.YesButtonText = yesButtonText;
            msg.NoButtonText  = noButtonText;

            msg.ShowDialog();

            return(msg.Result);
        }
コード例 #6
0
        public static MessageBoxResult ShowYesNo(string messageBoxText, string caption, string yesButtonText, string noButtonText)
        {
            MessageBoxFace msg = new MessageBoxFace(messageBoxText, caption, MessageBoxButton.YesNo);

            msg.left          = left;
            msg.top           = top;
            msg.width         = width;
            msg.height        = height;
            msg.YesButtonText = yesButtonText;
            msg.NoButtonText  = noButtonText;

            msg.ShowDialog();

            MessageBoxResult result = msg.Result == MessageBoxResult.None ? MessageBoxResult.No : msg.Result;

            return(result);
        }