protected virtual void Dispose(bool disposing) { if (disposing) { AtNameLabel = null; datelabel = null; replyBtn = null; TweetBlock = null; tweetImg = null; contextmenu = null; dbUser = null; ID = null; imageborder = null; label1 = null; messagePolygon = null; name = null; NameLabel = null; parent = null; polyOpacity = 0; replyBtn = null; replyimageborder = null; Status = null; tweetelementgrid = null; DM_Element = null; } }
public void FillHome(TwitterStatus status, UserDatabase.User _usr) { if (status.InReplyToScreenName == UsrDB.Users.Find(u => u.UserDetails.ScreenName == _usr.UserDetails.ScreenName).UserDetails.ScreenName) { FillMentions(status, _usr); } TweetElement element; if (UsrDB.Users.Count > 1) { element = new TweetElement(this, status, _usr, ImageCache.GetImage(status.User.Id, status.User.ProfileImageLocation), true); } else { element = new TweetElement(this, status, _usr, ImageCache.GetImage(status.User.Id, status.User.ProfileImageLocation)); } element.polyOpacity = polygonOpacity; this.TweetElements.Items.Insert(0, element); if (this.TweetElements.Items.Count > o3o.Properties.Settings.Default.amountOfTWeetsToDisplay) { TweetElement el = (TweetElement)this.TweetElements.Items[this.TweetElements.Items.Count - 1]; this.TweetElements.Items.Remove(el); el.Dispose(); } }
void o3o_NewTweet(TwitterStatus status, UserDatabase.User _usr) { dostuffdel = new dostuff(FillHome); maindispatcher.Invoke(dostuffdel, new object[] { status, _usr }); dostuffdel = new dostuff(Notification); maindispatcher.Invoke(dostuffdel, new object[] { status, _usr }); }
private void listView_accounts_SelectedIndexChanged(object sender, EventArgs e) { UserDatabase.User usr = UsrDB.Users.Find(u => u.UserDetails.ScreenName == listView_accounts.FocusedItem.Text); label_AccountInfo.Text = "User info:\n\n" + string.Format("Created on: {0}\n", usr.CreationDate.ToLongDateString()) + string.Format("Screen name: {0}\n", usr.UserDetails.ScreenName) + string.Format("User tokens: \n\tToken:{0}\n\tToken secret:{1}\n", usr.UserDetails.Token, usr.UserDetails.TokenSecret) + string.Format("User ID: {0}", usr.UserDetails.UserId) ; }
public TweetStack(UserDatabase.User OAuth) { privOAuth = OAuth; Twitter = new TwitterInteraction(privOAuth); //and attempt to load the keys from setting //If that gone well, and streaming tweets were requested, try initialize streaming tweets. Twitterizer.Streaming.StreamOptions Streamopts = new Twitterizer.Streaming.StreamOptions(); Streamopts.UseCompression = false; Streamopts.Count = 0; StartStream(Streamopts); }
private void prefetch(UserDatabase.User usr) { TwitterStatusCollection prefetch = usr.tweetStack.Twitter.GetTweets(); foreach (TwitterStatus status in prefetch) { TweetElement element = new TweetElement(this, status, usr, ImageCache.GetImage(status.User.Id, status.User.ProfileImageLocation)); element.polyOpacity = polygonOpacity; this.TweetElements.Items.Add(element); if (this.TweetElements.Items.Count > o3o.Properties.Settings.Default.amountOfTWeetsToDisplay) { TweetElement el = (TweetElement)this.TweetElements.Items[this.TweetElements.Items.Count - 1]; this.TweetElements.Items.Remove(el); el.Dispose(); } } TwitterStatusCollection prefetchMentions = usr.tweetStack.Twitter.GetMentions(); foreach (TwitterStatus status in prefetchMentions) { TweetElement element = new TweetElement(this, status, usr, ImageCache.GetImage(status.User.Id, status.User.ProfileImageLocation)); element.polyOpacity = polygonOpacity; this.TweetMentions.Items.Add(element); if (this.TweetElements.Items.Count > o3o.Properties.Settings.Default.amountOfTWeetsToDisplay) { TweetElement el = (TweetElement)this.TweetMentions.Items[this.TweetMentions.Items.Count - 1]; this.TweetMentions.Items.Remove(el); el.Dispose(); } } TwitterDirectMessageCollection fetchmessages = usr.tweetStack.Twitter.GetMessages(); foreach (TwitterDirectMessage message in fetchmessages) { DMElement element = new DMElement(this, message, usr, ImageCache.GetImage(message.SenderId, message.Sender.ProfileImageLocation)); element.polyOpacity = polygonOpacity; this.TweetMessages.Items.Add(element); if (this.TweetMessages.Items.Count > o3o.Properties.Settings.Default.amountOfTWeetsToDisplay) { DMElement el = (DMElement)this.TweetMessages.Items[this.TweetMessages.Items.Count - 1]; this.TweetMessages.Items.Remove(el); el.Dispose(); } } }
public DMElement(MainWindow1 prnt, TwitterDirectMessage status, UserDatabase.User usr, ImageSource Imagesource, bool MoreThanOneUser = false) { InitializeComponent(); dbUser = usr; moreusers = MoreThanOneUser; name = status.Sender.ScreenName; tweetImg.Source = Imagesource; ID = status.Id.ToString(); Status = status; parent = prnt; SolidColorBrush gBrush = new SolidColorBrush(Color.FromArgb((byte)(polyOpacity * 255), 0, 0, 0)); messagePolygon.Fill = gBrush; }
public TweetElement(dynamic prnt, TwitterStatus status, UserDatabase.User usr) { InitializeComponent(); dbUser = usr; name = status.User.ScreenName; Date = status.CreatedDate.Month.ToString() + "/" + status.CreatedDate.Day.ToString() + " " + status.CreatedDate.Hour.ToString() + ":" + status.CreatedDate.Minute.ToString(); imagelocation = status.User.ProfileImageLocation; ID = status.Id.ToString(); Status = status; datelabel.Text = Date; parent = prnt; SolidColorBrush gBrush = new SolidColorBrush(Color.FromArgb((byte)(polyOpacity * 255), 0, 0, 0)); messagePolygon.Fill = gBrush; }
public DMElement(dynamic prnt, TwitterDirectMessage DM, UserDatabase.User usr) { InitializeComponent(); dbUser = usr; Tweet = DM.Text; name = DM.Sender.ScreenName; Date = DM.CreatedDate.Month.ToString() + "/" + DM.CreatedDate.Day.ToString() + " " + DM.CreatedDate.Hour.ToString() + ":" + DM.CreatedDate.Minute.ToString(); imagelocation = DM.Sender.ProfileImageLocation; ID = DM.Id.ToString(); DirectMessage = DM; TweetBlock.Text = Tweet; datelabel.Text = Date; parent = prnt; SolidColorBrush gBrush = new SolidColorBrush(Color.FromArgb((byte)(polyOpacity*255),0,0,0)); messagePolygon.Fill = gBrush; }
public void Notification(TwitterStatus status, UserDatabase.User _usr) { if (o3o.Properties.Settings.Default.ShowNotificationPopup) { notify notification = new notify(this); TweetElement element; if (UsrDB.Users.Count > 1) { element = new TweetElement(this, status, _usr, ImageCache.GetImage(status.User.Id, status.User.ProfileImageLocation), true); } else { element = new TweetElement(this, status, _usr, ImageCache.GetImage(status.User.Id, status.User.ProfileImageLocation)); } element.polyOpacity = polygonOpacity; notification.content.Items.Add(element); playsound(); } }
void o3o_NewDM(TwitterDirectMessage DM, UserDatabase.User _usr) // PLZ CHECK IF WORK { DMElement element; if (UsrDB.Users.Count > 1) { element = new DMElement(this, DM, _usr, ImageCache.GetImage(DM.Sender.Id, DM.Sender.ProfileImageLocation), true); } else { element = new DMElement(this, DM, _usr, ImageCache.GetImage(DM.Sender.Id, DM.Sender.ProfileImageLocation)); } element.polyOpacity = polygonOpacity; this.TweetMessages.Items.Add(element); if (this.TweetMessages.Items.Count > o3o.Properties.Settings.Default.amountOfTWeetsToDisplay) { TweetElement el = (TweetElement)this.TweetMessages.Items[this.TweetMessages.Items.Count - 1]; this.TweetMessages.Items.Remove(el); el.Dispose(); } }
public TweetElement(MainWindow1 prnt, TwitterStatus status, UserDatabase.User usr, ImageSource Imagesource, bool MoreThanOneUser = false) { InitializeComponent(); dbUser = usr; moreusers = MoreThanOneUser; name = status.User.ScreenName; tweetImg.Source = Imagesource; ID = status.Id.ToString(); Status = status; favBtn.MouseDown += new MouseButtonEventHandler(favBtn_MouseDown); if (status.Retweeted != true) { retweetBtn.MouseDown += new MouseButtonEventHandler(retweetBtn_MouseDown); } parent = prnt; SolidColorBrush gBrush = new SolidColorBrush(Color.FromArgb((byte)(polyOpacity * 255), 0, 0, 0)); messagePolygon.Fill = gBrush; }
void o3o_FetchTweets(UserDatabase.User usr) { fetch = new FetchTweets(prefetch); maindispatcher.Invoke(fetch, new object[] { usr }); }
protected virtual void Dispose(bool disposing) { if (disposing) { AtNameLabel = null; datelabel = null; favBtn = null; replyBtn = null; retweetBtn = null; TweetBlock = null; tweetImg = null; contextmenu = null; dbUser = null; favimageborder = null; ID = null; imageborder = null; label1 = null; messagePolygon = null; name = null; NameLabel = null; parent = null; polyOpacity = 0; replyBtn = null; replyimageborder = null; retweetBtn = null; retweetimageborder = null; Status = null; tweetelementgrid = null; tweetElement = null; } }
public TwitterInteraction(UserDatabase.User _oauth) { privOAuth = _oauth; }