示例#1
0
 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);
 }
示例#2
0
 private void Start()
 {
     doOnceNew.OnExit += () =>
     {
         proxy = CourseProxy.New("set");
     };
     doOnceOpen.OnExit += () =>
     {
         proxy = CourseProxy.Open("set");
     };
     doOnceSave.OnExit += () =>
     {
         proxy.Save();
     };
 }
示例#3
0
 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);
 }