コード例 #1
0
        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();
            }
        }
コード例 #2
0
        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();
            }
        }
コード例 #3
0
        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();
            }
        }
コード例 #4
0
        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);
                }
            }
        }