static public void EditProject(ProjectEditMode editMode) { //Warn! if (Ogmo.Levels.Count > 0 && Ogmo.Levels.Find(e => e.Changed) != null) { if (MessageBox.Show(MainWindow, "Warning: All levels must be closed if any changes to the project are made. You have unsaved changes in some open levels which will be lost. Still edit the project?", "Warning!", MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation) != DialogResult.OK) { return; } } //Disable the main window MainWindow.DisableEditing(); //Show the project editor ProjectEditor editor = new ProjectEditor(Project, editMode); editor.Show(MainWindow); }
public static void EditProject(ProjectEditMode editMode) { //Warn! if (Ogmo.Levels.Count > 0 && Ogmo.Levels.Find(e => e.Changed) != null) { if (MessageBox.Show(MainWindow, "Warning: All levels must be closed if any changes to the project are made. You have unsaved changes in some open levels which will be lost. Still edit the project?", "Warning!", MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation) != DialogResult.OK) return; } PluginLoader.FireUnloadProject(); //Disable the main window MainWindow.DisableEditing(); //Show the project editor ProjectEditor editor = new ProjectEditor(Project, editMode); editor.Show(MainWindow); }