public static bool?Show(string message, string title, bool showCancelButton, DialogWinImage image, UIElement relative) { DialogWin win = new DialogWin(); Window owner = FindTopWin(relative); win.Owner = owner; if (owner != null) { win.WindowStartupLocation = WindowStartupLocation.CenterOwner; } else { win.WindowStartupLocation = WindowStartupLocation.CenterScreen; } win.ViewModel.Content = message; win.ViewModel.Image = image; if (title != null) { win.ViewModel.Title = title; } win.ViewModel.ButtonCancelVisible = showCancelButton ? Visibility.Visible : Visibility.Collapsed; bool?flag = win.ShowDialog(); return(flag); }
public static void ShowError(string err) { DialogWin.Show(err, DialogWinImage.Error); }
public static void ShowWarning(string warning) { DialogWin.Show(warning, DialogWinImage.Warning); }
public static void ShowMessage(string msg) { DialogWin.Show(msg); }