private void ShowMessageInner(string title, string message, NotificationMessageFlags flags) { if (_notificationMessage != null) _notificationMessage.Close(); _notificationMessage = new NotificationMessage(title, message, flags); _notificationMessage.ShowDialog(); }
public NotificationMessage(string title, string message, NotificationMessageFlags flags) { if (Application.Current.MainWindow.IsVisible) Owner = Application.Current.MainWindow; DataContext = this; InitializeComponent(); Message.Text = message; Title = title; if (flags.HasFlag(NotificationMessageFlags.NonClosable)) { CloseButtonVisibility = Visibility.Collapsed; } else { Loaded += OnLoaded; } }
public NotificationMessage(string title, string message, NotificationMessageFlags flags) { if (Application.Current.MainWindow.IsVisible) { Owner = Application.Current.MainWindow; } DataContext = this; InitializeComponent(); Message.Text = message; Title = title; if (flags.HasFlag(NotificationMessageFlags.NonClosable)) { CloseButtonVisibility = Visibility.Collapsed; } else { Loaded += OnLoaded; } }
public void ShowMessage(string title, string message, NotificationMessageFlags flags = NotificationMessageFlags.None) { UIThread.Run(() => ShowMessageInner(title, message, flags)); }
public void ShowMessage(string title, string message, NotificationMessageFlags flags = NotificationMessageFlags.None) { Console.WriteLine("[{0}Message] Title: {1}, Text: {2}", flags == NotificationMessageFlags.NonClosable ? "Open " : string.Empty, title, message); }