public FrmMain() { InitializeComponent(); //IsolatedStorageManager.GetManager().Store.DeleteFile(Literals.C_ACCOUNT_FILE); //assignments m_sbbSelected = sbbTimeline; //object creation m_ftTweetForm = new FrmTweet(this); m_fpPrefForm = new FrmPreferences(); //timeline event hookups tmlTimeline.StatusTextClicked += new Timeline.StatusTextClickedHandler(tmlTimeline_StatusTextClicked); tmlTimeline.RetweetClicked += new Timeline.StatusOptionClickedHandler(tmlTimeline_RetweetClicked); tmlTimeline.FavoriteClicked += new Timeline.StatusOptionClickedHandler(tmlTimeline_FavoriteClicked); tmlTimeline.QuoteTweetClicked += new Timeline.StatusOptionClickedHandler(tmlTimeline_QuoteTweetClicked); tmlTimeline.ReplyClicked += new Timeline.StatusOptionClickedHandler(tmlTimeline_ReplyClicked); //preference form event hookups m_fpPrefForm.CredentialsAdded += new FrmAddAccount.OAuthDanceHandler(m_fpPrefForm_CredentialsAdded); m_fpPrefForm.CredentialsRemoved += new FrmPreferences.CredentialsRemovedHandler(m_fpPrefForm_CredentialsRemoved); m_fpPrefForm.AccountList = TwitterController.GetController().Accounts; //form event hookups m_ftTweetForm.TweetClicked += new FrmTweet.TweetClickedEventHandler(m_ftTweetForm_TweetClicked); tsbTimelineScroller.Scroll += new ScrollEventHandler(tsbTimelineScroller_Scroll); tmlTimeline.ScrolledToTop = true; if (m_twController.Accounts.Count == 0) { tmlTimeline.DisableLoadingAnimation(); } //@TODO: do this for testing purposes only if (Literals.C_ENVIRONMENT == Env.Development) { UserTimeline utLine = new UserTimeline(JsonParser.GetParser().ParseFile("../../../../Documents/test/tweets/tweets2.json").Root.ToList()); for (int i = 0; i < utLine.Statuses.Count; i++) { Account_UserStream_Receive(this, new JsonDocument(utLine.Statuses[i].Object), API.Streaming.UserStream.ReceiveType.Tweet); } } }
public FrmMain() { InitializeComponent(); //IsolatedStorageManager.GetManager().Store.DeleteFile(Literals.C_ACCOUNT_FILE); //assignments m_sbbSelected = sbbTimeline; //object creation m_ftTweetForm = new FrmTweet(this); m_fpPrefForm = new FrmPreferences(); //timeline event hookups tmlTimeline.StatusTextClicked += new Timeline.StatusTextClickedHandler(tmlTimeline_StatusTextClicked); tmlTimeline.RetweetClicked += new Timeline.StatusOptionClickedHandler(tmlTimeline_RetweetClicked); tmlTimeline.FavoriteClicked += new Timeline.StatusOptionClickedHandler(tmlTimeline_FavoriteClicked); tmlTimeline.QuoteTweetClicked += new Timeline.StatusOptionClickedHandler(tmlTimeline_QuoteTweetClicked); tmlTimeline.ReplyClicked += new Timeline.StatusOptionClickedHandler(tmlTimeline_ReplyClicked); //preference form event hookups m_fpPrefForm.CredentialsAdded += new FrmAddAccount.OAuthDanceHandler(m_fpPrefForm_CredentialsAdded); m_fpPrefForm.CredentialsRemoved += new FrmPreferences.CredentialsRemovedHandler(m_fpPrefForm_CredentialsRemoved); m_fpPrefForm.AccountList = TwitterController.GetController().Accounts; //form event hookups m_ftTweetForm.TweetClicked += new FrmTweet.TweetClickedEventHandler(m_ftTweetForm_TweetClicked); tsbTimelineScroller.Scroll += new ScrollEventHandler(tsbTimelineScroller_Scroll); tmlTimeline.ScrolledToTop = true; if (m_twController.Accounts.Count == 0) tmlTimeline.DisableLoadingAnimation(); //@TODO: do this for testing purposes only if (Literals.C_ENVIRONMENT == Env.Development) { UserTimeline utLine = new UserTimeline(JsonParser.GetParser().ParseFile("../../../../Documents/test/tweets/tweets2.json").Root.ToList()); for (int i = 0; i < utLine.Statuses.Count; i++) Account_UserStream_Receive(this, new JsonDocument(utLine.Statuses[i].Object), API.Streaming.UserStream.ReceiveType.Tweet); } }