[VobSubOcr] - Remove duplication.

This commit is contained in:
Ivandro Ismael 2017-02-06 18:10:50 +00:00
parent 8715273a87
commit ced956c493

View File

@ -8445,32 +8445,25 @@ namespace Nikse.SubtitleEdit.Forms
private void vobSubToolStripMenuItem_Click(object sender, EventArgs e)
{
using (var exportBdnXmlPng = new ExportPngXml())
{
_fromMenuItem = true;
exportBdnXmlPng.InitializeFromVobSubOcr(_subtitle, new SubRip(), "VOBSUB", FileName, this, _importLanguageString);
exportBdnXmlPng.ShowDialog(this);
_fromMenuItem = false;
}
ExportToPngXml("VOBSUB");
}
private void bluraySupToolStripMenuItem_Click(object sender, EventArgs e)
{
using (var exportBdnXmlPng = new ExportPngXml())
{
_fromMenuItem = true;
exportBdnXmlPng.InitializeFromVobSubOcr(_subtitle, new SubRip(), "BLURAYSUP", FileName, this, _importLanguageString);
exportBdnXmlPng.ShowDialog(this);
_fromMenuItem = false;
}
ExportToPngXml("BLURAYSUP");
}
private void bDNXMLToolStripMenuItem_Click(object sender, EventArgs e)
{
ExportToPngXml("BDNXML");
}
private void ExportToPngXml(string exportType)
{
using (var exportBdnXmlPng = new ExportPngXml())
{
_fromMenuItem = true;
exportBdnXmlPng.InitializeFromVobSubOcr(_subtitle, new SubRip(), "BDNXML", FileName, this, _importLanguageString);
exportBdnXmlPng.InitializeFromVobSubOcr(_subtitle, new SubRip(), exportType, FileName, this, _importLanguageString);
exportBdnXmlPng.ShowDialog(this);
_fromMenuItem = false;
}