예제 #1
0
        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);
        }
예제 #2
0
파일: Ogmo.cs 프로젝트: hach-que/OgmoEditor
        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);
        }