private void Button_Click_1(object sender, RoutedEventArgs e) { Button button = sender as Button; if (button != null) { Person person = button.CommandParameter as Person; if (person != null) { UserInterface.ComposeNewTweet composeWindow = new UserInterface.ComposeNewTweet(); composeWindow.isDirectMessage(person.Username); composeWindow.Show(); } } }
private void buttonMention_Click(object sender, RoutedEventArgs e) { Button button = sender as Button; if (button != null) { Person person = button.CommandParameter as Person; if (person != null) { UserInterface.ComposeNewTweet composeWindow = new UserInterface.ComposeNewTweet(); composeWindow.textBoxTweet.textBoxContent.Text = "@" + person.Username + " "; composeWindow.Show(); } } }
void menuItemTraditionalRetweet_Click(object sender, RoutedEventArgs e) { MenuItem menuItem = sender as MenuItem; if (menuItem != null) { TwitterItem item = this.DataContext as TwitterItem; if (item != null) { UserInterface.ComposeNewTweet composeWindow = new UserInterface.ComposeNewTweet(); composeWindow.textBoxTweet.Text = "RT @" + item.Author.Username + " " + item.Text; AccountTwitter account = AppController.Current.getAccountForId(item.accountId); if (account != null) { composeWindow.selectAccount(account); } composeWindow.Show(); } } }