public FormRemoveTextForHearImpaired() { InitializeComponent(); _removeTextForHILib = new RemoveTextForHI(GetSettings()); checkBoxRemoveTextBetweenSquares.Checked = Configuration.Settings.RemoveTextForHearingImpaired.RemoveTextBetweenBrackets; checkBoxRemoveTextBetweenParentheses.Checked = Configuration.Settings.RemoveTextForHearingImpaired.RemoveTextBetweenParentheses; checkBoxRemoveTextBetweenBrackets.Checked = Configuration.Settings.RemoveTextForHearingImpaired.RemoveTextBetweenCurlyBrackets; checkBoxRemoveTextBetweenQuestionMarks.Checked = Configuration.Settings.RemoveTextForHearingImpaired.RemoveTextBetweenQuestionMarks; checkBoxRemoveTextBetweenCustomTags.Checked = Configuration.Settings.RemoveTextForHearingImpaired.RemoveTextBetweenCustom; comboBoxCustomStart.Text = Configuration.Settings.RemoveTextForHearingImpaired.RemoveTextBetweenCustomBefore; comboBoxCustomEnd.Text = Configuration.Settings.RemoveTextForHearingImpaired.RemoveTextBetweenCustomAfter; checkBoxOnlyIfInSeparateLine.Checked = Configuration.Settings.RemoveTextForHearingImpaired.RemoveTextBetweenOnlySeperateLines; checkBoxRemoveTextBeforeColon.Checked = Configuration.Settings.RemoveTextForHearingImpaired.RemoveTextBeforeColon; checkBoxRemoveTextBeforeColonOnlyUppercase.Checked = Configuration.Settings.RemoveTextForHearingImpaired.RemoveTextBeforeColonOnlyIfUppercase; checkBoxColonSeparateLine.Checked = Configuration.Settings.RemoveTextForHearingImpaired.RemoveTextBeforeColonOnlyOnSeparateLine; checkBoxRemoveInterjections.Checked = Configuration.Settings.RemoveTextForHearingImpaired.RemoveInterjections; checkBoxRemoveWhereContains.Checked = Configuration.Settings.RemoveTextForHearingImpaired.RemoveIfContains; checkBoxRemoveIfAllUppercase.Checked = Configuration.Settings.RemoveTextForHearingImpaired.RemoveIfAllUppercase; comboBoxRemoveIfTextContains.Text = Configuration.Settings.RemoveTextForHearingImpaired.RemoveIfContainsText; _language = Configuration.Settings.Language.RemoveTextFromHearImpaired; Text = _language.Title; groupBoxRemoveTextConditions.Text = _language.RemoveTextConditions; labelAnd.Text = _language.And; labelRemoveTextBetween.Text = _language.RemoveTextBetween; checkBoxRemoveTextBeforeColon.Text = _language.RemoveTextBeforeColon; checkBoxRemoveTextBeforeColonOnlyUppercase.Text = _language.OnlyIfTextIsUppercase; checkBoxOnlyIfInSeparateLine.Text = _language.OnlyIfInSeparateLine; checkBoxColonSeparateLine.Text = _language.OnlyIfInSeparateLine; checkBoxRemoveTextBetweenBrackets.Text = _language.Brackets; checkBoxRemoveTextBetweenParentheses.Text = _language.Parentheses; checkBoxRemoveTextBetweenQuestionMarks.Text = _language.QuestionMarks; checkBoxRemoveTextBetweenSquares.Text = _language.SquareBrackets; checkBoxRemoveWhereContains.Text = _language.RemoveTextIfContains; checkBoxRemoveIfAllUppercase.Text = _language.RemoveTextIfAllUppercase; checkBoxRemoveInterjections.Text = _language.RemoveInterjections; buttonEditInterjections.Text = _language.EditInterjections; buttonEditInterjections.Left = checkBoxRemoveInterjections.Left + checkBoxRemoveInterjections.Width; listViewFixes.Columns[0].Text = Configuration.Settings.Language.General.Apply; listViewFixes.Columns[1].Text = Configuration.Settings.Language.General.LineNumber; listViewFixes.Columns[2].Text = Configuration.Settings.Language.General.Before; listViewFixes.Columns[3].Text = Configuration.Settings.Language.General.After; buttonOK.Text = Configuration.Settings.Language.General.OK; buttonCancel.Text = Configuration.Settings.Language.General.Cancel; FixLargeFonts(); }
/// <summary> /// Initializes a new instance of the <see cref="FormRemoveTextForHearImpaired"/> class. /// </summary> public FormRemoveTextForHearImpaired() { this.InitializeComponent(); this._removeTextForHiLib = new RemoveTextForHI(this.GetSettings()); this.checkBoxRemoveTextBetweenSquares.Checked = Configuration.Settings.RemoveTextForHearingImpaired.RemoveTextBetweenBrackets; this.checkBoxRemoveTextBetweenParentheses.Checked = Configuration.Settings.RemoveTextForHearingImpaired.RemoveTextBetweenParentheses; this.checkBoxRemoveTextBetweenBrackets.Checked = Configuration.Settings.RemoveTextForHearingImpaired.RemoveTextBetweenCurlyBrackets; this.checkBoxRemoveTextBetweenQuestionMarks.Checked = Configuration.Settings.RemoveTextForHearingImpaired.RemoveTextBetweenQuestionMarks; this.checkBoxRemoveTextBetweenCustomTags.Checked = Configuration.Settings.RemoveTextForHearingImpaired.RemoveTextBetweenCustom; this.checkBoxOnlyIfInSeparateLine.Checked = Configuration.Settings.RemoveTextForHearingImpaired.RemoveTextBetweenOnlySeperateLines; this.checkBoxRemoveTextBeforeColon.Checked = Configuration.Settings.RemoveTextForHearingImpaired.RemoveTextBeforeColon; this.checkBoxRemoveTextBeforeColonOnlyUppercase.Checked = Configuration.Settings.RemoveTextForHearingImpaired.RemoveTextBeforeColonOnlyIfUppercase; this.checkBoxColonSeparateLine.Checked = Configuration.Settings.RemoveTextForHearingImpaired.RemoveTextBeforeColonOnlyOnSeparateLine; this.checkBoxRemoveInterjections.Checked = Configuration.Settings.RemoveTextForHearingImpaired.RemoveInterjections; this.checkBoxRemoveWhereContains.Checked = Configuration.Settings.RemoveTextForHearingImpaired.RemoveIfContains; this.checkBoxRemoveIfAllUppercase.Checked = Configuration.Settings.RemoveTextForHearingImpaired.RemoveIfAllUppercase; this._language = Configuration.Settings.Language.RemoveTextFromHearImpaired; this.Text = this._language.Title; this.groupBoxRemoveTextConditions.Text = this._language.RemoveTextConditions; this.labelAnd.Text = this._language.And; this.labelRemoveTextBetween.Text = this._language.RemoveTextBetween; this.checkBoxRemoveTextBeforeColon.Text = this._language.RemoveTextBeforeColon; this.checkBoxRemoveTextBeforeColonOnlyUppercase.Text = this._language.OnlyIfTextIsUppercase; this.checkBoxOnlyIfInSeparateLine.Text = this._language.OnlyIfInSeparateLine; this.checkBoxColonSeparateLine.Text = this._language.OnlyIfInSeparateLine; this.checkBoxRemoveTextBetweenBrackets.Text = this._language.Brackets; this.checkBoxRemoveTextBetweenParentheses.Text = this._language.Parentheses; this.checkBoxRemoveTextBetweenQuestionMarks.Text = this._language.QuestionMarks; this.checkBoxRemoveTextBetweenSquares.Text = this._language.SquareBrackets; this.checkBoxRemoveWhereContains.Text = this._language.RemoveTextIfContains; this.checkBoxRemoveIfAllUppercase.Text = this._language.RemoveTextIfAllUppercase; this.checkBoxRemoveInterjections.Text = this._language.RemoveInterjections; this.buttonEditInterjections.Text = this._language.EditInterjections; this.buttonEditInterjections.Left = this.checkBoxRemoveInterjections.Left + this.checkBoxRemoveInterjections.Width; this.listViewFixes.Columns[0].Text = Configuration.Settings.Language.General.Apply; this.listViewFixes.Columns[1].Text = Configuration.Settings.Language.General.LineNumber; this.listViewFixes.Columns[2].Text = Configuration.Settings.Language.General.Before; this.listViewFixes.Columns[3].Text = Configuration.Settings.Language.General.After; this.buttonOK.Text = Configuration.Settings.Language.General.Ok; this.buttonCancel.Text = Configuration.Settings.Language.General.Cancel; Utilities.FixLargeFonts(this, this.buttonOK); }
/// <summary> /// Initializes a new instance of the <see cref="BatchConvert"/> class. /// </summary> /// <param name="icon"> /// The icon. /// </param> public BatchConvert(Icon icon) { this.InitializeComponent(); this.Icon = (Icon)icon.Clone(); this.progressBar1.Visible = false; this.labelStatus.Text = string.Empty; var l = Configuration.Settings.Language.BatchConvert; this.Text = l.Title; this.groupBoxInput.Text = l.Input; this.labelChooseInputFiles.Text = l.InputDescription; this.groupBoxOutput.Text = l.Output; this.labelChooseOutputFolder.Text = l.ChooseOutputFolder; this.checkBoxOverwrite.Text = l.OverwriteExistingFiles; this.labelOutputFormat.Text = Configuration.Settings.Language.Main.Controls.SubtitleFormat; this.labelEncoding.Text = Configuration.Settings.Language.Main.Controls.FileEncoding; this.buttonStyles.Text = l.Style; this.groupBoxConvertOptions.Text = l.ConvertOptions; this.checkBoxRemoveFormatting.Text = l.RemoveFormatting; this.checkBoxFixCasing.Text = l.RedoCasing; this.checkBoxRemoveTextForHI.Text = l.RemoveTextForHI; this.checkBoxOverwriteOriginalFiles.Text = l.OverwriteOriginalFiles; this.columnHeaderFName.Text = Configuration.Settings.Language.JoinSubtitles.FileName; this.columnHeaderFormat.Text = Configuration.Settings.Language.Main.Controls.SubtitleFormat; this.columnHeaderSize.Text = Configuration.Settings.Language.General.Size; this.columnHeaderStatus.Text = l.Status; this.linkLabelOpenOutputFolder.Text = Configuration.Settings.Language.Main.Menu.File.Open; this.buttonSearchFolder.Text = l.ScanFolder; this.buttonConvert.Text = l.Convert; this.buttonCancel.Text = Configuration.Settings.Language.General.Ok; this.checkBoxScanFolderRecursive.Text = l.Recursive; this.checkBoxScanFolderRecursive.Left = this.buttonSearchFolder.Left - this.checkBoxScanFolderRecursive.Width - 5; this.groupBoxChangeFrameRate.Text = Configuration.Settings.Language.ChangeFrameRate.Title; this.groupBoxOffsetTimeCodes.Text = Configuration.Settings.Language.ShowEarlierLater.TitleAll; this.labelFromFrameRate.Text = Configuration.Settings.Language.ChangeFrameRate.FromFrameRate; this.labelToFrameRate.Text = Configuration.Settings.Language.ChangeFrameRate.ToFrameRate; this.labelHourMinSecMilliSecond.Text = Configuration.Settings.Language.General.HourMinutesSecondsMilliseconds; this.comboBoxFrameRateFrom.Left = this.labelFromFrameRate.Left + this.labelFromFrameRate.Width + 3; this.comboBoxFrameRateTo.Left = this.labelToFrameRate.Left + this.labelToFrameRate.Width + 3; if (this.comboBoxFrameRateFrom.Left > this.comboBoxFrameRateTo.Left) { this.comboBoxFrameRateTo.Left = this.comboBoxFrameRateFrom.Left; } else { this.comboBoxFrameRateFrom.Left = this.comboBoxFrameRateTo.Left; } this.comboBoxSubtitleFormats.Left = this.labelOutputFormat.Left + this.labelOutputFormat.Width + 3; this.comboBoxEncoding.Left = this.labelEncoding.Left + this.labelEncoding.Width + 3; if (this.comboBoxSubtitleFormats.Left > this.comboBoxEncoding.Left) { this.comboBoxEncoding.Left = this.comboBoxSubtitleFormats.Left; } else { this.comboBoxSubtitleFormats.Left = this.comboBoxEncoding.Left; } this.buttonStyles.Left = this.comboBoxSubtitleFormats.Left + this.comboBoxSubtitleFormats.Width + 5; this.timeUpDownAdjust.MaskedTextBox.Text = "000000000"; this.comboBoxFrameRateFrom.Items.Add(23.976); this.comboBoxFrameRateFrom.Items.Add(24.0); this.comboBoxFrameRateFrom.Items.Add(25.0); this.comboBoxFrameRateFrom.Items.Add(29.97); this.comboBoxFrameRateTo.Items.Add(23.976); this.comboBoxFrameRateTo.Items.Add(24.0); this.comboBoxFrameRateTo.Items.Add(25.0); this.comboBoxFrameRateTo.Items.Add(29.97); Utilities.FixLargeFonts(this, this.buttonCancel); this._allFormats = new List<SubtitleFormat> { new Pac() }; int selectedFormatIndex = 0; for (int index = 0; index < SubtitleFormat.AllSubtitleFormats.Count; index++) { var f = SubtitleFormat.AllSubtitleFormats[index]; if (!f.IsVobSubIndexFile) { this.comboBoxSubtitleFormats.Items.Add(f.Name); this._allFormats.Add(f); if (Configuration.Settings.Tools.BatchConvertFormat == f.Name) { selectedFormatIndex = index; } } } this.comboBoxSubtitleFormats.SelectedIndex = selectedFormatIndex; this.comboBoxSubtitleFormats.Items.Add(l.PlainText); this.comboBoxEncoding.Items.Clear(); int encodingSelectedIndex = 0; this.comboBoxEncoding.Items.Add(Encoding.UTF8.EncodingName); foreach (EncodingInfo ei in Encoding.GetEncodings()) { if (ei.Name != Encoding.UTF8.BodyName && ei.CodePage >= 949 && !ei.DisplayName.Contains("EBCDIC") && ei.CodePage != 1047) { this.comboBoxEncoding.Items.Add(ei.CodePage + ": " + ei.DisplayName); if (ei.Name == Configuration.Settings.General.DefaultEncoding) { encodingSelectedIndex = this.comboBoxEncoding.Items.Count - 1; } } } this.comboBoxEncoding.SelectedIndex = encodingSelectedIndex; if (string.IsNullOrEmpty(Configuration.Settings.Tools.BatchConvertOutputFolder) || !Directory.Exists(Configuration.Settings.Tools.BatchConvertOutputFolder)) { this.textBoxOutputFolder.Text = Environment.GetFolderPath(Environment.SpecialFolder.Desktop); } else { this.textBoxOutputFolder.Text = Configuration.Settings.Tools.BatchConvertOutputFolder; } this.checkBoxOverwrite.Checked = Configuration.Settings.Tools.BatchConvertOverwriteExisting; this.checkBoxOverwriteOriginalFiles.Checked = Configuration.Settings.Tools.BatchConvertOverwriteOriginal; this.checkBoxFixCasing.Checked = Configuration.Settings.Tools.BatchConvertFixCasing; this.checkBoxFixCommonErrors.Checked = Configuration.Settings.Tools.BatchConvertFixCommonErrors; this.checkBoxMultipleReplace.Checked = Configuration.Settings.Tools.BatchConvertMultipleReplace; this.checkBoxSplitLongLines.Checked = Configuration.Settings.Tools.BatchConvertSplitLongLines; this.checkBoxAutoBalance.Checked = Configuration.Settings.Tools.BatchConvertAutoBalance; this.checkBoxRemoveFormatting.Checked = Configuration.Settings.Tools.BatchConvertRemoveFormatting; this.checkBoxRemoveTextForHI.Checked = Configuration.Settings.Tools.BatchConvertRemoveTextForHI; this.checkBoxSetMinimumDisplayTimeBetweenSubs.Checked = Configuration.Settings.Tools.BatchConvertSetMinDisplayTimeBetweenSubtitles; this.buttonRemoveTextForHiSettings.Text = l.Settings; this.buttonFixCommonErrorSettings.Text = l.Settings; this.buttonMultipleReplaceSettings.Text = l.Settings; this.checkBoxFixCommonErrors.Text = Configuration.Settings.Language.FixCommonErrors.Title; this.checkBoxMultipleReplace.Text = Configuration.Settings.Language.MultipleReplace.Title; this.checkBoxAutoBalance.Text = l.AutoBalance; this.checkBoxSplitLongLines.Text = l.SplitLongLines; this.radioButtonShowEarlier.Text = Configuration.Settings.Language.ShowEarlierLater.ShowEarlier; this.radioButtonShowLater.Text = Configuration.Settings.Language.ShowEarlierLater.ShowLater; this.checkBoxSetMinimumDisplayTimeBetweenSubs.Text = l.SetMinMsBetweenSubtitles; this._removeTextForHearingImpaired = new Logic.Forms.RemoveTextForHI(new Logic.Forms.RemoveTextForHISettings()); this.labelFilter.Text = l.Filter; this.comboBoxFilter.Items[0] = Configuration.Settings.Language.General.AllFiles; this.comboBoxFilter.Items[1] = l.FilterSrtNoUtf8BOM; this.comboBoxFilter.Items[2] = l.FilterMoreThanTwoLines; this.comboBoxFilter.Items[3] = l.FilterContains; this.comboBoxFilter.SelectedIndex = 0; this.comboBoxFilter.Left = this.labelFilter.Left + this.labelFilter.Width + 4; this.textBoxFilter.Left = this.comboBoxFilter.Left + this.comboBoxFilter.Width + 4; }