// -------------------------------------------------------------------- #region UI callbacks private void buttonImport_Click(object sender, System.EventArgs e) { if (mCurrentModel == null) return; if (mCurrentModel.HasMeshes) ImportMeshes(); if (!SupportFileFound) { OnyxProjectAsset asset = ProjectManager.Instance.Content.AddModel(mSupportFile.FilePath, true, mSupportFile); mSupportFile.Guid = asset.Guid; } AssetStreamLoader<ModelSupportData>.Save(mSupportFile, mSupportFile.FilePath); if (MessageBox.Show("Do you want to create an entity from the imported mesh?", "Create Entity", MessageBoxButtons.YesNo) == DialogResult.Yes) { CreateEntity(); } ProjectLoader.Save(); //LoadModel(mCurrentPath); }
private void toolStripButtonSaveProject_Click(object sender, EventArgs e) { EditorSceneUtils.Save(); ProjectLoader.Save(); Logger.Instance.Clear(); Logger.Instance.Append("Saved " + DateTime.Now.ToString()); UpdateFormTitle(); }
private void toolStripButtonImportModel_Click(object sender, EventArgs e) { if (ProjectManager.Instance.CurrentProjectPath.Length == 0) { ProjectLoader.Save(); } else { new ModelImporterWindow().Show(); } }
private void toolStripButtonNewProject_Click(object sender, EventArgs e) { var confirmResult = MessageBox.Show("Are you sure to start a new project?", "New Project", MessageBoxButtons.YesNo); if (confirmResult == DialogResult.Yes) { ProjectManager.Instance.New(); SceneManagement.New(); ProjectLoader.Save(); } }
private void MainWindow_FormClosed(object sender, FormClosedEventArgs e) { if (SceneManagement.ActiveScene.UnsavedChanges) { DialogResult result = MessageBox.Show("There are unsaved changes in the scene, do you want to save before closing?", "Unsaved Scene Changes", MessageBoxButtons.YesNo); if (result == DialogResult.Yes) { EditorSceneUtils.Save(); } } if (ProjectManager.Instance.IsDirty) { DialogResult result = MessageBox.Show("There are unsaved changes in the project, do you want to save before closing?", "Unsaved Project Changes", MessageBoxButtons.YesNo); if (result == DialogResult.Yes) { ProjectLoader.Save(); } } }
private void toolStripButtonSaveProject_Click(object sender, EventArgs e) { EditorSceneUtils.Save(); ProjectLoader.Save(); }