Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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;
        }