Exemplo n.º 1
0
        private void CreateTabPage(ClientData item)
        {
            if (InvokeRequired)
            {
                Invoke(
                    new CreateTabPageDelegate(CreateTabPage),
                    item);
            }
            else
            {
                TabPage tp = new TabPage(item.ClientName);
                tp.Tag = item;

                UCChatControl uc = new UCChatControl();

                tp.Controls.Add(uc);
                uc.Location = new Point(0, 0);
                uc.Dock = DockStyle.Fill;
                uc.CData = item;
                _ucChatControls.Add(item.ClientID, uc);

                tabControl1.TabPages.Add(tp);
            }
        }
        private void CreateTabPage(ClientData item)
        {
            if (InvokeRequired)
            {
                Invoke(
                    new CreateTabPageDelegate(CreateTabPage),
                    item);
            }
            else
            {
                TabPage tp = new TabPage(item.ClientName);
                tp.Tag = item;

                UCChatControl uc = new UCChatControl();

                tp.Controls.Add(uc);
                uc.Location = new Point(0, 0);
                uc.Dock     = DockStyle.Fill;
                uc.CData    = item;
                _ucChatControls.Add(item.ClientID, uc);

                tabControl1.TabPages.Add(tp);
            }
        }