public static MessageBoxResult Show(String txt, String title, MessageBoxButton buttons, MessageBoxImage imgs) { WinMessageBox msg = new WinMessageBox(txt, title, buttons, imgs); msg.ShowDialog(); return(msg.ReturnResult); }
public static void MyMessageBox(string title, string message, string messageImage = "Stop.png", bool ok = true) { var myMessageBox = new WinMessageBox { Message = message, MessageTitle = title, MessageImage = messageImage }; if (!ok) { myMessageBox.BtnOk.Visibility = Visibility.Hidden; myMessageBox.BtnYes.Visibility = Visibility.Visible; myMessageBox.BtnNo.Visibility = Visibility.Visible; } myMessageBox.ShowDialog(); YesNo = myMessageBox.YesNo; Ok = myMessageBox.Ok; }