//方法 public static MapProject LoadMapProject(string projectpath) { try { FileStream fs = new FileStream(projectpath, FileMode.Open); BinaryFormatter formatter = new BinaryFormatter(); MapProject mappro = (MapProject)formatter.Deserialize(fs); return(mappro); }catch (Exception e) { return(null); } }
public static MapProject CreateMapProject(string projectname) { MapProject mappro = new MapProject(projectname); return(mappro); }