Beispiel #1
0
        private void Menu_File_ExportBatchProject_Click(object sender, EventArgs e)
        {
            if (EditorManager.Project == null)
            return;

              // Close current scene(after saving)
              if (EditorManager.Scene != null)
              {
            if (EditorApp.PromptSaveScene() == DialogResult.Cancel)
              return;

            EditorManager.Scene.Close();
            UpdateToolbars();
              }

              string projectFile = EditorApp.Project.PathName;

              BatchExportDlg dialog = new BatchExportDlg();
              dialog.SelectedPath = Path.GetDirectoryName(EditorApp.Project.PathName);
              dialog.ShowDialog(this);
        }
Beispiel #2
0
        private void Menu_File_ExportBatchDirectory_Click(object sender, EventArgs e)
        {
            if (EditorManager.Project != null)
              {
            // Close current project (after saving)
            if (EditorApp.PromptSaveProject() == DialogResult.Cancel)
              return;

            //Close the project
            EditorManager.Project.Close();
            UpdateToolbars();
              }

              // Start from the checked out engine samples folder if possible
              string defaultPath = null;
              string sdkDir = System.Environment.GetEnvironmentVariable("VISION_SDK_DIR");

              if (sdkDir != null)
            defaultPath = Path.Combine(sdkDir, "EngineSamples\\Data\\Maps");

              // Dir does not exist? Try installed SDK path
              if (!Directory.Exists(defaultPath))
              {
            sdkDir = System.Environment.GetEnvironmentVariable("VISION_SDK");
            if(sdkDir != null)
              defaultPath = Path.Combine(sdkDir, "EngineSamples\\Data\\Maps");
              }

              // Dir does not exist? Set to null
              if (!Directory.Exists(defaultPath))
            defaultPath = null;

              BatchExportDlg dialog = new BatchExportDlg();
              dialog.SelectedPath = defaultPath;
              dialog.ShowDialog(this);
        }