Пример #1
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            _twitterSettings = Helper.LoadSetting<TwitterAccess>(Constants.TwitterAccess);
            if (_twitterSettings == null) return;

            ((ApplicationBarIconButton)ApplicationBar.Buttons[0]).IsEnabled = !String.IsNullOrEmpty(_twitterSettings.AccessToken) && !String.IsNullOrEmpty(_twitterSettings.AccessTokenSecret);

            var detailItem = Helper.LoadSetting<TweetPageData>(Constants.TweetPageFileName);
            if (detailItem != null)
            {
                TweetTextBox.Content = detailItem.Tweet;

                var tweetPage = new TweetPageData
                {
                    Tweet = ""
                };

                // Save the detailpage object which the detailpage will load up
                Helper.SaveSetting(Constants.TweetPageFileName, tweetPage);
            }
        }
Пример #2
0
        private void SendDirectMessageClick(object sender, EventArgs e)
        {
            var tweetPage = new TweetPageData
            {
                Tweet = String.Format("d {0} ", _detailItem.UserName),
            };

            Helper.SaveSetting(Constants.TweetPageFileName, tweetPage);

            NavigationService.Navigate(new Uri("/Pages/TweetPage.xaml", UriKind.Relative));
        }
Пример #3
0
        private void RetweetClick(object sender, EventArgs e)
        {
            var tweetPage = new TweetPageData
            {
                Tweet = String.Format("RT @{0} {1}", _detailItem.UserName, _detailItem.Text)
            };

            // Save the detailpage object which the detailpage will load up
            Helper.SaveSetting(Constants.TweetPageFileName, tweetPage);

            NavigationService.Navigate(new Uri("/Pages/TweetPage.xaml", UriKind.Relative));
        }