Esempio n. 1
0
        private void refreshListButton_Click(object sender, EventArgs e)
        {
            CourseStatisticsForm courseStatisticsForm = new CourseStatisticsForm();


            if (mainForm == null)
            {
                mainForm = new MainForm();
                mainForm.Show();
            }
            else
            {
                mainForm.Activate();
            }
            courseStatisticsForm.MdiParent = mainForm;

            courseStatisticsForm.Show();
        }
        //private void viewCourseScheduleToolStripMenuItem_Click(object sender, EventArgs e)
        //{
        //    //view course schedule
        //    if (viewClassScheduleForm == null)
        //    {
        //        viewClassScheduleForm = new ViewClassScheduleForm();
        //        viewClassScheduleForm.MdiParent = this;

        //        viewClassScheduleForm.FormClosed += delegate(object o, FormClosedEventArgs args)
        //        {
        //            viewClassScheduleForm = null;
        //        };

        //        viewClassScheduleForm.Show();
        //    }
        //    else
        //    {
        //        viewClassScheduleForm.Activate();
        //    }
        //}
        private void courseStatisticsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //view course schedule
            if (courseStatisticsForm == null)
            {
                courseStatisticsForm           = new CourseStatisticsForm();
                courseStatisticsForm.MdiParent = this;

                courseStatisticsForm.FormClosed += delegate(object o, FormClosedEventArgs args)
                {
                    courseStatisticsForm = null;
                };

                courseStatisticsForm.Show();
            }
            else
            {
                courseStatisticsForm.Activate();
            }
        }