Esempio n. 1
0
        /// <summary>
        /// 构造方法
        /// </summary>
        public MainForm()
        {
            InitializeComponent();

            //主窗体容器打开
            this.IsMdiContainer = true;

            this.TitleText = "管理员";

            //实例化子窗体界面
            form1  = TeachersList.GetIntance;
            form2  = StudentList.GetIntance;
            form3  = AddTeacherInformation.GetIntance;
            form4  = AddStudentInformation.GetIntance;
            form5  = HomePage.GetIntance;
            form6  = Notice.GetIntance;
            form7  = CheckNotification.GetIntance;
            form9  = ViewResults.GetIntance;
            form8  = Setting.GetIntance;
            form10 = PersonalCenter.GetIntance;
            form11 = Matching.GetIntance;
            form12 = MatchingFailure.GetIntance;

            //初始化按钮
            this.initButton();
        }
Esempio n. 2
0
        private void btmatch_Click(object sender, EventArgs e)//第一轮一键匹配
        {
            ad_ServicesBLL bLL = new ad_ServicesBLL();
            DialogResult   dr  = MessageBox.Show(bLL.match(), "提示", MessageBoxButtons.OKCancel);

            if (dr == DialogResult.OK)
            {
                ViewResults cform = new ViewResults(); //实例化一个子窗口
                                                       //设置子窗口不显示为顶级窗口
                cform.TopLevel = false;
                //设置子窗口的样式,没有上面的标题栏
                cform.FormBorderStyle = FormBorderStyle.None;
                //填充
                cform.Dock = DockStyle.Fill;
                //清空控件
                this.Controls.Clear();
                //加入控件
                this.Controls.Add(cform);
                //让窗体显示
                cform.Show();
                //跳转页面
            }
            else
            {
                //
            }
            //获取学生的对象数组
            sx_student[] sx_Students = new sx_student[50];
            sx_Students = Keepinformation.sx_Students;
            //获取教师的对象数组
            sx_teacher[] sx_Teachers = new sx_teacher[20];
            sx_Teachers = Keepinformation.sx_Teachers;
        }
Esempio n. 3
0
        private void button9_Click(object sender, EventArgs e)
        {
            this.initButton();
            this.button9.BackColor = Color.FromArgb(95, 129, 174);
            ViewResults cform = new ViewResults();//实例化一个子窗口

            //设置子窗口不显示为顶级窗口
            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.button9.BackColor = Color.FromArgb(95, 129, 174);
            //                Monitor.Enter(this.lockObj);
            //                if (!formSwitchFlag)
            //                {
            //                    formSwitchFlag = true;
            //                    this.ShowForm(pnlCenter, form9);
            //                    formSwitchFlag = false;
            //                }
            //                else
            //                {
            //                    return;
            //                }
            //            }
            //#pragma warning disable CS0168 // 声明了变量“ex”,但从未使用过
            //            catch (System.Exception ex)
            //#pragma warning restore CS0168 // 声明了变量“ex”,但从未使用过
            //            {
            //                //
            //            }
            //            finally
            //            {
            //                Monitor.Exit(this.lockObj);
            //            }
        }