public static CourseProxy New(string name) { if (!CourseLoader.GetAllCoursewares().Contains(name)) { var cd = CourseLoader.NewCourseware(name); if (cd.Title.IsNotNullAndEmpty()) { var proxy = new CourseProxy(); proxy.CoursewareData = cd; return(proxy); } } return(null); }
public static CourseProxy Open(string name) { if (CourseLoader.GetAllCoursewares().Contains(name)) { var cd = CourseLoader.OpenCourseware(name); if (cd != null) { var proxy = new CourseProxy(); proxy.CoursewareData = cd; proxy.LoadCourseware(); return(proxy); } } return(null); }
public void Save() { CourseLoader.SaveCourseware(CoursewareData); }