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