예제 #1
0
 public TweetViewModel()
 {
     if (TwitterToken.IsAvailableToken())
     {
         UserInfomation = TwitterUser.GetUserInfomation(App.Usertoken);
     }
 }
예제 #2
0
        /*
         * private void GridChange(object visibility) {
         *  if (SettingVisibility.CompareTo(visibility) == 0)
         *      System.Diagnostics.Debug.WriteLine(visibility.ToString());
         *
         *  if (ToolsVisibility.Equals(visibility))
         *      System.Diagnostics.Debug.WriteLine("ahaga");
         *
         *  System.Diagnostics.Debug.WriteLine(SettingVisibility.CompareTo(visibility));
         *
         *  System.Diagnostics.Debug.WriteLine(ToolsVisibility.CompareTo(visibility));
         *  try
         *  {
         *      if (SettingVisibility.Equals(visibility))
         *      {
         *
         *      }
         *
         *  }
         *  catch(Exception e)
         *  {
         *      App.ShowErrorMessage(e);
         *  }
         * }*/

        private void PostTweet(object parameter = null)
        {
            if (TwitterToken.IsAvailableToken())
            {
                TweetWindowInstance.Show();
            }
            else
            {
                GetToken();
            }
        }
예제 #3
0
        public void StartStream(object paramter = null)
        {
            if (TwitterToken.IsAvailableToken())
            {
                stream = new TwitterUserStream();

                stream.StartStreaming(App.Usertoken, (status) =>
                                      App.Current.Dispatcher.Invoke(() => TimeLineList.Insert(0, status)));
                new WpfMessageBox("Streaming を開始しました", System.Windows.MessageBoxButton.OK).ShowDialog();
            }
            else
            {
                TwitterToken.GetToken();
            }
        }