private void deleteTheCourseFromLibrary(string courseId) { AttandanceLibrary lib = libHall.libraryRef; if (lib.containsCourse(courseId)) { Model.Course course = lib[courseId]; lib.removeCourse(course); GlobalStation.shareInstance.librarySave(null, delegate() { lib.addCourse(course); }); libHall.contentInit(); } }
private void modifyInfo() { AttandanceLibrary lib = libHall.libraryRef; lib.name = nameTextBox.text; lib.password = pswBox.text; if (!Helper.IsNullOrWhiteSpace(remarkBox.text)) { lib.remarks = remarkBox.text; } else { lib.remarks = "作者什么都没留下"; } GlobalStation.shareInstance.librarySave(delegate() { libHall.contentInit(); }, null); Close(); }