internal static MessageChoice Show(Window parent, MessageIcon icon, string title, string content, MessageChoice choices, string help, bool enableDontAsk, MessageChoice defaultChoice) { var window = new DialogViewModel(); window.ShowDialog(parent, icon, title, content, choices, help, enableDontAsk, defaultChoice); return(window.Result); }
public MessageBoxResult ShowMessageBox(string message, string caption = "", MessageBoxButton button = MessageBoxButton.OK, MessageBoxImage image = MessageBoxImage.None, bool enableDontAsk = false, string help = "", MessageChoice defaultChoice = MessageChoice.OK) { var parent = Dialog.ActiveModalWindow; var choices = GetMessageChoice(button); var icon = MessageIconsMaps[image]; var result = DialogViewModel.Show(parent, icon, caption, message, choices, help, enableDontAsk, defaultChoice); if (MessageOptionsMaps.ContainsKey(result)) { return(MessageOptionsMaps[result]); } return(MessageBoxResult.None); }
internal static MessageChoice Show(Window parent, MessageIcon icon, string title, string content, MessageChoice choices, string help, bool enableDontAsk, MessageChoice defaultChoice) { var window = new DialogViewModel(); window.ShowDialog(parent, icon, title, content, choices, help, enableDontAsk, defaultChoice); return window.Result; }