public void FromVegas(Vegas vegas) { myVegas = vegas; String projectPath = myVegas.Project.FilePath; if (String.IsNullOrEmpty(projectPath)) { String dir = System.Environment.GetFolderPath(System.Environment.SpecialFolder.MyDocuments); defaultBasePath = Path.Combine(dir, defaultBasePath); } else { String dir = Path.GetDirectoryName(projectPath); String fileName = Path.GetFileNameWithoutExtension(projectPath); defaultBasePath = Path.Combine(dir, fileName + "_"); } DialogResult result = ShowBatchRenderDialog(); myVegas.UpdateUI(); if (DialogResult.OK == result) { // inform the user of some special failure cases String outputFilePath = FileNameBox.Text; RenderMode renderMode = RenderMode.Project; if (RenderRegionsButton.Checked) { renderMode = RenderMode.Regions; } else if (RenderSelectionButton.Checked) { renderMode = RenderMode.Selection; } DoBatchRender(SelectedTemplates, outputFilePath, renderMode); } }
public void FromVegas(Vegas vegas) { myVegas = vegas; String myDocDirectory = System.Environment.GetFolderPath(System.Environment.SpecialFolder.MyDocuments); String inputFileDirectory = Path.Combine(myDocDirectory, _defaultInputDirectory); String inputFilePath = Path.Combine(inputFileDirectory, _defaultInputFileName); String projectPath = myVegas.Project.FilePath; if (String.IsNullOrEmpty(projectPath)) { String dir = System.Environment.GetFolderPath(System.Environment.SpecialFolder.MyDocuments); defaultBasePath = Path.Combine(dir, defaultBasePath); } else { String dir = Path.GetDirectoryName(projectPath); String fileName = Path.GetFileNameWithoutExtension(projectPath); defaultBasePath = Path.Combine(dir, fileName + "_"); } if (_writeAllRenderers) { WriteAvailableRenderers(inputFileDirectory); } ArrayList lookup = ReadInputFile(inputFilePath); ArrayList selectedTemplates = FindMatchingTemplates(lookup); if (selectedTemplates.Count == 0) { MessageBox.Show("No templates found."); return; } DoBatchRender(selectedTemplates, defaultBasePath, _renderMode); string soundFile = Path.Combine(inputFileDirectory, "EndSound.wav"); if (File.Exists(soundFile)) { (new SoundPlayer(soundFile)).Play(); } else { SystemSounds.Asterisk.Play(); SystemSounds.Asterisk.Play(); } }
public void FromVegas(Vegas vegas) { myVegas = vegas; String myDocDirectory = System.Environment.GetFolderPath(System.Environment.SpecialFolder.MyDocuments); String inputFileDirectory = Path.Combine(myDocDirectory, _defaultInputDirectory); String inputFilePath = Path.Combine(inputFileDirectory, _defaultInputFileName); String projectPath = myVegas.Project.FilePath; if (String.IsNullOrEmpty(projectPath)) { String dir = System.Environment.GetFolderPath(System.Environment.SpecialFolder.MyDocuments); defaultBasePath = Path.Combine(dir, defaultBasePath); } else { String dir = Path.GetDirectoryName(projectPath); String fileName = Path.GetFileNameWithoutExtension(projectPath); defaultBasePath = Path.Combine(dir, fileName + "_"); } if (_writeAllRenderers) WriteAvailableRenderers(inputFileDirectory); ArrayList lookup = ReadInputFile(inputFilePath); ArrayList selectedTemplates = FindMatchingTemplates(lookup); if (selectedTemplates.Count == 0) { MessageBox.Show("No templates found."); return; } DoBatchRender(selectedTemplates, defaultBasePath, _renderMode); string soundFile = Path.Combine(inputFileDirectory, "EndSound.wav"); if (File.Exists(soundFile)) { (new SoundPlayer(soundFile)).Play(); } else { SystemSounds.Asterisk.Play(); SystemSounds.Asterisk.Play(); } }