Ejemplo n.º 1
0
        private void Form17_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 = XTeacherList.GetIntance;
            form3 = MyVolunteer.GetIntance;
            form4 = XPersonalInformationPreview.GetIntance;
            form5 = CheckMentor.GetIntance;
            form6 = XCheckNotification.GetIntance;
            form7 = XPersonalCenter.GetIntance;
            form8 = MyTeam.GetIntance;


            //初始化按钮
            this.initButton();
            tabControl1.TabPages[0].Text = "使用步骤介绍";
            tabControl1.TabPages[1].Text = "通知";
            tabControl1.TabPages[2].Text = "动态";
            tabControl1.TabPages[3].Text = "注意事项";
        }
Ejemplo n.º 2
0
        private void label1_Click(object sender, EventArgs e)
        {
            XPersonalCenter cform = new XPersonalCenter();//实例化一个子窗口

            //设置子窗口不显示为顶级窗口
            cform.TopLevel = false;
            //设置子窗口的样式,没有上面的标题栏
            cform.FormBorderStyle = FormBorderStyle.None;
            //填充
            cform.Dock = DockStyle.Fill;
            //清空控件
            this.pnlCenter.Controls.Clear();
            //加入控件
            this.pnlCenter.Controls.Add(cform);
            //让窗体显示
            cform.Show();
        }
Ejemplo n.º 3
0
        private void label1_Click(object sender, EventArgs e)
        {
            XPersonalCenter cform = new XPersonalCenter();//实例化一个子窗口

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

            //                Monitor.Enter(this.lockObj);
            //                if (!formSwitchFlag)
            //                {
            //                    formSwitchFlag = true;
            //                    this.ShowForm(pnlCenter, form7);
            //                    formSwitchFlag = false;
            //                }
            //                else
            //                {
            //                    return;
            //                }
            //            }
            //#pragma warning disable CS0168 // 声明了变量“ex”,但从未使用过
            //            catch (System.Exception ex)
            //#pragma warning restore CS0168 // 声明了变量“ex”,但从未使用过
            //            {
            //                //
            //            }
            //            finally
            //            {
            //                Monitor.Exit(this.lockObj);
            //            }
        }