public static Level Load(FileInfo filePath) { var level = DiskStorage.LoadFromDisk <Level>(filePath.FullName); level.FilePath = filePath.FullName; return(level); }
private void LoadProjectFile(string fileName) { // user chose a file CurrentProjectFile = fileName; // open the ProjectConfiguration var projectConfiguration = DiskStorage.LoadFromDisk <ProjectConfiguration>(fileName) ?? new ProjectConfiguration(); Project = new Project(projectConfiguration); }
public static Level Load(string levelName) { var temp = new Level() { Name = levelName }; temp = DiskStorage.LoadFromDisk <Level>(temp.FilePath); return(temp); }
private void ReadProject(string fileName) { var config = new ProjectConfiguration(); // user chose a file CurrentProjectFile = fileName; // open the ProjectConfiguration var projectConfiguration = DiskStorage.LoadFromDisk <ProjectConfiguration>(fileName); if (projectConfiguration != null) { Project = new Project(projectConfiguration); UpdateUserInterface(); } }