コード例 #1
0
        public void LoadProjectList()
        {
            if (new FileInfo("projects.list").Exists == false)
            {
                SaveProjectList();
            }
            Projs.Clear();
            var fs = new FileStream("projects.list", FileMode.Open, FileAccess.Read);
            var r  = new BinaryReader(fs);
            int pc = r.ReadInt32();

            for (int i = 0; i < pc; i++)
            {
                var pl = new ProjectLink()
                {
                    Name = r.ReadString(),
                    Path = r.ReadString(),
                    Info = r.ReadString()
                };
                Projs.Add(pl);
            }
            r.Close();
            r  = null;
            fs = null;

            RebuildUI();
        }
コード例 #2
0
        // Create New Project and add to system.
        public void CreateProject(string path, string name, string info)
        {
            ProjectLink np = new ProjectLink
            {
                Name = name,
                Path = path,
                Info = info
            };

            Directory.CreateDirectory(path + "/Content/");
            Directory.CreateDirectory(path + "/Scripts/");
            Directory.CreateDirectory(path + "/Content/3D/");
            Directory.CreateDirectory(path + "/Content/2D/");
            Directory.CreateDirectory(path + "/Content/Sound/");
            Directory.CreateDirectory(path + "/Content/Movie/");
            Directory.CreateDirectory(path + "/Content/Scene/");
            Directory.CreateDirectory(path + "/Content/Material/");
            Projs.Add(np);
            SaveProjectList();
            LoadProjectList();
        }
コード例 #3
0
 public void LoadProject(ProjectLink p)
 {
     Process.Start("VividSplash.exe", p.Path);
     Environment.Exit(-1);
 }