Exemplo n.º 1
0
        private void addDefaultTrackersToolStripMenuItem_Click(object sender, EventArgs e)
        {
            using (frmAddTracker frm = new frmAddTracker(_profile.TrackerURIs))
            {
                if (frm.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
                {
                    List <Uri> uriList = frm.TrackerUriList;

                    foreach (Uri uri in uriList)
                    {
                        TrackerClient tracker = _chat.AddTracker(uri);
                        if (tracker != null)
                        {
                            ListViewItem item = new ListViewItem(tracker.TrackerUri.AbsoluteUri);
                            item.Tag = tracker;

                            item.SubItems.Add("");
                            item.SubItems.Add("updating...");
                            item.SubItems.Add("0");

                            lock (lstTrackerInfo.Items)
                            {
                                lstTrackerInfo.Items.Add(item);
                            }
                        }
                    }
                }
            }
        }
Exemplo n.º 2
0
        private void addTrackerToolStripMenuItem_Click(object sender, EventArgs e)
        {
            using (frmAddTracker frm = new frmAddTracker())
            {
                if (frm.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
                {
                    List<Uri> uriList = frm.TrackerUriList;

                    foreach (Uri uri in uriList)
                    {
                        TrackerClient tracker = _chat.AddTracker(uri);
                        if (tracker != null)
                        {
                            ListViewItem item = new ListViewItem(tracker.TrackerUri.AbsoluteUri);
                            item.Tag = tracker;

                            item.SubItems.Add("");
                            item.SubItems.Add("updating...");
                            item.SubItems.Add("0");

                            lock (lstTrackerInfo.Items)
                            {
                                lstTrackerInfo.Items.Add(item);
                            }
                        }
                    }
                }
            }
        }