mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-26 05:02:36 +01:00
Rename controls
This commit is contained in:
parent
5a5750a5ea
commit
c03988d20b
40
src/ui/Forms/Ocr/VobSubOcr.Designer.cs
generated
40
src/ui/Forms/Ocr/VobSubOcr.Designer.cs
generated
@ -57,8 +57,8 @@ namespace Nikse.SubtitleEdit.Forms.Ocr
|
||||
this.comboBoxOcrMethod = new System.Windows.Forms.ComboBox();
|
||||
this.groupBoxCloudVision = new System.Windows.Forms.GroupBox();
|
||||
this.checkBoxCloudVisionSendOriginalImages = new System.Windows.Forms.CheckBox();
|
||||
this.comboBoxCloudVisionLanguageHint = new System.Windows.Forms.ComboBox();
|
||||
this.labelCloudVisionLanguageHint = new System.Windows.Forms.Label();
|
||||
this.comboBoxCloudVisionLanguage = new System.Windows.Forms.ComboBox();
|
||||
this.labelCloudVisionLanguage = new System.Windows.Forms.Label();
|
||||
this.textBoxCloudVisionApiKey = new System.Windows.Forms.TextBox();
|
||||
this.labelCloudVisionApiKey = new System.Windows.Forms.Label();
|
||||
this.groupBoxNOCR = new System.Windows.Forms.GroupBox();
|
||||
@ -532,8 +532,8 @@ namespace Nikse.SubtitleEdit.Forms.Ocr
|
||||
// groupBoxCloudVision
|
||||
//
|
||||
this.groupBoxCloudVision.Controls.Add(this.checkBoxCloudVisionSendOriginalImages);
|
||||
this.groupBoxCloudVision.Controls.Add(this.comboBoxCloudVisionLanguageHint);
|
||||
this.groupBoxCloudVision.Controls.Add(this.labelCloudVisionLanguageHint);
|
||||
this.groupBoxCloudVision.Controls.Add(this.comboBoxCloudVisionLanguage);
|
||||
this.groupBoxCloudVision.Controls.Add(this.labelCloudVisionLanguage);
|
||||
this.groupBoxCloudVision.Controls.Add(this.textBoxCloudVisionApiKey);
|
||||
this.groupBoxCloudVision.Controls.Add(this.labelCloudVisionApiKey);
|
||||
this.groupBoxCloudVision.Location = new System.Drawing.Point(7, 38);
|
||||
@ -555,23 +555,23 @@ namespace Nikse.SubtitleEdit.Forms.Ocr
|
||||
this.checkBoxCloudVisionSendOriginalImages.Visible = false;
|
||||
this.checkBoxCloudVisionSendOriginalImages.CheckedChanged += new System.EventHandler(this.checkBoxCloudVisionSendOriginalImages_CheckedChanged);
|
||||
//
|
||||
// comboBoxCloudVisionLanguageHint
|
||||
// comboBoxCloudVisionLanguage
|
||||
//
|
||||
this.comboBoxCloudVisionLanguageHint.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.comboBoxCloudVisionLanguageHint.FormattingEnabled = true;
|
||||
this.comboBoxCloudVisionLanguageHint.Location = new System.Drawing.Point(87, 49);
|
||||
this.comboBoxCloudVisionLanguageHint.Name = "comboBoxCloudVisionLanguageHint";
|
||||
this.comboBoxCloudVisionLanguageHint.Size = new System.Drawing.Size(279, 21);
|
||||
this.comboBoxCloudVisionLanguageHint.TabIndex = 3;
|
||||
this.comboBoxCloudVisionLanguage.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.comboBoxCloudVisionLanguage.FormattingEnabled = true;
|
||||
this.comboBoxCloudVisionLanguage.Location = new System.Drawing.Point(87, 49);
|
||||
this.comboBoxCloudVisionLanguage.Name = "comboBoxCloudVisionLanguage";
|
||||
this.comboBoxCloudVisionLanguage.Size = new System.Drawing.Size(279, 21);
|
||||
this.comboBoxCloudVisionLanguage.TabIndex = 3;
|
||||
//
|
||||
// labelCloudVisionLanguageHint
|
||||
// labelCloudVisionLanguage
|
||||
//
|
||||
this.labelCloudVisionLanguageHint.AutoSize = true;
|
||||
this.labelCloudVisionLanguageHint.Location = new System.Drawing.Point(6, 52);
|
||||
this.labelCloudVisionLanguageHint.Name = "labelCloudVisionLanguageHint";
|
||||
this.labelCloudVisionLanguageHint.Size = new System.Drawing.Size(54, 13);
|
||||
this.labelCloudVisionLanguageHint.TabIndex = 2;
|
||||
this.labelCloudVisionLanguageHint.Text = "Language";
|
||||
this.labelCloudVisionLanguage.AutoSize = true;
|
||||
this.labelCloudVisionLanguage.Location = new System.Drawing.Point(6, 52);
|
||||
this.labelCloudVisionLanguage.Name = "labelCloudVisionLanguage";
|
||||
this.labelCloudVisionLanguage.Size = new System.Drawing.Size(54, 13);
|
||||
this.labelCloudVisionLanguage.TabIndex = 2;
|
||||
this.labelCloudVisionLanguage.Text = "Language";
|
||||
//
|
||||
// textBoxCloudVisionApiKey
|
||||
//
|
||||
@ -2266,8 +2266,8 @@ namespace Nikse.SubtitleEdit.Forms.Ocr
|
||||
private System.Windows.Forms.GroupBox groupBoxCloudVision;
|
||||
private System.Windows.Forms.TextBox textBoxCloudVisionApiKey;
|
||||
private System.Windows.Forms.Label labelCloudVisionApiKey;
|
||||
private System.Windows.Forms.ComboBox comboBoxCloudVisionLanguageHint;
|
||||
private System.Windows.Forms.Label labelCloudVisionLanguageHint;
|
||||
private System.Windows.Forms.ComboBox comboBoxCloudVisionLanguage;
|
||||
private System.Windows.Forms.Label labelCloudVisionLanguage;
|
||||
private System.Windows.Forms.CheckBox checkBoxCloudVisionSendOriginalImages;
|
||||
}
|
||||
}
|
@ -590,7 +590,7 @@ namespace Nikse.SubtitleEdit.Forms.Ocr
|
||||
|
||||
groupBoxCloudVision.Text = language.CloudVisionApi;
|
||||
labelCloudVisionApiKey.Text = language.ApiKey;
|
||||
labelCloudVisionLanguageHint.Text = language.Language;
|
||||
labelCloudVisionLanguage.Text = language.Language;
|
||||
checkBoxCloudVisionSendOriginalImages.Text = language.SendOriginalImages;
|
||||
|
||||
textBoxCloudVisionApiKey.Text = Configuration.Settings.VobSubOcr.CloudVisionApiKey;
|
||||
@ -645,14 +645,14 @@ namespace Nikse.SubtitleEdit.Forms.Ocr
|
||||
}
|
||||
|
||||
var ocrLanguages = new GoogleOcrService(new GoogleCloudVisionApi(string.Empty)).GetLanguages().OrderBy(p => p.ToString());
|
||||
comboBoxCloudVisionLanguageHint.Items.Clear();
|
||||
comboBoxCloudVisionLanguageHint.Items.AddRange(ocrLanguages.ToArray());
|
||||
comboBoxCloudVisionLanguage.Items.Clear();
|
||||
comboBoxCloudVisionLanguage.Items.AddRange(ocrLanguages.ToArray());
|
||||
var selectedOcrLanguage = ocrLanguages.FirstOrDefault(p => p.Code == Configuration.Settings.VobSubOcr.CloudVisionLanguage);
|
||||
if (selectedOcrLanguage == null)
|
||||
{
|
||||
selectedOcrLanguage = ocrLanguages.FirstOrDefault(p => p.Code == "en");
|
||||
}
|
||||
comboBoxCloudVisionLanguageHint.Text = selectedOcrLanguage.ToString();
|
||||
comboBoxCloudVisionLanguage.Text = selectedOcrLanguage.ToString();
|
||||
}
|
||||
|
||||
private void FillSpellCheckDictionaries()
|
||||
@ -5273,15 +5273,15 @@ namespace Nikse.SubtitleEdit.Forms.Ocr
|
||||
_ocrService = new GoogleOcrService(new GoogleCloudVisionApi(textBoxCloudVisionApiKey.Text));
|
||||
|
||||
var ocrLanguages = _ocrService.GetLanguages().OrderBy(p => p.ToString());
|
||||
var previouslySelectedLanguage = (comboBoxCloudVisionLanguageHint.SelectedItem as OcrLanguage).Code;
|
||||
comboBoxCloudVisionLanguageHint.Items.Clear();
|
||||
comboBoxCloudVisionLanguageHint.Items.AddRange(ocrLanguages.ToArray());
|
||||
var previouslySelectedLanguage = (comboBoxCloudVisionLanguage.SelectedItem as OcrLanguage).Code;
|
||||
comboBoxCloudVisionLanguage.Items.Clear();
|
||||
comboBoxCloudVisionLanguage.Items.AddRange(ocrLanguages.ToArray());
|
||||
var selectedOcrLanguage = ocrLanguages.FirstOrDefault(p => p.Code == previouslySelectedLanguage);
|
||||
if (selectedOcrLanguage == null)
|
||||
{
|
||||
selectedOcrLanguage = ocrLanguages.FirstOrDefault(p => p.Code == "en");
|
||||
}
|
||||
comboBoxCloudVisionLanguageHint.Text = selectedOcrLanguage.ToString();
|
||||
comboBoxCloudVisionLanguage.Text = selectedOcrLanguage.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
@ -6872,7 +6872,7 @@ namespace Nikse.SubtitleEdit.Forms.Ocr
|
||||
|
||||
private string OcrViaCloudVision(Bitmap bitmap, int listViewIndex)
|
||||
{
|
||||
var language = (comboBoxCloudVisionLanguageHint.SelectedItem as OcrLanguage).Code;
|
||||
var language = (comboBoxCloudVisionLanguage.SelectedItem as OcrLanguage).Code;
|
||||
var cloudVisionResult = _ocrService.PerformOcr(language, new List<Bitmap>() { bitmap });
|
||||
|
||||
if (cloudVisionResult.Count > 0)
|
||||
@ -8631,7 +8631,7 @@ namespace Nikse.SubtitleEdit.Forms.Ocr
|
||||
Configuration.Settings.VobSubOcr.UseTesseractFallback = checkBoxTesseractFallback.Checked;
|
||||
Configuration.Settings.VobSubOcr.CaptureTopAlign = toolStripMenuItemCaptureTopAlign.Checked;
|
||||
Configuration.Settings.VobSubOcr.CloudVisionApiKey = textBoxCloudVisionApiKey.Text;
|
||||
Configuration.Settings.VobSubOcr.CloudVisionLanguage = (comboBoxCloudVisionLanguageHint.SelectedItem as OcrLanguage).Code;
|
||||
Configuration.Settings.VobSubOcr.CloudVisionLanguage = (comboBoxCloudVisionLanguage.SelectedItem as OcrLanguage).Code;
|
||||
|
||||
if (_ocrMethodIndex == _ocrMethodBinaryImageCompare)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user