Example #1
0
 private void metaListView_ItemActivate(object sender, EventArgs e)
 {
     if (metaListView.SelectedIndices.Count > 0)
     {
         var lvi   = metaListView.Items[metaListView.SelectedIndices[0]];
         var match = lvi.Tag;
         // i wish i had pattern matching here!
         if (match is Types.Application)
         {
             var app = (Types.Application)match;
             Process.Start("iexplore", app.Website);
         }
         else if (match is Types.Tag)
         {
             var tag = (Types.Tag)match;
             var tf  = new TimelineForm(_ac, tag.ToString(), TimelineForm.TAG_TIMELINE_ROUTE_PREFIX + tag.Name);
             tf.Show();
         }
         // TODO: AccountForm
         else if (match is Types.Mention)
         {
             var mention = (Types.Mention)match;
             var af      = new AccountForm(_ac, mention);
             af.Show();
         }
         else if (match is Types.Account)
         {
             var account = (Types.Account)match;
             var af      = new AccountForm(_ac, account);
             af.Show();
         }
     }
 }
Example #2
0
        private void localPublicTumelineMenuItem_Click(object sender, EventArgs e)
        {
            var qs = new QueryString();

            qs.Add("local", "true");

            var tf = new TimelineForm(_ac, "Local Timeline", PUBLIC_TIMELINE_ROUTE, qs);

            tf.Show();
        }
Example #3
0
        private void tagTimelineMenuItem_Click(object sender, EventArgs e)
        {
            var tag = Microsoft.VisualBasic.Interaction
                      .InputBox("Enter a hashtag's name.",
                                "View Hashtag Timeline", "", 0, 0);

            tag = tag.Trim().TrimStart('#').Trim();

            if (!string.IsNullOrEmpty(tag))
            {
                var tagRoute = string.Format("{0}{1}",
                                             TAG_TIMELINE_ROUTE_PREFIX,
                                             QueryString.EscapeUriDataStringRfc3986(tag));
                var tf = new TimelineForm(_ac, "#" + tag, tagRoute);
                tf.Show();
            }
        }
Example #4
0
        private void publicTimelineMenuItem_Click(object sender, EventArgs e)
        {
            var tf = new TimelineForm(_ac, "Federated Timeline", PUBLIC_TIMELINE_ROUTE);

            tf.Show();
        }