예제 #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();
         }
     }
 }
예제 #2
0
        private void followingBox_ItemActivate(object sender, EventArgs e)
        {
            var account = followingBox.SelectedItems.FirstOrDefault();

            if (account != null)
            {
                var af = new AccountForm(_ac, account);
            }
        }