Esempio n. 1
0
        public void addInternetCircle(System.Net.IPEndPoint[] endpoints, string url, UI.JoinCircleForm.CircleType circleType)
        {
            for (int i = 0; i < windowToolStrip.Items.Count; i++)
            {
                if (windowToolStrip.Items[i].Tag is UI.CirclePanel)
                {
                    if (((UI.CirclePanel)windowToolStrip.Items[i].Tag).url.ToLower() == url.ToLower())
                    {
                        select((ToolStripButton)windowToolStrip.Items[i]);
                        return;
                    }
                }
            }
            TabPage p = new TabPage("Internet Circle");

            if (url.StartsWith("#"))
            {
                p.Text = url;
            }
            else
            {
                string s = url;
                if (s.Contains("//"))
                {
                    s = s.Substring(s.IndexOf("//") + 2);
                }
                if (s.Contains("/"))
                {
                    s = s.Substring(0, s.IndexOf("/"));
                }
                p.Text = s;
            }
            UI.CirclePanel c = new UI.CirclePanel(url, circleType);
            c.Dock = DockStyle.Fill;

            addOrSelectPanel(p.Text, c, url);
        }
Esempio n. 2
0
 void joinLANCircle()
 {
     UI.CirclePanel c = new UI.CirclePanel();
     c.Dock = DockStyle.Fill;
     addOrSelectPanel("LAN", c, "LAN");
 }