/// <summary> /// The received tweet. /// </summary> /// <param name="t"> /// The t. /// </param> private void ReceivedTweet(Tweet t) { if (ActiveTweets.Contains(t.Id)) { return; } ActiveTweets.Add(t.Id); var td = new ModTweet(t); this.AddTweetToModPanelAsync(td); }
/// <summary> /// The add tweet to mod panel async. /// </summary> /// <param name="t"> /// The t. /// </param> private void AddTweetToModPanelAsync(ModTweet t) { if (this.InvokeRequired) { this.Invoke(new AddTweetToModPanelAsyncDelegate(this.AddTweetToModPanelAsync), new object[] { t }); return; } this.flowLayoutPanel1.Controls.Add(t); }