예제 #1
0
        /// <summary>
        /// Display message - static mode
        /// </summary>
        /// <param name="message">Message content</param>
        /// <param name="reverseContentDirection">Reverse message content direction</param>
        /// <returns>AmRoMessageBoxResult</returns>
        public static AmRoMessageBoxResult ShowDialog(string message, bool reverseContentDirection = false)
        {
            var messageWindow = new WinMessageBox(Owner ?? Owner)
            {
                Message = message,
                ReverseContentDirection = reverseContentDirection
            };

            messageWindow.ShowDialog();
            return(messageWindow.AmRoMessageBoxResult);
        }
예제 #2
0
        /// <summary>
        /// Display message with a caption, custom buttons and custom icon - static mode
        /// </summary>
        /// <param name="message">Message content</param>
        /// <param name="caption">Message box caption</param>
        /// <param name="messageBoxButton">Message box buttons</param>
        /// <param name="messageBoxIcon">Message box icon</param>
        /// <param name="dircetion">Specify message box direction</param>
        /// <param name="reverseContentDirection">Reverse message content direction</param>
        /// <returns>AmRoMessageBoxResult</returns>
        public static AmRoMessageBoxResult ShowDialog(string message, string caption,
                                                      AmRoMessageBoxButton messageBoxButton, AmRoMessageBoxIcon messageBoxIcon, FlowDirection dircetion,
                                                      bool reverseContentDirection = false)
        {
            var messageWindow = new WinMessageBox(Owner ?? Owner)
            {
                Message = message,
                Caption = caption,
                AmRoMessageBoxButton    = messageBoxButton,
                AmRoMessageBoxIcon      = messageBoxIcon,
                AmRoMessageBoxDirection = dircetion,
                ReverseContentDirection = reverseContentDirection
            };

            messageWindow.ShowDialog();
            return(messageWindow.AmRoMessageBoxResult);
        }
예제 #3
0
        /// <summary>
        /// Display message box dialog
        /// </summary>
        /// <returns>AmRoMessageBoxResult</returns>
        private AmRoMessageBoxResult DisplayMessageDialog()
        {
            var messageWindow = new WinMessageBox(ParentWindow)
            {
                WindowBackground          = GetSolidBrush(Background),
                TextColor                 = GetSolidBrush(TextColor),
                IconColor                 = GetSolidBrush(IconColor),
                RippleEffectColor         = GetSolidBrush(RippleEffectColor),
                ClickEffectColor          = GetSolidBrush(ClickEffectColor),
                MessageFontSize           = MessageFontSize,
                CaptionFontSize           = CaptionFontSize,
                FontFamily                = FontFamily,
                Message                   = Message,
                Caption                   = Caption,
                AmRoMessageBoxButton      = MessageBoxButton,
                AmRoMessageBoxIcon        = MessageBoxIcon,
                ReverseContentDirection   = ReverseContentDirection,
                AmRoMessageBoxDirection   = Direction,
                AmRoMessageBoxButtonsText = ButtonsText,
                ParentWindow              = ParentWindow,
                ShowMessageWithEffect     = ShowMessageWithEffect,
                WindowEffect              = new AmRoMessageBoxWindowEffect
                {
                    Color      = GetSolidBrush(WindowEffectColor),
                    EffectArea = EffectArea,
                    Opacity    = EffectOpacity
                }
            };

            if (ParentWindow != null)
            {
                ParentWindow.Focus();
                ParentWindow.Activate();
            }

            messageWindow.ShowDialog();
            ResetOptions();

            return(messageWindow.AmRoMessageBoxResult);
        }