Exemplo n.º 1
0
        /// <summary>
        /// Loads a GB project
        /// </summary>
        private void LoadGbProject(string pFilename)
        {
            SetStatus("Loading project " + pFilename + " ...");
            try {
                //StartEmptyNewProject();
                this.mCurrentProject = GbProject.LoadFromFile(pFilename);
                this.mCurrentProject.LatestKnownFilename = pFilename;
            }
            catch (Exception) {
                StartEmptyNewProject();
            }

            ucLibView.SetLibrary(mCurrentProject.mLibraries[0]);
            foreach (Map vM in this.mCurrentProject.mMaps)
            {
                TabPage     vTP = new TabPage(vM.Name);
                UcMapEditor vME = new UcMapEditor();
                vME.CurrentMap  = vM;
                vME.CurrentTile = ucLibView.SelectedTile;
                vTP.Controls.Add(vME);
                vME.Dock = DockStyle.Fill;
                tabMaps.TabPages.Add(vTP);
                tabMaps.SelectedTab = vTP;

                vME.NewMap += new EventHandler(MapEditor_NewMap);
            }

            SetStatus("Loading project " + pFilename + " completed.");
        }
Exemplo n.º 2
0
        /// <summary>
        /// Loads a GB project
        /// </summary>
        private void LoadGbProject(string pFilename)
        {
            SetStatus("Loading project " + pFilename + " ...");
            try {
                //StartEmptyNewProject();
                this.mCurrentProject = GbProject.LoadFromFile(pFilename);
                this.mCurrentProject.LatestKnownFilename = pFilename;
            }
            catch (Exception) {
                StartEmptyNewProject();
            }

            LoadGbProject();

            SetStatus("Loading project " + pFilename + " completed.");
        }