Beispiel #1
0
        /// <summary>
        /// Add UCWelcome screen in the control collection of <c>this.splitContainer1.Panel2</c>
        /// Focus on the welcome screen.
        /// Keep a reference to the new added control, that will be used later.
        /// The reference are stored in the global variable <c>this.welcomeScreen</c>
        /// </summary>
        private void AddWelcomeScreen()
        {
            TabPage welcomeTab = tBSI.TabPages["Welcome"];
            #if DEBUG

            if (welcomeTab != null)
            {
                welcomeTab.Controls.Add(wb);
                wb.Visible = true;
                wb.ScriptErrorsSuppressed = true;
                wb.Dock = DockStyle.Fill;
                wb.BringToFront();
            }
            #else
            this.welcomeScreen = new UCWelcome();

            if (welcomeTab != null) {

                //webBrowser1.Visible = false;
                //panel1.Controls.Add(this.welcomeScreen);

                //welcomeScreen.AutoSize = true;
                //welcomeScreen.AutoSizeMode = AutoSizeMode.GrowAndShrink;
                //welcomeScreen.Dock = DockStyle.Top;
                //panel1.AutoScroll = true;
                //welcomeScreen.BringToFront();
            }

            // focus on welcome screen, sending back the tab control.
            this.splitContainer1.Panel2.Controls[0].SendToBack();
            #endif
            //TabControlEx ntc = new TabControlEx();
            //ntc.Width = 200;
            //ntc.Height = 300;
            //ntc.TabPages.Add("asdasd");
            //ntc.TabPages.Add("23 45 56");

            //tBSI.TabPages[0].Controls.Add(ntc);
            //ntc.BringToFront();
        }
Beispiel #2
0
 /// <summary>
 /// Remove the welcome screen from the control collection of <c>this.splitContainer1.Panel2</c>
 /// </summary>
 public void RemoveWelcomeScreen()
 {
     if (this.welcomeScreen != null)
     {
         this.splitContainer1.Panel2.Controls.Remove(this.welcomeScreen);
     }
     this.welcomeScreen = null;
 }