Example #1
0
        private void DataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.ColumnIndex == dataGridView1.Columns["导师姓名"].Index)
            {
                //点击导师姓名查看导师信息
                DPersonalInformationPreview dPersonalInformation = new DPersonalInformationPreview(teacher.TeaNo)
                {
                    TopLevel        = false,
                    FormBorderStyle = FormBorderStyle.None,
                    Dock            = DockStyle.Fill
                };
                //dPersonalInformation.teaNo = teacher.TeaNo;
                this.Controls.Clear();
                this.Controls.Add(dPersonalInformation);
                dPersonalInformation.Show();
            }

            /*else if (e.ColumnIndex == dataGridView1.Columns["操作1"].Index)
             * {
             *  //点击选择弹出志愿序号进行选择
             *  //dataGridView1.Rows[e.RowIndex].DefaultCellStyle.BackColor = Color.Blue;//点击后该行颜色改变
             *  dataGridView1["操作1", e.RowIndex].Value = "已选择";
             * }
             * else if (e.ColumnIndex == dataGridView1.Columns["操作2"].Index)
             * {
             *  dataGridView1["操作1", e.RowIndex].Value = "选择";
             * }*/
        }
Example #2
0
 private void DataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.ColumnIndex == dataGridView1.Columns["导师姓名"].Index)
     {
         //点击导师姓名查看导师信息
         DPersonalInformationPreview dPersonalInformation = new DPersonalInformationPreview(teacher.TeaNo)
         {
             TopLevel        = false,
             FormBorderStyle = FormBorderStyle.None,
             Dock            = DockStyle.Fill
         };
         //dPersonalInformation.teaNo = teacher.TeaNo;
         this.Controls.Clear();
         this.Controls.Add(dPersonalInformation);
         dPersonalInformation.Show();
     }
 }
Example #3
0
        private void button2_Click(object sender, EventArgs e)
        {
            this.initButton();
            this.button2.BackColor = Color.FromArgb(95, 129, 174);
            DPersonalInformationPreview cform = new DPersonalInformationPreview();//实例化一个子窗口

            //设置子窗口不显示为顶级窗口
            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.button2.BackColor = Color.FromArgb(95, 129, 174);
//                Monitor.Enter(this.lockObj);
//                if (!formSwitchFlag)
//                {
//                    formSwitchFlag = true;
//                    this.ShowForm(pnlCenter, form2);
//                    formSwitchFlag = false;
//                }
//                else
//                {
//                    return;
//                }
//            }
//#pragma warning disable CS0168 // 声明了变量“ex”,但从未使用过
//            catch (System.Exception ex)
//#pragma warning restore CS0168 // 声明了变量“ex”,但从未使用过
//            {
//                //
//            }
//            finally
//            {
//                Monitor.Exit(this.lockObj);
//            }
        }
Example #4
0
 private void dataGridView1_CellContentClick_1(object sender, DataGridViewCellEventArgs e)
 {
     teacher.TeaNo = dataGridView1["工号", 0].Value.ToString();
     if (e.ColumnIndex == dataGridView1.Columns["TeaName"].Index)
     {
         DPersonalInformationPreview dPersonalInformation = new DPersonalInformationPreview(teacher.TeaNo)
         {
             TopLevel        = false,
             FormBorderStyle = FormBorderStyle.None,
             Dock            = DockStyle.Fill
         };
         //dPersonalInformation.teaNo = teacher.TeaNo;
         this.Controls.Clear();
         this.Controls.Add(dPersonalInformation);
         dPersonalInformation.Show();
     }
     else if (e.ColumnIndex == dataGridView1.Columns["Control"].Index)
     {
         MessageBox.Show("test");
     }
 }
Example #5
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();
        }