Exemplo n.º 1
0
        private void CloseOutShowTabPage(TabPage page)
        {
            RemoteDesktopPanel desktopPanel = page.Controls[0] as RemoteDesktopPanel;

            desktopPanel.DisConnect();
            desktopPanel.CloseShowFormDirectly = true;
            desktopPanel.ShowForm.CloseForm();
            this.outTabPages.Remove(page.Name);
        }
Exemplo n.º 2
0
        private void CloseShowInTabPage(TabPage page)
        {
            RemoteDesktopPanel desktopPanel = page.Controls[0] as RemoteDesktopPanel;

            if (desktopPanel != null)
            {
                desktopPanel.DisConnect();
                this.ClosePage(page);
            }
        }
Exemplo n.º 3
0
        private void CreateDesktopPage(string broadcasterID)
        {
            if (this.InvokeRequired)
            {
                this.Invoke(new CbGeneric <string>(this.CreateDesktopPage), broadcasterID);
            }
            else
            {
                TabPage page = new TabPage();
                page.Text       = broadcasterID + "的桌面";
                page.Name       = broadcasterID;
                page.ImageIndex = 2;
                RemoteDesktopPanel desktopPanel = new RemoteDesktopPanel();
                desktopPanel.Initialize(page);
                desktopPanel.HidePageEvent += new CbGeneric <TabPage>(desktopPanel_HidePageEvent);
                desktopPanel.ShowPageEvent += new CbGeneric <string>(desktopPanel_ShowPageEvent);
                desktopPanel.Dock           = DockStyle.Fill;

                page.Controls.Add(desktopPanel);
                this.tabControl1.TabPages.Add(page);
                this.tabControl1.SelectedIndex = this.tabControl1.TabPages.Count - 1;
                desktopPanel.Connect(broadcasterID);
            }
        }
Exemplo n.º 4
0
        private void CreateDesktopPage(string broadcasterID)
        {
            if (this.InvokeRequired)
            {
                this.Invoke(new CbGeneric<string>(this.CreateDesktopPage), broadcasterID);
            }
            else
            {
                TabPage page = new TabPage();
                page.Text = broadcasterID + "的桌面";
                page.Name = broadcasterID;
                page.ImageIndex = 2;
                RemoteDesktopPanel desktopPanel = new RemoteDesktopPanel();
                desktopPanel.Initialize(page);
                desktopPanel.HidePageEvent += new CbGeneric<TabPage>(desktopPanel_HidePageEvent);
                desktopPanel.ShowPageEvent += new CbGeneric<string>(desktopPanel_ShowPageEvent);
                desktopPanel.Dock = DockStyle.Fill;

                page.Controls.Add(desktopPanel);
                this.tabControl1.TabPages.Add(page);
                this.tabControl1.SelectedIndex = this.tabControl1.TabPages.Count - 1;
                desktopPanel.Connect(broadcasterID);
            }
        }