private void ExecuteOpenUserMessageCommand(UserMessageCommandParameter p) { var message = p.ViewModel; message.IsRead = true; message.IsChecked = true; NotifyPropertyChanged(UNREADMESSAGECOUNT); switch (p.Command) { case MessageCommand.OpenUrl: if (Web.Browse((string)p.Parameter)) { if (message.Flags.HasFlag(MessageFlags.IgnoreAfterOpen)) { _userSettings.IgnoreMessage(message.Message); } } break; case MessageCommand.OpenDialog: var dialogType = (Type)p.Parameter; var stat = Container.Resolve <IStatisticsViewModel>(); var d = FastActivator <IWorkHandler, IWindowManager, IStatisticsViewModel> .CreateInstance(dialogType, WorkHandler, WindowManager, stat) as Window; if (d.ShowDialog() == true) { _userSettings.IgnoreMessage(message.Message); } break; } }
private void ExecuteVisitWebsiteCommand(object sender, ExecutedRoutedEventArgs e) { Web.Browse(e.Parameter.ToString()); }