コード例 #1
0
        public static bool? Show(string message, string detail, MessageBoxWindowType windowType, MessageBoxWindowButtonsType buttonType)
        {
            MessageBoxWindow window = new MessageBoxWindow();

              window.Message = message;
              window.Detail = detail;
              window.WindowType = windowType;
              window.ButtonsType = buttonType;

              switch (windowType)
              {
            case MessageBoxWindowType.Information:
              window.Title = LanguageString.Find("Presentation_Windows_MessageBoxWindow_Information");
              break;
            case MessageBoxWindowType.Question:
              window.Title = LanguageString.Find("Presentation_Windows_MessageBoxWindow_Question");
              break;
            case MessageBoxWindowType.Warning:
              window.Title = LanguageString.Find("Presentation_Windows_MessageBoxWindow_Warning");
              break;
            case MessageBoxWindowType.Error:
              window.Title = LanguageString.Find("Presentation_Windows_MessageBoxWindow_Error");
              break;
            default:
              window.Title = LanguageString.Find("Presentation_Windows_MessageBoxWindow_Information");
              break;
              }

              return window.ShowDialog();
        }
コード例 #2
0
        public static bool? Show(string message, string detail, MessageBoxWindowType windowType, MessageBoxWindowButtonsType buttonType, string title)
        {
            MessageBoxWindow window = new MessageBoxWindow();

              window.Title = title;
              window.Message = message;
              window.Detail = detail;
              window.WindowType = windowType;
              window.ButtonsType = buttonType;

              return window.ShowDialog();
        }
コード例 #3
0
        private void SetButtonsTypeVisibility(MessageBoxWindowButtonsType mode)
        {
            switch (mode)
            {
            case MessageBoxWindowButtonsType.OkCancel:
                OkButton.Visibility        = Visibility.Collapsed;
                OkCancelButtons.Visibility = Visibility.Visible;
                YesNoButtons.Visibility    = Visibility.Collapsed;
                break;

            case MessageBoxWindowButtonsType.YesNo:
                OkButton.Visibility        = Visibility.Collapsed;
                OkCancelButtons.Visibility = Visibility.Collapsed;
                YesNoButtons.Visibility    = Visibility.Visible;
                break;

            case MessageBoxWindowButtonsType.Ok:
            default:
                OkButton.Visibility        = Visibility.Visible;
                OkCancelButtons.Visibility = Visibility.Collapsed;
                YesNoButtons.Visibility    = Visibility.Collapsed;
                break;
            }
        }
コード例 #4
0
        private static void MessageBoxTypeTranslator(ViewModelMessageBoxType messageBoxType, out MessageBoxWindowType windowType, out MessageBoxWindowButtonsType buttonType)
        {
            windowType = MessageBoxWindowType.Information;
              buttonType = MessageBoxWindowButtonsType.Ok;

              switch (messageBoxType)
              {
            case ViewModelMessageBoxType.Question:
              windowType = MessageBoxWindowType.Question;
              buttonType = MessageBoxWindowButtonsType.YesNo;
              break;
            case ViewModelMessageBoxType.Warning:
              windowType = MessageBoxWindowType.Warning;
              break;
            case ViewModelMessageBoxType.Error:
              windowType = MessageBoxWindowType.Error;
              break;
            case ViewModelMessageBoxType.None:
            case ViewModelMessageBoxType.Information:
            default:
              break;
              }
        }
コード例 #5
0
 private void SetButtonsTypeVisibility(MessageBoxWindowButtonsType mode)
 {
     switch (mode)
       {
     case MessageBoxWindowButtonsType.OkCancel:
       OkButton.Visibility = Visibility.Collapsed;
       OkCancelButtons.Visibility = Visibility.Visible;
       YesNoButtons.Visibility = Visibility.Collapsed;
       break;
     case MessageBoxWindowButtonsType.YesNo:
       OkButton.Visibility = Visibility.Collapsed;
       OkCancelButtons.Visibility = Visibility.Collapsed;
       YesNoButtons.Visibility = Visibility.Visible;
       break;
     case MessageBoxWindowButtonsType.Ok:
     default:
       OkButton.Visibility = Visibility.Visible;
       OkCancelButtons.Visibility = Visibility.Collapsed;
       YesNoButtons.Visibility = Visibility.Collapsed;
       break;
       }
 }
コード例 #6
0
        public static bool?Show(string message, string detail, MessageBoxWindowType windowType, MessageBoxWindowButtonsType buttonType)
        {
            MessageBoxWindow window = new MessageBoxWindow();

            window.Message     = message;
            window.Detail      = detail;
            window.WindowType  = windowType;
            window.ButtonsType = buttonType;

            switch (windowType)
            {
            case MessageBoxWindowType.Information:
                window.Title = LanguageString.Find("Presentation_Windows_MessageBoxWindow_Information");
                break;

            case MessageBoxWindowType.Question:
                window.Title = LanguageString.Find("Presentation_Windows_MessageBoxWindow_Question");
                break;

            case MessageBoxWindowType.Warning:
                window.Title = LanguageString.Find("Presentation_Windows_MessageBoxWindow_Warning");
                break;

            case MessageBoxWindowType.Error:
                window.Title = LanguageString.Find("Presentation_Windows_MessageBoxWindow_Error");
                break;

            default:
                window.Title = LanguageString.Find("Presentation_Windows_MessageBoxWindow_Information");
                break;
            }

            return(window.ShowDialog());
        }
コード例 #7
0
        public static bool?Show(string message, string detail, MessageBoxWindowType windowType, MessageBoxWindowButtonsType buttonType, string title)
        {
            MessageBoxWindow window = new MessageBoxWindow();

            window.Title       = title;
            window.Message     = message;
            window.Detail      = detail;
            window.WindowType  = windowType;
            window.ButtonsType = buttonType;

            return(window.ShowDialog());
        }
コード例 #8
0
        private static void MessageBoxTypeTranslator(ViewModelMessageBoxType messageBoxType, out MessageBoxWindowType windowType, out MessageBoxWindowButtonsType buttonType)
        {
            windowType = MessageBoxWindowType.Information;
            buttonType = MessageBoxWindowButtonsType.Ok;

            switch (messageBoxType)
            {
            case ViewModelMessageBoxType.Question:
                windowType = MessageBoxWindowType.Question;
                buttonType = MessageBoxWindowButtonsType.YesNo;
                break;

            case ViewModelMessageBoxType.Warning:
                windowType = MessageBoxWindowType.Warning;
                break;

            case ViewModelMessageBoxType.Error:
                windowType = MessageBoxWindowType.Error;
                break;

            case ViewModelMessageBoxType.None:
            case ViewModelMessageBoxType.Information:
            default:
                break;
            }
        }