Ejemplo n.º 1
0
        public void JorgeMethod(string srtPath, string outFolderPath)
        {
            var tuple = ScriptParser.ParseSrtFile(srtPath);

            ProjectInfo.CaptionList = tuple.Item1;
            CaptionList = tuple.Item1;

            ProjectInfo.SpeakerSet = tuple.Item2;
            SpeakerSet = tuple.Item2;

            EnactXMLWriter.WriteCaptions(CaptionList, outFolderPath + @"\dialogues.xml");
            EnactXMLWriter.WriteSpeakers(SpeakerSet, outFolderPath + @"\speakers.xml");
            EnactXMLWriter.WriteSettings(Settings, outFolderPath + @"\Settings.xml");
        }
Ejemplo n.º 2
0
        private void saveProjectToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //Write Project and Engine files
            EnactXMLWriter.WriteProject(ProjectInfo);
            EnactXMLWriter.WriteEngineXml(ProjectInfo, ProjectInfo.UnifiedXmlFile.AbsolutePath);

            //Write three engine xml files
            EnactXMLWriter.WriteCaptions(CaptionList, ProjectInfo.CaptionsFile.AbsolutePath);
            EnactXMLWriter.WriteSettings(Settings, ProjectInfo.SettingsFile.AbsolutePath);
            EnactXMLWriter.WriteSpeakers(SpeakerSet, ProjectInfo.SpeakersFile.AbsolutePath);

            //Copy engine to project folder
            File.WriteAllBytes(ProjectInfo.EngineFile.AbsolutePath,Properties.Resources.Engine);
            File.WriteAllBytes(ProjectInfo.EngineSkinFile.AbsolutePath,Properties.Resources.SkinOverPlayFullscreen);
            File.WriteAllBytes(ProjectInfo.EditorEngineFile.AbsolutePath,Properties.Resources.EditorEngine);

            //Copy video to project folder
            if (!File.Exists(ProjectInfo.VideoFile.AbsolutePath))
            {
                try { File.Copy(ProjectInfo.ExternalVideoPath, ProjectInfo.VideoFile.AbsolutePath); }
                catch (Exception ex) { Console.WriteLine(ex.StackTrace); } //Nothing
            }
        }
Ejemplo n.º 3
0
 private void writeXMLToolStripMenuItem_Click(object sender, EventArgs e)
 {
     EnactXMLWriter.WriteCaptions(CaptionList, Path.Combine(ProjectInfo.DirectoryPath, "dialogues.xml"));
     EnactXMLWriter.WriteSpeakers(SpeakerSet, Path.Combine(ProjectInfo.DirectoryPath, "speakers.xml"));
     EnactXMLWriter.WriteSettings(Settings, Path.Combine(ProjectInfo.DirectoryPath, "Settings.xml"));
 }