示例#1
0
 private void button3_Click(object sender, EventArgs e)
 {
     readin_site_environment ss = new readin_site_environment();
     ss.Show();
 }
示例#2
0
        private void tabControl1_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (tabControl1.SelectedTab.Name == "tabPage1")
            {
                readin_site rsf = new readin_site();
                rsf.TopLevel = false;
                tabPage1.Controls.Add(rsf);
                //tabControl1.TabPages.Add(tabPage1); 动态添加tabPage时加入此行并调整窗体
                rsf.Parent = tabControl1.TabPages["tabPage1"];
                rsf.FormBorderStyle = FormBorderStyle.None;
                rsf.Dock = System.Windows.Forms.DockStyle.Fill;
                rsf.Show();

            }
            else if (tabControl1.SelectedTab.Name == "tabPage2")
            {
                readin_pollution rpf = new readin_pollution();
                rpf.TopLevel = false;
                tabPage2.Controls.Add(rpf);
                rpf.Parent = tabControl1.TabPages["tabPage2"];
                rpf.FormBorderStyle = FormBorderStyle.None;
                rpf.Dock = System.Windows.Forms.DockStyle.Fill;
                rpf.Show();
            }
            else if (tabControl1.SelectedTab.Name == "tabPage3")
            {
                readin_site_environment rse = new readin_site_environment();
                rse.TopLevel = false;
                rse.Parent = tabControl1.TabPages["tabPage3"];
                rse.FormBorderStyle = FormBorderStyle.None;
                rse.Dock = System.Windows.Forms.DockStyle.Fill;
                rse.Show();
            }
            else if (tabControl1.SelectedTab.Name  == "tabPage4")
            {
                risk_accessment ras = new risk_accessment();
                ras.TopLevel = false;
                ras.Parent = tabControl1.TabPages["tabPage4"];
                ras.FormBorderStyle = FormBorderStyle.None;
                ras.Dock = System.Windows.Forms.DockStyle.Fill;
                ras.Show();
            }
            else if (tabControl1.SelectedTab.Name == "tabPage5")
            {
                map mp = new map();
                mp.TopLevel = false;
                mp.Parent = tabControl1.TabPages["tabPage5"];
                mp.FormBorderStyle = FormBorderStyle.None;
                mp.Dock = System.Windows.Forms.DockStyle.Fill;
                mp.Show();

            }
            else if (tabControl1.SelectedTab.Name == "tabPage6")
            {
                media_doc mdf = new media_doc();
                mdf.TopLevel = false;
                mdf.Parent = tabControl1.TabPages["tabPage6"];
                mdf.FormBorderStyle = FormBorderStyle.None;
                mdf.Dock = System.Windows.Forms.DockStyle.Fill;
                mdf.Show();
            }
            else if (tabControl1.SelectedTab.Name == "tabPage7")
            {
                webBrowser2.Navigate("http://www.basechem.org/");
                webBrowser2.ObjectForScripting = this;
            }
        }