public void UnloadProject() { this.m_Project = null; this.m_Level = null; this.RecheckMenuEligibility(); }
public void LoadProject(Project project) { this.m_Project = project; this.RecheckMenuEligibility(); }
public void NewProject(Project project) { }
/* * Ogmo event Callbacks */ private void onProjectStart(Project project) { //Enable menu items newProjectToolStripMenuItem.Enabled = false; openProjectToolStripMenuItem.Enabled = false; closeProjectToolStripMenuItem.Enabled = true; editProjectToolStripMenuItem.Enabled = true; levelToolStripMenuItem.Enabled = true; viewToolStripMenuItem.Enabled = true; }
public void EditProject(Project project, AddTabCallback addTab) { TabPage tab = new TabPage("Protogame"); tab.Controls.Add(new ProjectEditorTab(this, project) { Dock = DockStyle.Fill }); addTab(tab); }
private void onProjectClose(Project project) { //Disable menu items newProjectToolStripMenuItem.Enabled = true; openProjectToolStripMenuItem.Enabled = true; closeProjectToolStripMenuItem.Enabled = false; editProjectToolStripMenuItem.Enabled = false; levelToolStripMenuItem.Enabled = false; viewToolStripMenuItem.Enabled = false; //Clear mouse/grid readouts MouseCoordinatesLabel.Text = GridCoordinatesLabel.Text = ""; }
public void CloneFrom(Project copy) { //Default project properties OgmoVersion = copy.OgmoVersion; Name = copy.Name; BackgroundColor = copy.BackgroundColor; GridColor = copy.GridColor; Filename = copy.Filename; LevelDefaultSize = copy.LevelDefaultSize; LevelMinimumSize = copy.LevelMinimumSize; LevelMaximumSize = copy.LevelMaximumSize; AngleMode = copy.AngleMode; CameraEnabled = copy.CameraEnabled; CameraSize = copy.CameraSize; ExportCameraPosition = copy.ExportCameraPosition; CustomPluginEntries = copy.CustomPluginEntries; //Definitions CustomPluginEntries = new SerializableDictionary<string, string>(); foreach (var d in copy.CustomPluginEntries) CustomPluginEntries.Add(d.Key, d.Value); LevelValueDefinitions = new List<ValueDefinition>(); foreach (var d in copy.LevelValueDefinitions) LevelValueDefinitions.Add(d.Clone()); LayerDefinitions = new List<LayerDefinition>(); foreach (var d in copy.LayerDefinitions) LayerDefinitions.Add(d.Clone()); Tilesets = new List<Tileset>(); foreach (var d in copy.Tilesets) Tilesets.Add(d.Clone()); EntityDefinitions = new List<EntityDefinition>(); foreach (var d in copy.EntityDefinitions) EntityDefinitions.Add(d.Clone()); }
public static void UpdateRecentProjects(Project project) { for (int i = 0; i < Properties.Settings.Default.RecentProjects.Count; i++) { if (Properties.Settings.Default.RecentProjects[i] == project.Filename) { Properties.Settings.Default.RecentProjects.RemoveAt(i); Properties.Settings.Default.RecentProjectNames.RemoveAt(i); break; } } Properties.Settings.Default.RecentProjects.Insert(0, project.Filename); Properties.Settings.Default.RecentProjectNames.Insert(0, project.Name); if (Properties.Settings.Default.RecentProjects.Count > RECENT_PROJECT_LIMIT) { Properties.Settings.Default.RecentProjects.RemoveAt(RECENT_PROJECT_LIMIT); Properties.Settings.Default.RecentProjectNames.RemoveAt(RECENT_PROJECT_LIMIT); } }
public static void StartProject(Project project) { Ogmo.MainWindow.RemoveStartPage(); Project = project; //Call the added event if (OnProjectStart != null) OnProjectStart(project); }
/* * Project stuff */ public static void NewProject() { Project = new Project(); Project.InitDefault(); if (Project.SaveAs()) { StartProject(Project); EditProject(ProjectEditMode.NewProject); } PluginLoader.FireNewProject(Project); }