public static void CommandHandler(object target, ExecutedRoutedEventArgs ea) { ea.Handled = true; var mainWindow = (MainWindow)Application.Current.MainWindow; var tweet = (Tweet)ea.Parameter ?? mainWindow.Timeline.GetSelectedTweet; var link = TimelineController.TweetLink(tweet); OpenLinkCommand.Command.Execute(link, mainWindow); }
private void OnOpenTweetLink(Tweet tweet) { var link = TimelineController.TweetLink(tweet); Process.Start(new ProcessStartInfo(link)); }