public Project newProject()
 {
     if (project != null)
     {
         project.close();
     }
     project = new Project();
     if (eventHandler != null)
     {
         eventHandler(this, TYPE.NEW, "project");
     }            
     return project;
 }
 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");
     }
 }