private void Button_Click(object sender, RoutedEventArgs e)
        {
            var mainWindow = new TimetableWindow();

            mainWindow.Show();
            this.Close();
        }
Exemplo n.º 2
0
        private void Btn_GenerateTimeTable_Click(object sender, RoutedEventArgs e)
        {
            #region Ensures There is an adequate List of Courses before Generating
            int checkListCount = 0;
            int checkHallCount = 0;
            try
            {
                checkListCount = ImportCourses.CourseList.Count;
                checkHallCount = Halls.HallList.Count;
            }
            catch (Exception)
            {
                MessageBox.Show("Course List / Hall List is Empty", " GENERATION ERROR ");
                Btn_BrowseFile_Click(sender, e);
            }

            if ((checkListCount != 0 && checkListCount < checkHallCount) || (checkHallCount == 0))
            {
                MessageBox.Show("Course List Must Be 12 Above to Generate Time Table", " GENERATION ERROR ");
            }
            else
            {
                //btn_GenerateTimeTable.IsEnabled = true;
                var timeTableWindow = new TimetableWindow();
                timeTableWindow.Show();
                this.Close();
            }

            #endregion
        }