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(); }
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(); }
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; } }
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; } }
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()); }
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()); }