예제 #1
0
        public frmSchedule()
        {
            InitializeComponent();
            year    = System.DateTime.Now.Year;
            plan    = new AcademicYear[1];
            mainDB  = CourseDB.LoadDB();
            plan[0] = AcademicYear.LoadYear(year);

            if (mainDB == null)
            {
                mainDB = new CourseDB(1000);
                mainDB.SaveDB();
            }

            if (plan[0] == null)
            {
                plan[0] = new AcademicYear(year);
                plan[0].SaveYear();
            }

            plan[0].Fall.PopulateListBox(lbxFall);
            plan[0].Winter.PopulateListBox(lbxWinter);
            plan[0].Spring.PopulateListBox(lbxSpring);
            plan[0].Summer.PopulateListBox(lbxSummer);
            mainDB.PopulateListBox(lbxAvailable);
            yearIndex = 0;
        }
예제 #2
0
        public frmBuilder()
        {
            InitializeComponent();

            if ((mainDB = CourseDB.LoadDB()) == null)
            {
                mainDB = new CourseDB(1000);
                mainDB.SaveDB();
            }

            mainDB.PopulateListBox(lbxCList);
        }
예제 #3
0
 private void cmdSwitch_Click(object sender, System.EventArgs e)
 {
     (new frmBuilder()).ShowDialog(); // Blocking
     mainDB = CourseDB.LoadDB();
     mainDB.PopulateListBox(lbxAvailable);
 }