public void ShowCreateVoiceActingScriptWizard()
{
List<WizardPage> pages = new List<WizardPage>();
CreateVoiceActingScriptPage mainPage = new CreateVoiceActingScriptPage();
mainPage.SelectedFilePath = Path.Combine(_agsEditor.CurrentGame.DirectoryPath, "VoiceSpeech.txt");
pages.Add(mainPage);
WizardDialog dialog = new WizardDialog("Voice Acting Script", "This wizard will guide you through creating a voice acting script. This script is a text file that you can supply to your voice actors containing a list of lines that they need to record.", pages);
DialogResult result = dialog.ShowDialog();
if (result == DialogResult.OK)
{
try
{
_agsEditor.SaveGameFiles();
CompileMessages results = (CompileMessages)BusyDialog.Show("Please wait while your script is created...", new BusyDialog.ProcessingHandler(CreateVoiceActingScriptProcess), mainPage.SelectedFilePath);
Factory.GUIController.ShowOutputPanel(results);
if (results.HasErrors)
{
Factory.GUIController.ShowMessage("There were errors creating the voice acting script. See the output window for details.", MessageBoxIcon.Warning);
}
else
{
Factory.GUIController.ShowMessage("Voice acting script created successfully.", MessageBoxIcon.Information);
}
}
catch (Exception ex)
{
Factory.GUIController.ShowMessage("There was an error creating the voice acting script. The error was: " + ex.Message + Environment.NewLine + Environment.NewLine + "Error details: " + ex.ToString(), MessageBoxIcon.Warning);
}
}
dialog.Dispose();
}