Exemplo n.º 1
0
        private void button3_Click(object sender, EventArgs e)
        {
            this.initButton();
            this.button3.BackColor = Color.FromArgb(95, 129, 174);
            CheckStudentsVolunteer cform = new CheckStudentsVolunteer();//实例化一个子窗口

            //设置子窗口不显示为顶级窗口
            cform.TopLevel = false;
            //设置子窗口的样式,没有上面的标题栏
            cform.FormBorderStyle = FormBorderStyle.None;
            //填充
            cform.Dock = DockStyle.Fill;
            //清空控件
            this.pnlCenter.Controls.Clear();
            //加入控件
            this.pnlCenter.Controls.Add(cform);
            //让窗体显示
            cform.Show();

//            try
//            {
//                this.initButton();
//                this.button3.BackColor = Color.FromArgb(95, 129, 174);
//                Monitor.Enter(this.lockObj);
//                if (!formSwitchFlag)
//                {
//                    formSwitchFlag = true;
//                    this.ShowForm(pnlCenter, form3);
//                    formSwitchFlag = false;
//                }
//                else
//                {
//                    return;
//                }
//            }
//#pragma warning disable CS0168 // 声明了变量“ex”,但从未使用过
//            catch (System.Exception ex)
//#pragma warning restore CS0168 // 声明了变量“ex”,但从未使用过
//            {
//                //
//            }
//            finally
//            {
//                Monitor.Exit(this.lockObj);
//            }
        }
Exemplo n.º 2
0
        private void Student_Load(object sender, EventArgs e)
        {
            Size size = new Size(1150, 620);  //第一个参数是宽度,第二个参数是高度

            this.Size            = size;
            pictureBox1.Image    = new Bitmap("../../img/横幅2.png");
            this.BackgroundImage = Image.FromFile("../../img/背景.jpg");
            this.IsMdiContainer  = true;

            this.TitleText = "教师端";

            form1 = HomePage.GetIntance;
            form2 = DPersonalInformationPreview.GetIntance;
            form3 = CheckStudentsVolunteer.GetIntance;
            form4 = MyStudents.GetIntance;
            form5 = DCheckNotification.GetIntance;
            form6 = DPersonalCenter.GetIntance;

            tabControl1.TabPages[0].Text = "使用步骤介绍";
            tabControl1.TabPages[1].Text = "通知";
            tabControl1.TabPages[2].Text = "动态";
            tabControl1.TabPages[3].Text = "注意事项";
            this.initButton();
        }