[Compare] - Move get filter to contructor.

This commit is contained in:
Ivandro Ismael 2016-09-04 21:17:07 +01:00
parent e5691b7a15
commit 5ff5a3c11a
No known key found for this signature in database
GPG Key ID: A8832757DEFB7EDC

View File

@ -43,6 +43,7 @@ namespace Nikse.SubtitleEdit.Forms
UiUtil.FixLargeFonts(this, buttonOK); UiUtil.FixLargeFonts(this, buttonOK);
subtitleListView1.UseSyntaxColoring = false; subtitleListView1.UseSyntaxColoring = false;
subtitleListView2.UseSyntaxColoring = false; subtitleListView2.UseSyntaxColoring = false;
openFileDialog1.Filter = Utilities.GetOpenDialogFilter();
} }
public void Initialize(Subtitle subtitle1, string subtitleFileName1, string title) public void Initialize(Subtitle subtitle1, string subtitleFileName1, string title)
@ -65,8 +66,6 @@ namespace Nikse.SubtitleEdit.Forms
{ {
} }
} }
openFileDialog1.Filter = Utilities.GetOpenDialogFilter();
subtitleListView1.SelectIndexAndEnsureVisible(0); subtitleListView1.SelectIndexAndEnsureVisible(0);
_language1 = LanguageAutoDetect.AutoDetectGoogleLanguage(_subtitle1); _language1 = LanguageAutoDetect.AutoDetectGoogleLanguage(_subtitle1);
} }
@ -86,7 +85,6 @@ namespace Nikse.SubtitleEdit.Forms
if (!string.IsNullOrEmpty(subtitleFileName1) && File.Exists(subtitleFileName1)) if (!string.IsNullOrEmpty(subtitleFileName1) && File.Exists(subtitleFileName1))
openFileDialog1.InitialDirectory = Path.GetDirectoryName(subtitleFileName1); openFileDialog1.InitialDirectory = Path.GetDirectoryName(subtitleFileName1);
openFileDialog1.Filter = Utilities.GetOpenDialogFilter();
subtitleListView1.SelectIndexAndEnsureVisible(0); subtitleListView1.SelectIndexAndEnsureVisible(0);
subtitleListView2.SelectIndexAndEnsureVisible(0); subtitleListView2.SelectIndexAndEnsureVisible(0);
} }