예제 #1
0
        public Boolean AddQuestion(String text, String desc = null)
        {
            Boolean result = WindowMessageBox.ShowQuestion(text);

            WindowProcessMessage message = new WindowProcessMessage(WindowProcessMessageTyp.Blank, text, desc);

            AddMessage(message);

            text = (result == true) ? "Да" : "Нет";
            AddMessage(new WindowProcessMessage(WindowProcessMessageTyp.Blank, text, null));

            return(result);
        }
예제 #2
0
        public static MessageBoxResult Show(String caption, String message, MessageBoxButton buttons, MessageBoxImage image, MessageBoxResult defaultResult)
        {
            MessageBoxResult result = MessageBoxResult.None;

            if (Application.Current != null)
            {
                Application.Current.Dispatcher.Invoke(
                    (Action)(() =>
                {
                    WindowMessageBox window = new WindowMessageBox();

                    result = window.ShowCustom(caption, message, buttons, image, defaultResult);
                })
                    );
            }

            return(result);
        }
예제 #3
0
        public static MessageBoxResult Show(String caption, String message, MessageBoxButton buttons, MessageBoxImage image, MessageBoxResult defaultResult)
        {
            MessageBoxResult result = MessageBoxResult.None;

            if (Application.Current != null)
            {
                Application.Current.Dispatcher.Invoke(
                    (Action)(() =>
                    {
                        WindowMessageBox window = new WindowMessageBox();

                        result = window.ShowCustom(caption, message, buttons, image, defaultResult);
                    })
                );
            }

            return result;
        }