Exemplo n.º 1
0
 public Project newProject()
 {
     if (project != null)
     {
         project.close();
     }
     project = new Project();
     if (eventHandler != null)
     {
         eventHandler(this, TYPE.NEW, "project");
     }            
     return project;
 }
Exemplo n.º 2
0
 public void openProject(string fileName)
 {
     Project obj;
     var s = new DataContractJsonSerializer(typeof(Project));
     using (FileStream file = new FileStream(fileName, FileMode.Open))
     {
         obj = (Project) s.ReadObject(file);
     }
     if(project!=null) {
         project.close();
     }
     project = obj;
     if (eventHandler != null)
     {
         eventHandler(this, TYPE.NEW, "project");
     }
 }