Exemple #1
0
 private void frmRDPMain_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (this.splitContainer1.Panel1.Controls[0] is frmServerList)
     {
         frmServerList serverFrm = this.splitContainer1.Panel1.Controls[0] as frmServerList;
         serverFrm.SaveServerList();
     }
 }
Exemple #2
0
        /// <summary>
        /// Set Initialize
        /// </summary>
        public void SetInitialize()
        {
            this.SetInnerDoubleBuffered((Control)this, true);

            // set the Mode of Drawing as Owner Drawn
            this.tabControl1.DrawMode = TabDrawMode.OwnerDrawFixed;

            this.tabControl1.ItemSize = new Size(80, 20);
            this.tabControl1.SizeMode = TabSizeMode.Fixed;

            // Add the Handler to draw the Image on Tab Pages
            this.tabControl1.DrawItem += TabControl1_DrawItem;

            frmServerList serverFrm = new frmServerList();

            serverFrm.TopLevel = false;
            serverFrm.Dock     = DockStyle.Fill;
            serverFrm.ServerItemDoubleClicked += new Common.Definition.EventHandler.ServerListDoubleClickEventHandler(this.ServerListDoubleClicked);

            this.splitContainer1.Panel1.Controls.Add(serverFrm);
            serverFrm.Show();
        }