public TweetViewModel() { if (TwitterToken.IsAvailableToken()) { UserInfomation = TwitterUser.GetUserInfomation(App.Usertoken); } }
/* * 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(); } }
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(); } }