public virtual void OnStatusViewAction(StatusClickEventArgs e) { if (e.Handled) { return; } if (e.Type == ActionType.ShowReplies) { FetchReply(e.Message); e.Handled = true; } else if (e.Type == ActionType.ReplyToThis) { if (MakeTweet != null) { MakeTweet(this, new MakeTweetEventArgs(e.Message)); } } else if (e.Type == ActionType.UserPrevious) { var prev = Messages.LastOrDefault(m => m.User.UserID == e.Message.User.UserID && m.Id < e.Message.Id); if (prev != null) { CurrentMessage = prev; } } else if (e.Type == ActionType.UserNext) { var next = Messages.FirstOrDefault(m => m.User.UserID == e.Message.User.UserID && m.Id > e.Message.Id); if (next != null) { CurrentMessage = next; } } }
private void StatusView_Action(object sender, StatusClickEventArgs e) { if (CurrentTimeline != null) { CurrentTimeline.OnStatusViewAction(e); } if (e.Handled) { return; } if (e.Type == ActionType.ShowImage) { imagePopup.Source = new Uri(e.ImageUri, UriKind.Absolute); } }
private void StatusView_Action(object sender, StatusClickEventArgs e) { if (e.Type == ActionType.ShowReplies) { TwitterMessage message = e.Message; FetchReply(message, (StatusView)sender); } else if (e.Type == ActionType.UserPrevious) { var previous = from m in messages where m.TwitterMessage.Id < e.Message.Id && m.TwitterMessage.User.UserID == e.Message.User.UserID orderby m.TwitterMessage.Id descending select m; if (previous.Count() > 0) { var prev = previous.First(); currentIndex = messages.IndexOf(prev); MoveToItem(currentIndex); } } else if (e.Type == ActionType.UserNext) { var next = from m in messages where m.TwitterMessage.Id > e.Message.Id && m.TwitterMessage.User.UserID == e.Message.User.UserID orderby m.TwitterMessage.Id select m; if (next.Count() > 0) { var nextmess = next.First(); currentIndex = messages.IndexOf(nextmess); MoveToItem(currentIndex); } } else if (e.Type == ActionType.RetweetUsernameClicked) { } else if (e.Type == ActionType.ReplyToThis) { makeTweet.InReplyTo = e.Message; makeTweet.StartReply(); } }
private void StatusView_ShowRepliesClicked(object sender, StatusClickEventArgs e) { TwitterMessage message = e.Message; FetchReply(message, (StatusView)sender); }