public static void Show(Window owner, string message) { SnakeBar snake = new SnakeBar(owner); //snake.EnableOkButton(); //snake.Background = new SolidColorBrush(Color.FromRgb(183, 28, 28)); snake.ShowMessage(message); }
public static void ShowException(Window owner, Exception ex, string message) { SnakeBar snake = new SnakeBar(owner); snake.ShowButton = true; snake.ButtonContent = "详情"; snake.ButtonClick += (p1, p2) => { TaskDialog.ShowWithDetail(owner, ex.Message, "错误", ex.ToString(), Microsoft.WindowsAPICodePack.Dialogs.TaskDialogStandardIcon.Error); }; snake.Background = new SolidColorBrush(Color.FromRgb(183, 28, 28)); snake.ShowMessage(message); }