private void ButtonAuthor_Click(object sender, RoutedEventArgs e) { QuoteFmItem item = this.DataContext as QuoteFmItem; if (item != null) { UserInterface.ShowUser showUser = new ShowUser(); showUser.setPerson(item.Author); showUser.Show(); } }
private void buttonTweetIt_Click(object sender, RoutedEventArgs e) { QuoteFmItem item = this.DataContext as QuoteFmItem; if (item != null) { UserInterface.ComposeNewTweet newTweetWindow = new ComposeNewTweet(); newTweetWindow.textBoxTweet.textBoxContent.Text = item.QuotedText + " " + item.ArticleLink; newTweetWindow.Show(); } }
private void buttonFacebook_Click(object sender, RoutedEventArgs e) { QuoteFmItem item = this.DataContext as QuoteFmItem; if (item != null) { UserInterface.Facebook.ComposeNewStatus newFbWindows = new UserInterface.Facebook.ComposeNewStatus(AppController.Current.AllFacebookAccounts.First()); newFbWindows.textBoxMessage.Text = item.QuotedText; newFbWindows.textBoxLink.Text = item.ArticleLink; newFbWindows.Show(); } }
private void ButtonReadArticle_Click(object sender, RoutedEventArgs e) { QuoteFmItem item = this.DataContext as QuoteFmItem; if (item != null) { try { System.Diagnostics.Process.Start(item.ArticleLink); } catch (Exception exp) { AppController.Current.sendNotification("Error", "Opening link failed", "While tryping to open the link Windows failed with following message: " + exp.Message, null, null); AppController.Current.Logger.writeToLogfile(exp); } } }