/// <summary> /// 反序列化课程表,得到存储的Schedule课程表信息 /// </summary> public void DeSerializeSche() { using (FileStream fread = new FileStream(@"d:\Course/" + StuNo + "/info.data", FileMode.Open)) { BinaryFormatter formatter = new BinaryFormatter(); Sche = (CourseSchedule)formatter.Deserialize(fread); } }
/// <summary> /// 检查课程组是否与已选课程冲突 /// </summary> public bool check(List <Course> L) { CourseSchedule temp = new CourseSchedule(); temp.statetable = this.statetable; foreach (Course C in L) { if (temp.check(C) == false) { return(false); } else { temp.addCourse(C); } } return(true); }