コード例 #1
0
        public static Level Load(FileInfo filePath)
        {
            var level = DiskStorage.LoadFromDisk <Level>(filePath.FullName);

            level.FilePath = filePath.FullName;

            return(level);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        public static Level Load(string levelName)
        {
            var temp = new Level()
            {
                Name = levelName
            };

            temp = DiskStorage.LoadFromDisk <Level>(temp.FilePath);

            return(temp);
        }
コード例 #4
0
        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();
            }
        }