diff --git a/src/Forms/Main.Designer.cs b/src/Forms/Main.Designer.cs index be681fa11..5627e223f 100644 --- a/src/Forms/Main.Designer.cs +++ b/src/Forms/Main.Designer.cs @@ -256,7 +256,8 @@ this.tabPageTranslate = new System.Windows.Forms.TabPage(); this.labelTranslateTip = new System.Windows.Forms.Label(); this.groupBoxTranslateSearch = new System.Windows.Forms.GroupBox(); - this.buttonCustomUrl = new System.Windows.Forms.Button(); + this.buttonCustomUrl2 = new System.Windows.Forms.Button(); + this.buttonCustomUrl1 = new System.Windows.Forms.Button(); this.buttonGoogleTranslateIt = new System.Windows.Forms.Button(); this.buttonGoogleIt = new System.Windows.Forms.Button(); this.textBoxSearchWord = new System.Windows.Forms.TextBox(); @@ -2362,33 +2363,44 @@ // // groupBoxTranslateSearch // - this.groupBoxTranslateSearch.Controls.Add(this.buttonCustomUrl); + this.groupBoxTranslateSearch.Controls.Add(this.buttonCustomUrl2); + this.groupBoxTranslateSearch.Controls.Add(this.buttonCustomUrl1); this.groupBoxTranslateSearch.Controls.Add(this.buttonGoogleTranslateIt); this.groupBoxTranslateSearch.Controls.Add(this.buttonGoogleIt); this.groupBoxTranslateSearch.Controls.Add(this.textBoxSearchWord); - this.groupBoxTranslateSearch.Location = new System.Drawing.Point(198, 75); + this.groupBoxTranslateSearch.Location = new System.Drawing.Point(198, 68); this.groupBoxTranslateSearch.Name = "groupBoxTranslateSearch"; - this.groupBoxTranslateSearch.Size = new System.Drawing.Size(256, 143); + this.groupBoxTranslateSearch.Size = new System.Drawing.Size(256, 150); this.groupBoxTranslateSearch.TabIndex = 6; this.groupBoxTranslateSearch.TabStop = false; this.groupBoxTranslateSearch.Text = "Search text online"; // - // buttonCustomUrl + // buttonCustomUrl2 // - this.buttonCustomUrl.Enabled = false; - this.buttonCustomUrl.ImeMode = System.Windows.Forms.ImeMode.NoControl; - this.buttonCustomUrl.Location = new System.Drawing.Point(6, 106); - this.buttonCustomUrl.Name = "buttonCustomUrl"; - this.buttonCustomUrl.Size = new System.Drawing.Size(244, 21); - this.buttonCustomUrl.TabIndex = 3; - this.buttonCustomUrl.Text = "Custom url"; - this.buttonCustomUrl.UseVisualStyleBackColor = true; - this.buttonCustomUrl.Click += new System.EventHandler(this.buttonCustomUrl_Click); + this.buttonCustomUrl2.ImeMode = System.Windows.Forms.ImeMode.NoControl; + this.buttonCustomUrl2.Location = new System.Drawing.Point(6, 116); + this.buttonCustomUrl2.Name = "buttonCustomUrl2"; + this.buttonCustomUrl2.Size = new System.Drawing.Size(244, 21); + this.buttonCustomUrl2.TabIndex = 4; + this.buttonCustomUrl2.Text = "Custom url"; + this.buttonCustomUrl2.UseVisualStyleBackColor = true; + this.buttonCustomUrl2.Click += new System.EventHandler(this.buttonCustomUrl2_Click); + // + // buttonCustomUrl1 + // + this.buttonCustomUrl1.ImeMode = System.Windows.Forms.ImeMode.NoControl; + this.buttonCustomUrl1.Location = new System.Drawing.Point(6, 90); + this.buttonCustomUrl1.Name = "buttonCustomUrl1"; + this.buttonCustomUrl1.Size = new System.Drawing.Size(244, 21); + this.buttonCustomUrl1.TabIndex = 3; + this.buttonCustomUrl1.Text = "Custom url"; + this.buttonCustomUrl1.UseVisualStyleBackColor = true; + this.buttonCustomUrl1.Click += new System.EventHandler(this.buttonCustomUrl_Click); // // buttonGoogleTranslateIt // this.buttonGoogleTranslateIt.ImeMode = System.Windows.Forms.ImeMode.NoControl; - this.buttonGoogleTranslateIt.Location = new System.Drawing.Point(132, 81); + this.buttonGoogleTranslateIt.Location = new System.Drawing.Point(132, 63); this.buttonGoogleTranslateIt.Name = "buttonGoogleTranslateIt"; this.buttonGoogleTranslateIt.Size = new System.Drawing.Size(118, 21); this.buttonGoogleTranslateIt.TabIndex = 2; @@ -2399,7 +2411,7 @@ // buttonGoogleIt // this.buttonGoogleIt.ImeMode = System.Windows.Forms.ImeMode.NoControl; - this.buttonGoogleIt.Location = new System.Drawing.Point(6, 81); + this.buttonGoogleIt.Location = new System.Drawing.Point(6, 63); this.buttonGoogleIt.Name = "buttonGoogleIt"; this.buttonGoogleIt.Size = new System.Drawing.Size(120, 21); this.buttonGoogleIt.TabIndex = 1; @@ -2409,10 +2421,10 @@ // // textBoxSearchWord // - this.textBoxSearchWord.Location = new System.Drawing.Point(6, 25); + this.textBoxSearchWord.Location = new System.Drawing.Point(6, 18); this.textBoxSearchWord.Multiline = true; this.textBoxSearchWord.Name = "textBoxSearchWord"; - this.textBoxSearchWord.Size = new System.Drawing.Size(244, 50); + this.textBoxSearchWord.Size = new System.Drawing.Size(244, 39); this.textBoxSearchWord.TabIndex = 0; // // groupBoxAutoContinue @@ -4087,7 +4099,7 @@ private System.Windows.Forms.Button buttonSetStartAndOffsetRest; private System.Windows.Forms.Button buttonAdjustSetStartTime; private System.Windows.Forms.Label labelTranslateTip; - private System.Windows.Forms.Button buttonCustomUrl; + private System.Windows.Forms.Button buttonCustomUrl1; private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemOpenContainingFolder; private System.Windows.Forms.NumericUpDown numericUpDownSec1; private System.Windows.Forms.Button buttonForward1; @@ -4248,6 +4260,7 @@ private System.Windows.Forms.ToolStripMenuItem textWordsPerMinutewpmToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemTTProperties; private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemSaveSelectedLines; + private System.Windows.Forms.Button buttonCustomUrl2; } } diff --git a/src/Forms/Main.cs b/src/Forms/Main.cs index ec3ce98d0..d05bbfc66 100644 --- a/src/Forms/Main.cs +++ b/src/Forms/Main.cs @@ -139,6 +139,12 @@ namespace Nikse.SubtitleEdit.Forms Keys _waveformSearchSilenceForward = Keys.None; Keys _waveformSearchSilenceBack = Keys.None; Keys _waveformAddTextAtHere = Keys.None; + Keys _mainTranslateCustomSearch1 = Keys.None; + Keys _mainTranslateCustomSearch2 = Keys.None; + Keys _mainTranslateCustomSearch3 = Keys.None; + Keys _mainTranslateCustomSearch4 = Keys.None; + Keys _mainTranslateCustomSearch5 = Keys.None; + Keys _mainTranslateCustomSearch6 = Keys.None; bool _videoLoadedGoToSubPosAndPause = false; string _cutText = string.Empty; private Paragraph _mainCreateStartDownEndUpParagraph; @@ -355,8 +361,11 @@ namespace Nikse.SubtitleEdit.Forms } tabControl1_SelectedIndexChanged(null, null); - buttonCustomUrl.Text = Configuration.Settings.VideoControls.CustomSearchText; - buttonCustomUrl.Enabled = Configuration.Settings.VideoControls.CustomSearchUrl.Length > 1; + buttonCustomUrl1.Text = Configuration.Settings.VideoControls.CustomSearchText1; + buttonCustomUrl1.Visible = Configuration.Settings.VideoControls.CustomSearchUrl1.Length > 1; + + buttonCustomUrl2.Text = Configuration.Settings.VideoControls.CustomSearchText2; + buttonCustomUrl2.Visible = Configuration.Settings.VideoControls.CustomSearchUrl2.Length > 1; // Initialize events etc. for audio wave form audioVisualizer.OnDoubleClickNonParagraph += AudioWaveForm_OnDoubleClickNonParagraph; @@ -2961,8 +2970,10 @@ namespace Nikse.SubtitleEdit.Forms Utilities.InitializeSubtitleFont(textBoxListViewText); Utilities.InitializeSubtitleFont(textBoxListViewTextAlternate); Utilities.InitializeSubtitleFont(SubtitleListview1); - buttonCustomUrl.Text = Configuration.Settings.VideoControls.CustomSearchText; - buttonCustomUrl.Enabled = Configuration.Settings.VideoControls.CustomSearchUrl.Length > 1; + buttonCustomUrl1.Text = Configuration.Settings.VideoControls.CustomSearchText1; + buttonCustomUrl1.Visible = Configuration.Settings.VideoControls.CustomSearchUrl1.Length > 1; + buttonCustomUrl2.Text = Configuration.Settings.VideoControls.CustomSearchText2; + buttonCustomUrl2.Visible = Configuration.Settings.VideoControls.CustomSearchUrl2.Length > 1; audioVisualizer.DrawGridLines = Configuration.Settings.VideoControls.WaveFormDrawGrid; audioVisualizer.GridColor = Configuration.Settings.VideoControls.WaveFormGridColor; @@ -8195,6 +8206,10 @@ namespace Nikse.SubtitleEdit.Forms return; } + if (e.Modifiers == Keys.Alt && e.KeyCode == (Keys.RButton | Keys.ShiftKey)) + return; + + if (e.Modifiers == Keys.Shift && e.KeyCode == Keys.ShiftKey) return; if (e.Modifiers == Keys.Control && e.KeyCode == (Keys.LButton | Keys.ShiftKey)) @@ -8800,9 +8815,54 @@ namespace Nikse.SubtitleEdit.Forms e.SuppressKeyPress = true; } } + else if (tabControlButtons.SelectedTab == tabPageTranslate) + { + if (_mainTranslateCustomSearch1 == e.KeyData) + { + e.SuppressKeyPress = true; + RunCustomSearch(Configuration.Settings.VideoControls.CustomSearchUrl1); + } + else if (_mainTranslateCustomSearch2 == e.KeyData) + { + e.SuppressKeyPress = true; + RunCustomSearch(Configuration.Settings.VideoControls.CustomSearchUrl2); + } + else if (_mainTranslateCustomSearch3 == e.KeyData) + { + e.SuppressKeyPress = true; + RunCustomSearch(Configuration.Settings.VideoControls.CustomSearchUrl3); + } + else if (_mainTranslateCustomSearch4 == e.KeyData) + { + e.SuppressKeyPress = true; + RunCustomSearch(Configuration.Settings.VideoControls.CustomSearchUrl4); + } + else if (_mainTranslateCustomSearch5 == e.KeyData) + { + e.SuppressKeyPress = true; + RunCustomSearch(Configuration.Settings.VideoControls.CustomSearchUrl5); + } + else if (_mainTranslateCustomSearch6 == e.KeyData) + { + e.SuppressKeyPress = true; + RunCustomSearch(Configuration.Settings.VideoControls.CustomSearchUrl6); + } + } // put new entries above tabs } + + + private void RunCustomSearch(string url) + { + if (!string.IsNullOrEmpty(url) && !string.IsNullOrEmpty(textBoxSearchWord.Text)) + { + if (url.Contains("{0}")) + url = string.Format(url, Utilities.UrlEncode(textBoxSearchWord.Text)); + System.Diagnostics.Process.Start(url); + } + } + private void GoFullscreen() { if (_videoPlayerUnDocked == null || _videoPlayerUnDocked.IsDisposed) @@ -11486,6 +11546,12 @@ namespace Nikse.SubtitleEdit.Forms _waveformSearchSilenceForward = Utilities.GetKeys(Configuration.Settings.Shortcuts.WaveformSearchSilenceForward); _waveformSearchSilenceBack = Utilities.GetKeys(Configuration.Settings.Shortcuts.WaveformSearchSilenceBack); _waveformAddTextAtHere = Utilities.GetKeys(Configuration.Settings.Shortcuts.WaveformAddTextHere); + _mainTranslateCustomSearch1 = Utilities.GetKeys(Configuration.Settings.Shortcuts.MainTranslateCustomSearch1); + _mainTranslateCustomSearch2 = Utilities.GetKeys(Configuration.Settings.Shortcuts.MainTranslateCustomSearch2); + _mainTranslateCustomSearch3 = Utilities.GetKeys(Configuration.Settings.Shortcuts.MainTranslateCustomSearch3); + _mainTranslateCustomSearch4 = Utilities.GetKeys(Configuration.Settings.Shortcuts.MainTranslateCustomSearch4); + _mainTranslateCustomSearch5 = Utilities.GetKeys(Configuration.Settings.Shortcuts.MainTranslateCustomSearch5); + _mainTranslateCustomSearch6 = Utilities.GetKeys(Configuration.Settings.Shortcuts.MainTranslateCustomSearch6); } private void LoadPlugins() @@ -12000,15 +12066,12 @@ namespace Nikse.SubtitleEdit.Forms private void buttonCustomUrl_Click(object sender, EventArgs e) { - string url = Configuration.Settings.VideoControls.CustomSearchUrl; - if (!string.IsNullOrEmpty(url)) - { - if (url.Contains("{0}")) - { - url = string.Format(url, Utilities.UrlEncode(textBoxSearchWord.Text)); - } - System.Diagnostics.Process.Start(url); - } + RunCustomSearch(Configuration.Settings.VideoControls.CustomSearchUrl1); + } + + private void buttonCustomUrl2_Click(object sender, EventArgs e) + { + RunCustomSearch(Configuration.Settings.VideoControls.CustomSearchUrl2); } private void ShowhideWaveFormToolStripMenuItemClick(object sender, EventArgs e) @@ -14865,7 +14928,7 @@ namespace Nikse.SubtitleEdit.Forms index++; } } - } + } } } \ No newline at end of file diff --git a/src/Forms/Main.resx b/src/Forms/Main.resx index 715902809..409bf9bf4 100644 --- a/src/Forms/Main.resx +++ b/src/Forms/Main.resx @@ -681,7 +681,7 @@ AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAD2 - CAAAAk1TRnQBSQFMAgEBAgEAAQgBFgEIARYBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo + CAAAAk1TRnQBSQFMAgEBAgEAAVABFgFQARYBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA diff --git a/src/Forms/Settings.Designer.cs b/src/Forms/Settings.Designer.cs index f2294a60f..1e3c63a59 100644 --- a/src/Forms/Settings.Designer.cs +++ b/src/Forms/Settings.Designer.cs @@ -114,9 +114,10 @@ this.checkBoxToolbarNew = new System.Windows.Forms.CheckBox(); this.tabPageVideoPlayer = new System.Windows.Forms.TabPage(); this.groupBoxMainWindowVideoControls = new System.Windows.Forms.GroupBox(); - this.textBoxCustomSearchUrl = new System.Windows.Forms.TextBox(); + this.labelCustomSearch1 = new System.Windows.Forms.Label(); + this.textBoxCustomSearchUrl1 = new System.Windows.Forms.TextBox(); this.labelCustomSearch = new System.Windows.Forms.Label(); - this.comboBoxCustomSearch = new System.Windows.Forms.ComboBox(); + this.comboBoxCustomSearch1 = new System.Windows.Forms.ComboBox(); this.groupBoxVideoPlayerDefault = new System.Windows.Forms.GroupBox(); this.checkBoxVideoPlayerShowFullscreenButton = new System.Windows.Forms.CheckBox(); this.checkBoxVideoPlayerShowMuteButton = new System.Windows.Forms.CheckBox(); @@ -236,6 +237,21 @@ this.colorDialogSSAStyle = new System.Windows.Forms.ColorDialog(); this.fontDialogSSAStyle = new System.Windows.Forms.FontDialog(); this.labelStatus = new System.Windows.Forms.Label(); + this.labelCustomSearch2 = new System.Windows.Forms.Label(); + this.textBoxCustomSearchUrl2 = new System.Windows.Forms.TextBox(); + this.comboBoxCustomSearch2 = new System.Windows.Forms.ComboBox(); + this.labelCustomSearch3 = new System.Windows.Forms.Label(); + this.textBoxCustomSearchUrl3 = new System.Windows.Forms.TextBox(); + this.comboBoxCustomSearch3 = new System.Windows.Forms.ComboBox(); + this.labelCustomSearch4 = new System.Windows.Forms.Label(); + this.textBoxCustomSearchUrl4 = new System.Windows.Forms.TextBox(); + this.comboBoxCustomSearch4 = new System.Windows.Forms.ComboBox(); + this.labelCustomSearch5 = new System.Windows.Forms.Label(); + this.textBoxCustomSearchUrl5 = new System.Windows.Forms.TextBox(); + this.comboBoxCustomSearch5 = new System.Windows.Forms.ComboBox(); + this.labelCustomSearch6 = new System.Windows.Forms.Label(); + this.textBoxCustomSearchUrl6 = new System.Windows.Forms.TextBox(); + this.comboBoxCustomSearch6 = new System.Windows.Forms.ComboBox(); this.tabControlSettings.SuspendLayout(); this.tabPageGenerel.SuspendLayout(); this.groupBoxMiscellaneous.SuspendLayout(); @@ -396,7 +412,7 @@ this.checkBoxSubtitleCenter.AutoSize = true; this.checkBoxSubtitleCenter.Location = new System.Drawing.Point(259, 300); this.checkBoxSubtitleCenter.Name = "checkBoxSubtitleCenter"; - this.checkBoxSubtitleCenter.Size = new System.Drawing.Size(57, 17); + this.checkBoxSubtitleCenter.Size = new System.Drawing.Size(59, 17); this.checkBoxSubtitleCenter.TabIndex = 10; this.checkBoxSubtitleCenter.Text = "Center"; this.checkBoxSubtitleCenter.UseVisualStyleBackColor = true; @@ -521,7 +537,7 @@ this.checkBoxAutoWrapWhileTyping.AutoSize = true; this.checkBoxAutoWrapWhileTyping.Location = new System.Drawing.Point(193, 177); this.checkBoxAutoWrapWhileTyping.Name = "checkBoxAutoWrapWhileTyping"; - this.checkBoxAutoWrapWhileTyping.Size = new System.Drawing.Size(132, 17); + this.checkBoxAutoWrapWhileTyping.Size = new System.Drawing.Size(137, 17); this.checkBoxAutoWrapWhileTyping.TabIndex = 5; this.checkBoxAutoWrapWhileTyping.Text = "Auto-wrap while typing"; this.checkBoxAutoWrapWhileTyping.UseVisualStyleBackColor = true; @@ -611,7 +627,7 @@ this.checkBoxPromptDeleteLines.AutoSize = true; this.checkBoxPromptDeleteLines.Location = new System.Drawing.Point(436, 309); this.checkBoxPromptDeleteLines.Name = "checkBoxPromptDeleteLines"; - this.checkBoxPromptDeleteLines.Size = new System.Drawing.Size(138, 17); + this.checkBoxPromptDeleteLines.Size = new System.Drawing.Size(142, 17); this.checkBoxPromptDeleteLines.TabIndex = 27; this.checkBoxPromptDeleteLines.Text = "Prompt for deleting lines"; this.checkBoxPromptDeleteLines.UseVisualStyleBackColor = true; @@ -630,7 +646,7 @@ this.checkBoxAllowEditOfOriginalSubtitle.AutoSize = true; this.checkBoxAllowEditOfOriginalSubtitle.Location = new System.Drawing.Point(436, 286); this.checkBoxAllowEditOfOriginalSubtitle.Name = "checkBoxAllowEditOfOriginalSubtitle"; - this.checkBoxAllowEditOfOriginalSubtitle.Size = new System.Drawing.Size(155, 17); + this.checkBoxAllowEditOfOriginalSubtitle.Size = new System.Drawing.Size(160, 17); this.checkBoxAllowEditOfOriginalSubtitle.TabIndex = 26; this.checkBoxAllowEditOfOriginalSubtitle.Text = "Allow edit of original subtitle"; this.checkBoxAllowEditOfOriginalSubtitle.UseVisualStyleBackColor = true; @@ -763,7 +779,7 @@ this.checkBoxRememberWindowPosition.AutoSize = true; this.checkBoxRememberWindowPosition.Location = new System.Drawing.Point(436, 101); this.checkBoxRememberWindowPosition.Name = "checkBoxRememberWindowPosition"; - this.checkBoxRememberWindowPosition.Size = new System.Drawing.Size(222, 17); + this.checkBoxRememberWindowPosition.Size = new System.Drawing.Size(223, 17); this.checkBoxRememberWindowPosition.TabIndex = 17; this.checkBoxRememberWindowPosition.Text = "Remember main window position and size"; this.checkBoxRememberWindowPosition.UseVisualStyleBackColor = true; @@ -800,7 +816,7 @@ this.checkBoxStartInSourceView.AutoSize = true; this.checkBoxStartInSourceView.Location = new System.Drawing.Point(436, 124); this.checkBoxStartInSourceView.Name = "checkBoxStartInSourceView"; - this.checkBoxStartInSourceView.Size = new System.Drawing.Size(119, 17); + this.checkBoxStartInSourceView.Size = new System.Drawing.Size(121, 17); this.checkBoxStartInSourceView.TabIndex = 18; this.checkBoxStartInSourceView.Text = "Start in source view"; this.checkBoxStartInSourceView.UseVisualStyleBackColor = true; @@ -810,7 +826,7 @@ this.checkBoxReopenLastOpened.AutoSize = true; this.checkBoxReopenLastOpened.Location = new System.Drawing.Point(444, 52); this.checkBoxReopenLastOpened.Name = "checkBoxReopenLastOpened"; - this.checkBoxReopenLastOpened.Size = new System.Drawing.Size(140, 17); + this.checkBoxReopenLastOpened.Size = new System.Drawing.Size(145, 17); this.checkBoxReopenLastOpened.TabIndex = 15; this.checkBoxReopenLastOpened.Text = "Start with last file loaded"; this.checkBoxReopenLastOpened.UseVisualStyleBackColor = true; @@ -820,7 +836,7 @@ this.checkBoxRememberRecentFiles.AutoSize = true; this.checkBoxRememberRecentFiles.Location = new System.Drawing.Point(436, 28); this.checkBoxRememberRecentFiles.Name = "checkBoxRememberRecentFiles"; - this.checkBoxRememberRecentFiles.Size = new System.Drawing.Size(188, 17); + this.checkBoxRememberRecentFiles.Size = new System.Drawing.Size(195, 17); this.checkBoxRememberRecentFiles.TabIndex = 14; this.checkBoxRememberRecentFiles.Text = "Remember recent files (for reopen)"; this.checkBoxRememberRecentFiles.UseVisualStyleBackColor = true; @@ -831,7 +847,7 @@ this.checkBoxSubtitleFontBold.AutoSize = true; this.checkBoxSubtitleFontBold.Location = new System.Drawing.Point(193, 300); this.checkBoxSubtitleFontBold.Name = "checkBoxSubtitleFontBold"; - this.checkBoxSubtitleFontBold.Size = new System.Drawing.Size(47, 17); + this.checkBoxSubtitleFontBold.Size = new System.Drawing.Size(46, 17); this.checkBoxSubtitleFontBold.TabIndex = 9; this.checkBoxSubtitleFontBold.Text = "Bold"; this.checkBoxSubtitleFontBold.UseVisualStyleBackColor = true; @@ -921,7 +937,7 @@ this.checkBoxShowFrameRate.AutoSize = true; this.checkBoxShowFrameRate.Location = new System.Drawing.Point(16, 29); this.checkBoxShowFrameRate.Name = "checkBoxShowFrameRate"; - this.checkBoxShowFrameRate.Size = new System.Drawing.Size(149, 17); + this.checkBoxShowFrameRate.Size = new System.Drawing.Size(154, 17); this.checkBoxShowFrameRate.TabIndex = 34; this.checkBoxShowFrameRate.Text = "Show frame rate in toolbar"; this.checkBoxShowFrameRate.UseVisualStyleBackColor = true; @@ -987,7 +1003,7 @@ this.checkBoxHelp.AutoSize = true; this.checkBoxHelp.Location = new System.Drawing.Point(704, 80); this.checkBoxHelp.Name = "checkBoxHelp"; - this.checkBoxHelp.Size = new System.Drawing.Size(56, 17); + this.checkBoxHelp.Size = new System.Drawing.Size(55, 17); this.checkBoxHelp.TabIndex = 31; this.checkBoxHelp.Text = "Visible"; this.checkBoxHelp.UseVisualStyleBackColor = true; @@ -1014,7 +1030,7 @@ this.checkBoxSettings.AutoSize = true; this.checkBoxSettings.Location = new System.Drawing.Point(628, 80); this.checkBoxSettings.Name = "checkBoxSettings"; - this.checkBoxSettings.Size = new System.Drawing.Size(56, 17); + this.checkBoxSettings.Size = new System.Drawing.Size(55, 17); this.checkBoxSettings.TabIndex = 28; this.checkBoxSettings.Text = "Visible"; this.checkBoxSettings.UseVisualStyleBackColor = true; @@ -1041,7 +1057,7 @@ this.checkBoxSpellCheck.AutoSize = true; this.checkBoxSpellCheck.Location = new System.Drawing.Point(550, 80); this.checkBoxSpellCheck.Name = "checkBoxSpellCheck"; - this.checkBoxSpellCheck.Size = new System.Drawing.Size(56, 17); + this.checkBoxSpellCheck.Size = new System.Drawing.Size(55, 17); this.checkBoxSpellCheck.TabIndex = 26; this.checkBoxSpellCheck.Text = "Visible"; this.checkBoxSpellCheck.UseVisualStyleBackColor = true; @@ -1068,7 +1084,7 @@ this.checkBoxVisualSync.AutoSize = true; this.checkBoxVisualSync.Location = new System.Drawing.Point(476, 80); this.checkBoxVisualSync.Name = "checkBoxVisualSync"; - this.checkBoxVisualSync.Size = new System.Drawing.Size(56, 17); + this.checkBoxVisualSync.Size = new System.Drawing.Size(55, 17); this.checkBoxVisualSync.TabIndex = 19; this.checkBoxVisualSync.Text = "Visible"; this.checkBoxVisualSync.UseVisualStyleBackColor = true; @@ -1095,7 +1111,7 @@ this.checkBoxReplace.AutoSize = true; this.checkBoxReplace.Location = new System.Drawing.Point(400, 80); this.checkBoxReplace.Name = "checkBoxReplace"; - this.checkBoxReplace.Size = new System.Drawing.Size(56, 17); + this.checkBoxReplace.Size = new System.Drawing.Size(55, 17); this.checkBoxReplace.TabIndex = 16; this.checkBoxReplace.Text = "Visible"; this.checkBoxReplace.UseVisualStyleBackColor = true; @@ -1122,7 +1138,7 @@ this.checkBoxToolbarFind.AutoSize = true; this.checkBoxToolbarFind.Location = new System.Drawing.Point(324, 80); this.checkBoxToolbarFind.Name = "checkBoxToolbarFind"; - this.checkBoxToolbarFind.Size = new System.Drawing.Size(56, 17); + this.checkBoxToolbarFind.Size = new System.Drawing.Size(55, 17); this.checkBoxToolbarFind.TabIndex = 13; this.checkBoxToolbarFind.Text = "Visible"; this.checkBoxToolbarFind.UseVisualStyleBackColor = true; @@ -1149,7 +1165,7 @@ this.checkBoxToolbarSaveAs.AutoSize = true; this.checkBoxToolbarSaveAs.Location = new System.Drawing.Point(248, 80); this.checkBoxToolbarSaveAs.Name = "checkBoxToolbarSaveAs"; - this.checkBoxToolbarSaveAs.Size = new System.Drawing.Size(56, 17); + this.checkBoxToolbarSaveAs.Size = new System.Drawing.Size(55, 17); this.checkBoxToolbarSaveAs.TabIndex = 10; this.checkBoxToolbarSaveAs.Text = "Visible"; this.checkBoxToolbarSaveAs.UseVisualStyleBackColor = true; @@ -1176,7 +1192,7 @@ this.checkBoxToolbarSave.AutoSize = true; this.checkBoxToolbarSave.Location = new System.Drawing.Point(172, 80); this.checkBoxToolbarSave.Name = "checkBoxToolbarSave"; - this.checkBoxToolbarSave.Size = new System.Drawing.Size(56, 17); + this.checkBoxToolbarSave.Size = new System.Drawing.Size(55, 17); this.checkBoxToolbarSave.TabIndex = 7; this.checkBoxToolbarSave.Text = "Visible"; this.checkBoxToolbarSave.UseVisualStyleBackColor = true; @@ -1203,7 +1219,7 @@ this.checkBoxToolbarOpen.AutoSize = true; this.checkBoxToolbarOpen.Location = new System.Drawing.Point(96, 80); this.checkBoxToolbarOpen.Name = "checkBoxToolbarOpen"; - this.checkBoxToolbarOpen.Size = new System.Drawing.Size(56, 17); + this.checkBoxToolbarOpen.Size = new System.Drawing.Size(55, 17); this.checkBoxToolbarOpen.TabIndex = 4; this.checkBoxToolbarOpen.Text = "Visible"; this.checkBoxToolbarOpen.UseVisualStyleBackColor = true; @@ -1230,7 +1246,7 @@ this.checkBoxToolbarNew.AutoSize = true; this.checkBoxToolbarNew.Location = new System.Drawing.Point(20, 80); this.checkBoxToolbarNew.Name = "checkBoxToolbarNew"; - this.checkBoxToolbarNew.Size = new System.Drawing.Size(56, 17); + this.checkBoxToolbarNew.Size = new System.Drawing.Size(55, 17); this.checkBoxToolbarNew.TabIndex = 1; this.checkBoxToolbarNew.Text = "Visible"; this.checkBoxToolbarNew.UseVisualStyleBackColor = true; @@ -1250,22 +1266,47 @@ // // groupBoxMainWindowVideoControls // - this.groupBoxMainWindowVideoControls.Controls.Add(this.textBoxCustomSearchUrl); + this.groupBoxMainWindowVideoControls.Controls.Add(this.labelCustomSearch6); + this.groupBoxMainWindowVideoControls.Controls.Add(this.textBoxCustomSearchUrl6); + this.groupBoxMainWindowVideoControls.Controls.Add(this.comboBoxCustomSearch6); + this.groupBoxMainWindowVideoControls.Controls.Add(this.labelCustomSearch5); + this.groupBoxMainWindowVideoControls.Controls.Add(this.textBoxCustomSearchUrl5); + this.groupBoxMainWindowVideoControls.Controls.Add(this.comboBoxCustomSearch5); + this.groupBoxMainWindowVideoControls.Controls.Add(this.labelCustomSearch4); + this.groupBoxMainWindowVideoControls.Controls.Add(this.textBoxCustomSearchUrl4); + this.groupBoxMainWindowVideoControls.Controls.Add(this.comboBoxCustomSearch4); + this.groupBoxMainWindowVideoControls.Controls.Add(this.labelCustomSearch3); + this.groupBoxMainWindowVideoControls.Controls.Add(this.textBoxCustomSearchUrl3); + this.groupBoxMainWindowVideoControls.Controls.Add(this.comboBoxCustomSearch3); + this.groupBoxMainWindowVideoControls.Controls.Add(this.labelCustomSearch2); + this.groupBoxMainWindowVideoControls.Controls.Add(this.textBoxCustomSearchUrl2); + this.groupBoxMainWindowVideoControls.Controls.Add(this.comboBoxCustomSearch2); + this.groupBoxMainWindowVideoControls.Controls.Add(this.labelCustomSearch1); + this.groupBoxMainWindowVideoControls.Controls.Add(this.textBoxCustomSearchUrl1); this.groupBoxMainWindowVideoControls.Controls.Add(this.labelCustomSearch); - this.groupBoxMainWindowVideoControls.Controls.Add(this.comboBoxCustomSearch); - this.groupBoxMainWindowVideoControls.Location = new System.Drawing.Point(7, 296); + this.groupBoxMainWindowVideoControls.Controls.Add(this.comboBoxCustomSearch1); + this.groupBoxMainWindowVideoControls.Location = new System.Drawing.Point(7, 239); this.groupBoxMainWindowVideoControls.Name = "groupBoxMainWindowVideoControls"; - this.groupBoxMainWindowVideoControls.Size = new System.Drawing.Size(808, 142); + this.groupBoxMainWindowVideoControls.Size = new System.Drawing.Size(808, 199); this.groupBoxMainWindowVideoControls.TabIndex = 15; this.groupBoxMainWindowVideoControls.TabStop = false; this.groupBoxMainWindowVideoControls.Text = "Main window video controls"; // - // textBoxCustomSearchUrl + // labelCustomSearch1 // - this.textBoxCustomSearchUrl.Location = new System.Drawing.Point(166, 38); - this.textBoxCustomSearchUrl.Name = "textBoxCustomSearchUrl"; - this.textBoxCustomSearchUrl.Size = new System.Drawing.Size(601, 21); - this.textBoxCustomSearchUrl.TabIndex = 2; + this.labelCustomSearch1.AutoSize = true; + this.labelCustomSearch1.Location = new System.Drawing.Point(12, 41); + this.labelCustomSearch1.Name = "labelCustomSearch1"; + this.labelCustomSearch1.Size = new System.Drawing.Size(13, 13); + this.labelCustomSearch1.TabIndex = 3; + this.labelCustomSearch1.Text = "1"; + // + // textBoxCustomSearchUrl1 + // + this.textBoxCustomSearchUrl1.Location = new System.Drawing.Point(185, 38); + this.textBoxCustomSearchUrl1.Name = "textBoxCustomSearchUrl1"; + this.textBoxCustomSearchUrl1.Size = new System.Drawing.Size(574, 21); + this.textBoxCustomSearchUrl1.TabIndex = 2; // // labelCustomSearch // @@ -1276,18 +1317,23 @@ this.labelCustomSearch.TabIndex = 1; this.labelCustomSearch.Text = "Custom search text and url"; // - // comboBoxCustomSearch + // comboBoxCustomSearch1 // - this.comboBoxCustomSearch.FormattingEnabled = true; - this.comboBoxCustomSearch.Items.AddRange(new object[] { - "The Free Dictionary", + this.comboBoxCustomSearch1.FormattingEnabled = true; + this.comboBoxCustomSearch1.Items.AddRange(new object[] { "Dictionary.com", - "VISUWORDS"}); - this.comboBoxCustomSearch.Location = new System.Drawing.Point(12, 38); - this.comboBoxCustomSearch.Name = "comboBoxCustomSearch"; - this.comboBoxCustomSearch.Size = new System.Drawing.Size(148, 21); - this.comboBoxCustomSearch.TabIndex = 0; - this.comboBoxCustomSearch.SelectedIndexChanged += new System.EventHandler(this.comboBoxCustomSearch_SelectedIndexChanged); + "learnersdictionary.com", + "Merriam-Webster", + "The Free Dictionary", + "Thesaurus.com", + "urbandictionary.com", + "VISUWORDS", + "Wikipedia"}); + this.comboBoxCustomSearch1.Location = new System.Drawing.Point(31, 38); + this.comboBoxCustomSearch1.Name = "comboBoxCustomSearch1"; + this.comboBoxCustomSearch1.Size = new System.Drawing.Size(148, 21); + this.comboBoxCustomSearch1.TabIndex = 0; + this.comboBoxCustomSearch1.SelectedIndexChanged += new System.EventHandler(this.comboBoxCustomSearch_SelectedIndexChanged); // // groupBoxVideoPlayerDefault // @@ -1301,7 +1347,7 @@ this.groupBoxVideoPlayerDefault.Controls.Add(this.labelVolDescr); this.groupBoxVideoPlayerDefault.Location = new System.Drawing.Point(7, 135); this.groupBoxVideoPlayerDefault.Name = "groupBoxVideoPlayerDefault"; - this.groupBoxVideoPlayerDefault.Size = new System.Drawing.Size(808, 155); + this.groupBoxVideoPlayerDefault.Size = new System.Drawing.Size(808, 98); this.groupBoxVideoPlayerDefault.TabIndex = 14; this.groupBoxVideoPlayerDefault.TabStop = false; // @@ -1327,7 +1373,7 @@ // labelVideoPlayerPreviewFontSize // this.labelVideoPlayerPreviewFontSize.AutoSize = true; - this.labelVideoPlayerPreviewFontSize.Location = new System.Drawing.Point(11, 124); + this.labelVideoPlayerPreviewFontSize.Location = new System.Drawing.Point(170, 54); this.labelVideoPlayerPreviewFontSize.Name = "labelVideoPlayerPreviewFontSize"; this.labelVideoPlayerPreviewFontSize.Size = new System.Drawing.Size(128, 13); this.labelVideoPlayerPreviewFontSize.TabIndex = 14; @@ -1351,7 +1397,7 @@ "18", "19", "20"}); - this.comboBoxlVideoPlayerPreviewFontSize.Location = new System.Drawing.Point(145, 121); + this.comboBoxlVideoPlayerPreviewFontSize.Location = new System.Drawing.Point(304, 51); this.comboBoxlVideoPlayerPreviewFontSize.Name = "comboBoxlVideoPlayerPreviewFontSize"; this.comboBoxlVideoPlayerPreviewFontSize.Size = new System.Drawing.Size(121, 21); this.comboBoxlVideoPlayerPreviewFontSize.TabIndex = 13; @@ -1370,7 +1416,7 @@ // this.comboBoxVideoPlayerDefaultVolume.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.comboBoxVideoPlayerDefaultVolume.FormattingEnabled = true; - this.comboBoxVideoPlayerDefaultVolume.Location = new System.Drawing.Point(127, 90); + this.comboBoxVideoPlayerDefaultVolume.Location = new System.Drawing.Point(286, 20); this.comboBoxVideoPlayerDefaultVolume.Name = "comboBoxVideoPlayerDefaultVolume"; this.comboBoxVideoPlayerDefaultVolume.Size = new System.Drawing.Size(121, 21); this.comboBoxVideoPlayerDefaultVolume.TabIndex = 12; @@ -1378,7 +1424,7 @@ // labelDefaultVol // this.labelDefaultVol.AutoSize = true; - this.labelDefaultVol.Location = new System.Drawing.Point(9, 93); + this.labelDefaultVol.Location = new System.Drawing.Point(168, 23); this.labelDefaultVol.Name = "labelDefaultVol"; this.labelDefaultVol.Size = new System.Drawing.Size(79, 13); this.labelDefaultVol.TabIndex = 6; @@ -1389,7 +1435,7 @@ this.labelVolDescr.AutoSize = true; this.labelVolDescr.Font = new System.Drawing.Font("Tahoma", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.labelVolDescr.ForeColor = System.Drawing.Color.Gray; - this.labelVolDescr.Location = new System.Drawing.Point(254, 94); + this.labelVolDescr.Location = new System.Drawing.Point(413, 24); this.labelVolDescr.Name = "labelVolDescr"; this.labelVolDescr.Size = new System.Drawing.Size(150, 11); this.labelVolDescr.TabIndex = 9; @@ -1428,7 +1474,7 @@ this.radioButtonVideoPlayerVLC.AutoSize = true; this.radioButtonVideoPlayerVLC.Location = new System.Drawing.Point(10, 46); this.radioButtonVideoPlayerVLC.Name = "radioButtonVideoPlayerVLC"; - this.radioButtonVideoPlayerVLC.Size = new System.Drawing.Size(45, 17); + this.radioButtonVideoPlayerVLC.Size = new System.Drawing.Size(43, 17); this.radioButtonVideoPlayerVLC.TabIndex = 4; this.radioButtonVideoPlayerVLC.TabStop = true; this.radioButtonVideoPlayerVLC.Text = "VLC"; @@ -1484,7 +1530,7 @@ this.radioButtonVideoPlayerDirectShow.AutoSize = true; this.radioButtonVideoPlayerDirectShow.Location = new System.Drawing.Point(10, 23); this.radioButtonVideoPlayerDirectShow.Name = "radioButtonVideoPlayerDirectShow"; - this.radioButtonVideoPlayerDirectShow.Size = new System.Drawing.Size(83, 17); + this.radioButtonVideoPlayerDirectShow.Size = new System.Drawing.Size(82, 17); this.radioButtonVideoPlayerDirectShow.TabIndex = 1; this.radioButtonVideoPlayerDirectShow.TabStop = true; this.radioButtonVideoPlayerDirectShow.Text = "DirectShow "; @@ -1495,7 +1541,7 @@ this.radioButtonVideoPlayerManagedDirectX.AutoSize = true; this.radioButtonVideoPlayerManagedDirectX.Location = new System.Drawing.Point(10, 90); this.radioButtonVideoPlayerManagedDirectX.Name = "radioButtonVideoPlayerManagedDirectX"; - this.radioButtonVideoPlayerManagedDirectX.Size = new System.Drawing.Size(108, 17); + this.radioButtonVideoPlayerManagedDirectX.Size = new System.Drawing.Size(106, 17); this.radioButtonVideoPlayerManagedDirectX.TabIndex = 6; this.radioButtonVideoPlayerManagedDirectX.TabStop = true; this.radioButtonVideoPlayerManagedDirectX.Text = "Managed DirectX"; @@ -1552,7 +1598,7 @@ this.checkBoxGenerateSpectrogram.AutoSize = true; this.checkBoxGenerateSpectrogram.Location = new System.Drawing.Point(10, 20); this.checkBoxGenerateSpectrogram.Name = "checkBoxGenerateSpectrogram"; - this.checkBoxGenerateSpectrogram.Size = new System.Drawing.Size(131, 17); + this.checkBoxGenerateSpectrogram.Size = new System.Drawing.Size(134, 17); this.checkBoxGenerateSpectrogram.TabIndex = 0; this.checkBoxGenerateSpectrogram.Text = "Generate spectrogram"; this.checkBoxGenerateSpectrogram.UseVisualStyleBackColor = true; @@ -1612,7 +1658,7 @@ this.checkBoxReverseMouseWheelScrollDirection.AutoSize = true; this.checkBoxReverseMouseWheelScrollDirection.Location = new System.Drawing.Point(262, 31); this.checkBoxReverseMouseWheelScrollDirection.Name = "checkBoxReverseMouseWheelScrollDirection"; - this.checkBoxReverseMouseWheelScrollDirection.Size = new System.Drawing.Size(201, 17); + this.checkBoxReverseMouseWheelScrollDirection.Size = new System.Drawing.Size(202, 17); this.checkBoxReverseMouseWheelScrollDirection.TabIndex = 6; this.checkBoxReverseMouseWheelScrollDirection.Text = "Reverse mouse wheel scroll direction"; this.checkBoxReverseMouseWheelScrollDirection.UseVisualStyleBackColor = true; @@ -1750,7 +1796,7 @@ this.checkBoxSpellCheckAutoChangeNames.AutoSize = true; this.checkBoxSpellCheckAutoChangeNames.Location = new System.Drawing.Point(15, 20); this.checkBoxSpellCheckAutoChangeNames.Name = "checkBoxSpellCheckAutoChangeNames"; - this.checkBoxSpellCheckAutoChangeNames.Size = new System.Drawing.Size(209, 17); + this.checkBoxSpellCheckAutoChangeNames.Size = new System.Drawing.Size(216, 17); this.checkBoxSpellCheckAutoChangeNames.TabIndex = 0; this.checkBoxSpellCheckAutoChangeNames.Text = "Auto fix names where only casing differ"; this.checkBoxSpellCheckAutoChangeNames.UseVisualStyleBackColor = true; @@ -1774,7 +1820,7 @@ this.checkBoxFixCommonOcrErrorsUsingHardcodedRules.AutoSize = true; this.checkBoxFixCommonOcrErrorsUsingHardcodedRules.Location = new System.Drawing.Point(15, 115); this.checkBoxFixCommonOcrErrorsUsingHardcodedRules.Name = "checkBoxFixCommonOcrErrorsUsingHardcodedRules"; - this.checkBoxFixCommonOcrErrorsUsingHardcodedRules.Size = new System.Drawing.Size(264, 17); + this.checkBoxFixCommonOcrErrorsUsingHardcodedRules.Size = new System.Drawing.Size(268, 17); this.checkBoxFixCommonOcrErrorsUsingHardcodedRules.TabIndex = 2; this.checkBoxFixCommonOcrErrorsUsingHardcodedRules.Text = "Fix common OCR errors - also use hardcoded rules"; this.checkBoxFixCommonOcrErrorsUsingHardcodedRules.UseVisualStyleBackColor = true; @@ -2059,7 +2105,7 @@ this.checkBoxNamesEtcOnline.AutoSize = true; this.checkBoxNamesEtcOnline.Location = new System.Drawing.Point(7, 22); this.checkBoxNamesEtcOnline.Name = "checkBoxNamesEtcOnline"; - this.checkBoxNamesEtcOnline.Size = new System.Drawing.Size(162, 17); + this.checkBoxNamesEtcOnline.Size = new System.Drawing.Size(163, 17); this.checkBoxNamesEtcOnline.TabIndex = 26; this.checkBoxNamesEtcOnline.Text = "Use online names etc xml file"; this.checkBoxNamesEtcOnline.UseVisualStyleBackColor = true; @@ -2503,7 +2549,7 @@ this.checkBoxShortcutsShift.Enabled = false; this.checkBoxShortcutsShift.Location = new System.Drawing.Point(245, 407); this.checkBoxShortcutsShift.Name = "checkBoxShortcutsShift"; - this.checkBoxShortcutsShift.Size = new System.Drawing.Size(47, 17); + this.checkBoxShortcutsShift.Size = new System.Drawing.Size(48, 17); this.checkBoxShortcutsShift.TabIndex = 3; this.checkBoxShortcutsShift.Text = "Shift"; this.checkBoxShortcutsShift.UseVisualStyleBackColor = true; @@ -2514,7 +2560,7 @@ this.checkBoxShortcutsAlt.Enabled = false; this.checkBoxShortcutsAlt.Location = new System.Drawing.Point(176, 407); this.checkBoxShortcutsAlt.Name = "checkBoxShortcutsAlt"; - this.checkBoxShortcutsAlt.Size = new System.Drawing.Size(38, 17); + this.checkBoxShortcutsAlt.Size = new System.Drawing.Size(39, 17); this.checkBoxShortcutsAlt.TabIndex = 2; this.checkBoxShortcutsAlt.Text = "Alt"; this.checkBoxShortcutsAlt.UseVisualStyleBackColor = true; @@ -2525,7 +2571,7 @@ this.checkBoxShortcutsControl.Enabled = false; this.checkBoxShortcutsControl.Location = new System.Drawing.Point(89, 407); this.checkBoxShortcutsControl.Name = "checkBoxShortcutsControl"; - this.checkBoxShortcutsControl.Size = new System.Drawing.Size(59, 17); + this.checkBoxShortcutsControl.Size = new System.Drawing.Size(61, 17); this.checkBoxShortcutsControl.TabIndex = 1; this.checkBoxShortcutsControl.Text = "Control"; this.checkBoxShortcutsControl.UseVisualStyleBackColor = true; @@ -2614,7 +2660,7 @@ this.checkBoxSyntaxColorTextMoreThanTwoLines.AutoSize = true; this.checkBoxSyntaxColorTextMoreThanTwoLines.Location = new System.Drawing.Point(20, 116); this.checkBoxSyntaxColorTextMoreThanTwoLines.Name = "checkBoxSyntaxColorTextMoreThanTwoLines"; - this.checkBoxSyntaxColorTextMoreThanTwoLines.Size = new System.Drawing.Size(164, 17); + this.checkBoxSyntaxColorTextMoreThanTwoLines.Size = new System.Drawing.Size(170, 17); this.checkBoxSyntaxColorTextMoreThanTwoLines.TabIndex = 3; this.checkBoxSyntaxColorTextMoreThanTwoLines.Text = "Text - color if more than lines:"; this.checkBoxSyntaxColorTextMoreThanTwoLines.UseVisualStyleBackColor = true; @@ -2624,7 +2670,7 @@ this.checkBoxSyntaxOverlap.AutoSize = true; this.checkBoxSyntaxOverlap.Location = new System.Drawing.Point(20, 154); this.checkBoxSyntaxOverlap.Name = "checkBoxSyntaxOverlap"; - this.checkBoxSyntaxOverlap.Size = new System.Drawing.Size(127, 17); + this.checkBoxSyntaxOverlap.Size = new System.Drawing.Size(129, 17); this.checkBoxSyntaxOverlap.TabIndex = 4; this.checkBoxSyntaxOverlap.Text = "Time - color if overlap"; this.checkBoxSyntaxOverlap.UseVisualStyleBackColor = true; @@ -2653,7 +2699,7 @@ this.checkBoxSyntaxColorTextTooLong.AutoSize = true; this.checkBoxSyntaxColorTextTooLong.Location = new System.Drawing.Point(20, 93); this.checkBoxSyntaxColorTextTooLong.Name = "checkBoxSyntaxColorTextTooLong"; - this.checkBoxSyntaxColorTextTooLong.Size = new System.Drawing.Size(128, 17); + this.checkBoxSyntaxColorTextTooLong.Size = new System.Drawing.Size(132, 17); this.checkBoxSyntaxColorTextTooLong.TabIndex = 2; this.checkBoxSyntaxColorTextTooLong.Text = "Text - color if too long"; this.checkBoxSyntaxColorTextTooLong.UseVisualStyleBackColor = true; @@ -2663,7 +2709,7 @@ this.checkBoxSyntaxColorDurationTooLarge.AutoSize = true; this.checkBoxSyntaxColorDurationTooLarge.Location = new System.Drawing.Point(20, 58); this.checkBoxSyntaxColorDurationTooLarge.Name = "checkBoxSyntaxColorDurationTooLarge"; - this.checkBoxSyntaxColorDurationTooLarge.Size = new System.Drawing.Size(150, 17); + this.checkBoxSyntaxColorDurationTooLarge.Size = new System.Drawing.Size(155, 17); this.checkBoxSyntaxColorDurationTooLarge.TabIndex = 1; this.checkBoxSyntaxColorDurationTooLarge.Text = "Duration - color if too large"; this.checkBoxSyntaxColorDurationTooLarge.UseVisualStyleBackColor = true; @@ -2686,6 +2732,178 @@ this.labelStatus.TabIndex = 3; this.labelStatus.Text = "labelStatus"; // + // labelCustomSearch2 + // + this.labelCustomSearch2.AutoSize = true; + this.labelCustomSearch2.Location = new System.Drawing.Point(12, 68); + this.labelCustomSearch2.Name = "labelCustomSearch2"; + this.labelCustomSearch2.Size = new System.Drawing.Size(13, 13); + this.labelCustomSearch2.TabIndex = 6; + this.labelCustomSearch2.Text = "2"; + this.labelCustomSearch2.Click += new System.EventHandler(this.label1_Click); + // + // textBoxCustomSearchUrl2 + // + this.textBoxCustomSearchUrl2.Location = new System.Drawing.Point(185, 65); + this.textBoxCustomSearchUrl2.Name = "textBoxCustomSearchUrl2"; + this.textBoxCustomSearchUrl2.Size = new System.Drawing.Size(574, 21); + this.textBoxCustomSearchUrl2.TabIndex = 5; + this.textBoxCustomSearchUrl2.TextChanged += new System.EventHandler(this.textBox1_TextChanged); + // + // comboBoxCustomSearch2 + // + this.comboBoxCustomSearch2.FormattingEnabled = true; + this.comboBoxCustomSearch2.Items.AddRange(new object[] { + "Dictionary.com", + "learnersdictionary.com", + "Merriam-Webster", + "The Free Dictionary", + "Thesaurus.com", + "urbandictionary.com", + "VISUWORDS", + "Wikipedia"}); + this.comboBoxCustomSearch2.Location = new System.Drawing.Point(31, 65); + this.comboBoxCustomSearch2.Name = "comboBoxCustomSearch2"; + this.comboBoxCustomSearch2.Size = new System.Drawing.Size(148, 21); + this.comboBoxCustomSearch2.TabIndex = 4; + this.comboBoxCustomSearch2.SelectedIndexChanged += new System.EventHandler(this.comboBoxCustomSearch_SelectedIndexChanged); + // + // labelCustomSearch3 + // + this.labelCustomSearch3.AutoSize = true; + this.labelCustomSearch3.Location = new System.Drawing.Point(12, 95); + this.labelCustomSearch3.Name = "labelCustomSearch3"; + this.labelCustomSearch3.Size = new System.Drawing.Size(13, 13); + this.labelCustomSearch3.TabIndex = 9; + this.labelCustomSearch3.Text = "3"; + // + // textBoxCustomSearchUrl3 + // + this.textBoxCustomSearchUrl3.Location = new System.Drawing.Point(185, 92); + this.textBoxCustomSearchUrl3.Name = "textBoxCustomSearchUrl3"; + this.textBoxCustomSearchUrl3.Size = new System.Drawing.Size(574, 21); + this.textBoxCustomSearchUrl3.TabIndex = 8; + // + // comboBoxCustomSearch3 + // + this.comboBoxCustomSearch3.FormattingEnabled = true; + this.comboBoxCustomSearch3.Items.AddRange(new object[] { + "Dictionary.com", + "learnersdictionary.com", + "Merriam-Webster", + "The Free Dictionary", + "Thesaurus.com", + "urbandictionary.com", + "VISUWORDS", + "Wikipedia"}); + this.comboBoxCustomSearch3.Location = new System.Drawing.Point(31, 92); + this.comboBoxCustomSearch3.Name = "comboBoxCustomSearch3"; + this.comboBoxCustomSearch3.Size = new System.Drawing.Size(148, 21); + this.comboBoxCustomSearch3.TabIndex = 7; + this.comboBoxCustomSearch3.SelectedIndexChanged += new System.EventHandler(this.comboBoxCustomSearch_SelectedIndexChanged); + // + // labelCustomSearch4 + // + this.labelCustomSearch4.AutoSize = true; + this.labelCustomSearch4.Location = new System.Drawing.Point(12, 122); + this.labelCustomSearch4.Name = "labelCustomSearch4"; + this.labelCustomSearch4.Size = new System.Drawing.Size(13, 13); + this.labelCustomSearch4.TabIndex = 12; + this.labelCustomSearch4.Text = "4"; + // + // textBoxCustomSearchUrl4 + // + this.textBoxCustomSearchUrl4.Location = new System.Drawing.Point(185, 119); + this.textBoxCustomSearchUrl4.Name = "textBoxCustomSearchUrl4"; + this.textBoxCustomSearchUrl4.Size = new System.Drawing.Size(574, 21); + this.textBoxCustomSearchUrl4.TabIndex = 11; + // + // comboBoxCustomSearch4 + // + this.comboBoxCustomSearch4.FormattingEnabled = true; + this.comboBoxCustomSearch4.Items.AddRange(new object[] { + "Dictionary.com", + "learnersdictionary.com", + "Merriam-Webster", + "The Free Dictionary", + "Thesaurus.com", + "urbandictionary.com", + "VISUWORDS", + "Wikipedia"}); + this.comboBoxCustomSearch4.Location = new System.Drawing.Point(31, 119); + this.comboBoxCustomSearch4.Name = "comboBoxCustomSearch4"; + this.comboBoxCustomSearch4.Size = new System.Drawing.Size(148, 21); + this.comboBoxCustomSearch4.TabIndex = 10; + this.comboBoxCustomSearch4.SelectedIndexChanged += new System.EventHandler(this.comboBoxCustomSearch_SelectedIndexChanged); + // + // labelCustomSearch5 + // + this.labelCustomSearch5.AutoSize = true; + this.labelCustomSearch5.Location = new System.Drawing.Point(12, 149); + this.labelCustomSearch5.Name = "labelCustomSearch5"; + this.labelCustomSearch5.Size = new System.Drawing.Size(13, 13); + this.labelCustomSearch5.TabIndex = 15; + this.labelCustomSearch5.Text = "5"; + // + // textBoxCustomSearchUrl5 + // + this.textBoxCustomSearchUrl5.Location = new System.Drawing.Point(185, 146); + this.textBoxCustomSearchUrl5.Name = "textBoxCustomSearchUrl5"; + this.textBoxCustomSearchUrl5.Size = new System.Drawing.Size(574, 21); + this.textBoxCustomSearchUrl5.TabIndex = 14; + // + // comboBoxCustomSearch5 + // + this.comboBoxCustomSearch5.FormattingEnabled = true; + this.comboBoxCustomSearch5.Items.AddRange(new object[] { + "Dictionary.com", + "learnersdictionary.com", + "Merriam-Webster", + "The Free Dictionary", + "Thesaurus.com", + "urbandictionary.com", + "VISUWORDS", + "Wikipedia"}); + this.comboBoxCustomSearch5.Location = new System.Drawing.Point(31, 146); + this.comboBoxCustomSearch5.Name = "comboBoxCustomSearch5"; + this.comboBoxCustomSearch5.Size = new System.Drawing.Size(148, 21); + this.comboBoxCustomSearch5.TabIndex = 13; + this.comboBoxCustomSearch5.SelectedIndexChanged += new System.EventHandler(this.comboBoxCustomSearch_SelectedIndexChanged); + // + // labelCustomSearch6 + // + this.labelCustomSearch6.AutoSize = true; + this.labelCustomSearch6.Location = new System.Drawing.Point(12, 175); + this.labelCustomSearch6.Name = "labelCustomSearch6"; + this.labelCustomSearch6.Size = new System.Drawing.Size(13, 13); + this.labelCustomSearch6.TabIndex = 18; + this.labelCustomSearch6.Text = "6"; + // + // textBoxCustomSearchUrl6 + // + this.textBoxCustomSearchUrl6.Location = new System.Drawing.Point(185, 172); + this.textBoxCustomSearchUrl6.Name = "textBoxCustomSearchUrl6"; + this.textBoxCustomSearchUrl6.Size = new System.Drawing.Size(574, 21); + this.textBoxCustomSearchUrl6.TabIndex = 17; + // + // comboBoxCustomSearch6 + // + this.comboBoxCustomSearch6.FormattingEnabled = true; + this.comboBoxCustomSearch6.Items.AddRange(new object[] { + "Dictionary.com", + "learnersdictionary.com", + "Merriam-Webster", + "The Free Dictionary", + "Thesaurus.com", + "urbandictionary.com", + "VISUWORDS", + "Wikipedia"}); + this.comboBoxCustomSearch6.Location = new System.Drawing.Point(31, 172); + this.comboBoxCustomSearch6.Name = "comboBoxCustomSearch6"; + this.comboBoxCustomSearch6.Size = new System.Drawing.Size(148, 21); + this.comboBoxCustomSearch6.TabIndex = 16; + this.comboBoxCustomSearch6.SelectedIndexChanged += new System.EventHandler(this.comboBoxCustomSearch_SelectedIndexChanged); + // // Settings // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -2914,9 +3132,9 @@ private System.Windows.Forms.CheckBox checkBoxRemoveBlankLinesWhenOpening; private System.Windows.Forms.GroupBox groupBoxMainWindowVideoControls; private System.Windows.Forms.GroupBox groupBoxVideoPlayerDefault; - private System.Windows.Forms.TextBox textBoxCustomSearchUrl; + private System.Windows.Forms.TextBox textBoxCustomSearchUrl1; private System.Windows.Forms.Label labelCustomSearch; - private System.Windows.Forms.ComboBox comboBoxCustomSearch; + private System.Windows.Forms.ComboBox comboBoxCustomSearch1; private System.Windows.Forms.TabPage tabPageWaveForm; private System.Windows.Forms.GroupBox groupBoxWaveFormAppearence; private System.Windows.Forms.Panel panelWaveFormBackgroundColor; @@ -2990,5 +3208,21 @@ private System.Windows.Forms.CheckBox checkBoxSubtitleCenter; private System.Windows.Forms.CheckBox checkBoxVideoPlayerShowFullscreenButton; private System.Windows.Forms.CheckBox checkBoxVideoPlayerShowMuteButton; + private System.Windows.Forms.Label labelCustomSearch1; + private System.Windows.Forms.Label labelCustomSearch2; + private System.Windows.Forms.TextBox textBoxCustomSearchUrl2; + private System.Windows.Forms.ComboBox comboBoxCustomSearch2; + private System.Windows.Forms.Label labelCustomSearch6; + private System.Windows.Forms.TextBox textBoxCustomSearchUrl6; + private System.Windows.Forms.ComboBox comboBoxCustomSearch6; + private System.Windows.Forms.Label labelCustomSearch5; + private System.Windows.Forms.TextBox textBoxCustomSearchUrl5; + private System.Windows.Forms.ComboBox comboBoxCustomSearch5; + private System.Windows.Forms.Label labelCustomSearch4; + private System.Windows.Forms.TextBox textBoxCustomSearchUrl4; + private System.Windows.Forms.ComboBox comboBoxCustomSearch4; + private System.Windows.Forms.Label labelCustomSearch3; + private System.Windows.Forms.TextBox textBoxCustomSearchUrl3; + private System.Windows.Forms.ComboBox comboBoxCustomSearch3; } } \ No newline at end of file diff --git a/src/Forms/Settings.cs b/src/Forms/Settings.cs index b35875a57..0827e9cc1 100644 --- a/src/Forms/Settings.cs +++ b/src/Forms/Settings.cs @@ -129,8 +129,18 @@ namespace Nikse.SubtitleEdit.Forms else comboBoxlVideoPlayerPreviewFontSize.SelectedIndex = 3; - comboBoxCustomSearch.Text = Configuration.Settings.VideoControls.CustomSearchText; - textBoxCustomSearchUrl.Text = Configuration.Settings.VideoControls.CustomSearchUrl; + comboBoxCustomSearch1.Text = Configuration.Settings.VideoControls.CustomSearchText1; + comboBoxCustomSearch2.Text = Configuration.Settings.VideoControls.CustomSearchText2; + comboBoxCustomSearch3.Text = Configuration.Settings.VideoControls.CustomSearchText3; + comboBoxCustomSearch4.Text = Configuration.Settings.VideoControls.CustomSearchText4; + comboBoxCustomSearch5.Text = Configuration.Settings.VideoControls.CustomSearchText5; + comboBoxCustomSearch6.Text = Configuration.Settings.VideoControls.CustomSearchText6; + textBoxCustomSearchUrl1.Text = Configuration.Settings.VideoControls.CustomSearchUrl1; + textBoxCustomSearchUrl2.Text = Configuration.Settings.VideoControls.CustomSearchUrl2; + textBoxCustomSearchUrl3.Text = Configuration.Settings.VideoControls.CustomSearchUrl3; + textBoxCustomSearchUrl4.Text = Configuration.Settings.VideoControls.CustomSearchUrl4; + textBoxCustomSearchUrl5.Text = Configuration.Settings.VideoControls.CustomSearchUrl5; + textBoxCustomSearchUrl6.Text = Configuration.Settings.VideoControls.CustomSearchUrl6; foreach (var x in System.Drawing.FontFamily.Families) { @@ -219,11 +229,11 @@ namespace Nikse.SubtitleEdit.Forms labelSubtitleFontSize.Text = language.SubtitleFontSize; checkBoxSubtitleFontBold.Text = language.SubtitleBold; checkBoxSubtitleCenter.Text = language.SubtitleCenter; - checkBoxSubtitleCenter.Left = checkBoxSubtitleFontBold.Left + checkBoxSubtitleFontBold.Width + 6; + checkBoxSubtitleCenter.Left = checkBoxSubtitleFontBold.Left + checkBoxSubtitleFontBold.Width + 4; labelSubtitleFontColor.Text = language.SubtitleFontColor; labelSubtitleFontBackgroundColor.Text = language.SubtitleBackgroundColor; labelSpellChecker.Text = language.SpellChecker; - comboBoxSpellChecker.Left = labelSpellChecker.Left + labelSpellChecker.Width + 3; + comboBoxSpellChecker.Left = labelSpellChecker.Left + labelSpellChecker.Width + 4; checkBoxRememberRecentFiles.Text = language.RememberRecentFiles; checkBoxReopenLastOpened.Text = language.StartWithLastFileLoaded; checkBoxRememberSelectedLine.Text = language.RememberSelectedLine; @@ -246,7 +256,7 @@ namespace Nikse.SubtitleEdit.Forms comboBoxTimeCodeMode.SelectedIndex = 1; else comboBoxTimeCodeMode.SelectedIndex = 0; - comboBoxTimeCodeMode.Left = labelTimeCodeMode.Left + labelTimeCodeMode.Width + 5; + comboBoxTimeCodeMode.Left = labelTimeCodeMode.Left + labelTimeCodeMode.Width + 4; comboBoxAutoBackup.Items[0] = Configuration.Settings.Language.General.None; comboBoxAutoBackup.Items[1] = language.AutoBackupEveryMinute; @@ -271,10 +281,12 @@ namespace Nikse.SubtitleEdit.Forms checkBoxVideoPlayerShowFullscreenButton.Text = language.ShowFullscreenButton; labelDefaultVol.Text = language.DefaultVolume; + comboBoxVideoPlayerDefaultVolume.Left = labelDefaultVol.Left + labelDefaultVol.Width; labelVolDescr.Text = language.VolumeNotes; + labelVolDescr.Left = comboBoxVideoPlayerDefaultVolume.Left + comboBoxVideoPlayerDefaultVolume.Width + 4; labelVideoPlayerPreviewFontSize.Text = language.PreviewFontSize; - comboBoxlVideoPlayerPreviewFontSize.Left = labelVideoPlayerPreviewFontSize.Left + labelVideoPlayerPreviewFontSize.Width; + comboBoxlVideoPlayerPreviewFontSize.Left = labelVideoPlayerPreviewFontSize.Left + labelVideoPlayerPreviewFontSize.Width; groupBoxMainWindowVideoControls.Text = language.MainWindowVideoControls; labelCustomSearch.Text = language.CustomSearchTextAndUrl; @@ -305,7 +317,7 @@ namespace Nikse.SubtitleEdit.Forms groupBoxWordLists.Text = language.WordLists; labelWordListLanguage.Text = language.Language; - comboBoxWordListLanguage.Left = labelWordListLanguage.Left + labelWordListLanguage.Width + 5; + comboBoxWordListLanguage.Left = labelWordListLanguage.Left + labelWordListLanguage.Width + 4; groupBoxNamesIgonoreLists.Text = language.NamesIgnoreLists; groupBoxUserWordList.Text = language.UserWordList; groupBoxOcrFixList.Text = language.OcrFixList; @@ -545,6 +557,15 @@ namespace Nikse.SubtitleEdit.Forms createNode.Nodes.Add(Configuration.Settings.Language.Settings.MainCreateStartDownEndUp + GetShortcutText(Configuration.Settings.Shortcuts.MainCreateStartDownEndUp)); treeViewShortcuts.Nodes.Add(createNode); + var translateNote = new TreeNode(Configuration.Settings.Language.Main.VideoControls.Translate); + translateNote.Nodes.Add(Configuration.Settings.Language.Settings.CustomSearch1 + GetShortcutText(Configuration.Settings.Shortcuts.MainTranslateCustomSearch1)); + translateNote.Nodes.Add(Configuration.Settings.Language.Settings.CustomSearch2 + GetShortcutText(Configuration.Settings.Shortcuts.MainTranslateCustomSearch2)); + translateNote.Nodes.Add(Configuration.Settings.Language.Settings.CustomSearch3 + GetShortcutText(Configuration.Settings.Shortcuts.MainTranslateCustomSearch3)); + translateNote.Nodes.Add(Configuration.Settings.Language.Settings.CustomSearch4 + GetShortcutText(Configuration.Settings.Shortcuts.MainTranslateCustomSearch4)); + translateNote.Nodes.Add(Configuration.Settings.Language.Settings.CustomSearch5 + GetShortcutText(Configuration.Settings.Shortcuts.MainTranslateCustomSearch5)); + translateNote.Nodes.Add(Configuration.Settings.Language.Settings.CustomSearch6 + GetShortcutText(Configuration.Settings.Shortcuts.MainTranslateCustomSearch6)); + treeViewShortcuts.Nodes.Add(translateNote); + var adjustNode = new TreeNode(Configuration.Settings.Language.Main.VideoControls.Adjust); adjustNode.Nodes.Add(Configuration.Settings.Language.Main.VideoControls.SetstartTimeAndOffsetOfRest + GetShortcutText(Configuration.Settings.Shortcuts.MainAdjustSetStartAndOffsetTheRest)); adjustNode.Nodes.Add(Configuration.Settings.Language.Main.VideoControls.SetEndTimeAndGoToNext + GetShortcutText(Configuration.Settings.Shortcuts.MainAdjustSetEndAndGotoNext)); @@ -600,7 +621,7 @@ namespace Nikse.SubtitleEdit.Forms checkBoxSyntaxColorDurationTooLarge.Text = language.SyntaxColorDurationIfTooLarge; checkBoxSyntaxColorTextTooLong.Text = language.SyntaxColorTextIfTooLong; checkBoxSyntaxColorTextMoreThanTwoLines.Text = language.SyntaxColorTextMoreThanXLines; - numericUpDownSyntaxColorTextMoreThanXLines.Left = checkBoxSyntaxColorTextMoreThanTwoLines.Left + checkBoxSyntaxColorTextMoreThanTwoLines.Width + 5; + numericUpDownSyntaxColorTextMoreThanXLines.Left = checkBoxSyntaxColorTextMoreThanTwoLines.Left + checkBoxSyntaxColorTextMoreThanTwoLines.Width + 4; checkBoxSyntaxOverlap.Text = language.SyntaxColorOverlap; FixLargeFonts(); @@ -863,8 +884,18 @@ namespace Nikse.SubtitleEdit.Forms gs.VideoPlayerPreviewFontSize = int.Parse(comboBoxlVideoPlayerPreviewFontSize.Items[0].ToString()) + comboBoxlVideoPlayerPreviewFontSize.SelectedIndex; - Configuration.Settings.VideoControls.CustomSearchText = comboBoxCustomSearch.Text; - Configuration.Settings.VideoControls.CustomSearchUrl = textBoxCustomSearchUrl.Text; + Configuration.Settings.VideoControls.CustomSearchText1 = comboBoxCustomSearch1.Text; + Configuration.Settings.VideoControls.CustomSearchText2 = comboBoxCustomSearch2.Text; + Configuration.Settings.VideoControls.CustomSearchText3 = comboBoxCustomSearch3.Text; + Configuration.Settings.VideoControls.CustomSearchText4 = comboBoxCustomSearch4.Text; + Configuration.Settings.VideoControls.CustomSearchText5 = comboBoxCustomSearch5.Text; + Configuration.Settings.VideoControls.CustomSearchText6 = comboBoxCustomSearch6.Text; + Configuration.Settings.VideoControls.CustomSearchUrl1 = textBoxCustomSearchUrl1.Text; + Configuration.Settings.VideoControls.CustomSearchUrl2 = textBoxCustomSearchUrl2.Text; + Configuration.Settings.VideoControls.CustomSearchUrl3 = textBoxCustomSearchUrl3.Text; + Configuration.Settings.VideoControls.CustomSearchUrl4 = textBoxCustomSearchUrl4.Text; + Configuration.Settings.VideoControls.CustomSearchUrl5 = textBoxCustomSearchUrl5.Text; + Configuration.Settings.VideoControls.CustomSearchUrl6 = textBoxCustomSearchUrl6.Text; int maxLength = (int)numericUpDownSubtitleLineMaximumLength.Value; if (maxLength > 10 && maxLength < 1000) @@ -1087,13 +1118,35 @@ namespace Nikse.SubtitleEdit.Forms Configuration.Settings.Shortcuts.MainCreateSetStart = GetShortcut(node.Text); else if (text == Configuration.Settings.Language.Main.VideoControls.SetEndTime.Replace("&", string.Empty)) Configuration.Settings.Shortcuts.MainCreateSetEnd = GetShortcut(node.Text); - if (text == Configuration.Settings.Language.Settings.MainCreateStartDownEndUp.Replace("&", string.Empty)) + else if (text == Configuration.Settings.Language.Settings.MainCreateStartDownEndUp.Replace("&", string.Empty)) Configuration.Settings.Shortcuts.MainCreateStartDownEndUp = GetShortcut(node.Text); } } - //Adjust + + //Translate foreach (TreeNode node in treeViewShortcuts.Nodes[8].Nodes) + { + if (node.Text.Contains("[")) + { + string text = node.Text.Substring(0, node.Text.IndexOf("[")).Trim(); + if (text == Configuration.Settings.Language.Settings.CustomSearch1.Replace("&", string.Empty)) + Configuration.Settings.Shortcuts.MainTranslateCustomSearch1 = GetShortcut(node.Text); + else if (text == Configuration.Settings.Language.Settings.CustomSearch2.Replace("&", string.Empty)) + Configuration.Settings.Shortcuts.MainTranslateCustomSearch2 = GetShortcut(node.Text); + else if (text == Configuration.Settings.Language.Settings.CustomSearch3.Replace("&", string.Empty)) + Configuration.Settings.Shortcuts.MainTranslateCustomSearch3 = GetShortcut(node.Text); + else if (text == Configuration.Settings.Language.Settings.CustomSearch4.Replace("&", string.Empty)) + Configuration.Settings.Shortcuts.MainTranslateCustomSearch4 = GetShortcut(node.Text); + else if (text == Configuration.Settings.Language.Settings.CustomSearch5.Replace("&", string.Empty)) + Configuration.Settings.Shortcuts.MainTranslateCustomSearch5 = GetShortcut(node.Text); + else if (text == Configuration.Settings.Language.Settings.CustomSearch6.Replace("&", string.Empty)) + Configuration.Settings.Shortcuts.MainTranslateCustomSearch6 = GetShortcut(node.Text); + } + } + + //Adjust + foreach (TreeNode node in treeViewShortcuts.Nodes[9].Nodes) { if (node.Text.Contains("[")) { @@ -1124,7 +1177,7 @@ namespace Nikse.SubtitleEdit.Forms } //Audio-visualizer - foreach (TreeNode node in treeViewShortcuts.Nodes[9].Nodes) + foreach (TreeNode node in treeViewShortcuts.Nodes[10].Nodes) { if (node.Text.Contains("[")) { @@ -1830,14 +1883,37 @@ namespace Nikse.SubtitleEdit.Forms private void comboBoxCustomSearch_SelectedIndexChanged(object sender, EventArgs e) { - if (comboBoxCustomSearch.SelectedIndex >= 0) + ComboBox cb = (ComboBox)sender; + TextBox tb = textBoxCustomSearchUrl1; + if (cb == comboBoxCustomSearch2) + tb = textBoxCustomSearchUrl2; + else if (cb == comboBoxCustomSearch3) + tb = textBoxCustomSearchUrl3; + else if (cb == comboBoxCustomSearch4) + tb = textBoxCustomSearchUrl4; + else if (cb == comboBoxCustomSearch5) + tb = textBoxCustomSearchUrl5; + else if (cb == comboBoxCustomSearch6) + tb = textBoxCustomSearchUrl6; + + if (cb.SelectedIndex >= 0) { - if (comboBoxCustomSearch.SelectedIndex == 0) - textBoxCustomSearchUrl.Text = "http://www.thefreedictionary.com/{0}"; - else if (comboBoxCustomSearch.SelectedIndex == 1) - textBoxCustomSearchUrl.Text = "http://dictionary.reference.com/browse/{0}"; - else if (comboBoxCustomSearch.SelectedIndex == 2) - textBoxCustomSearchUrl.Text = "http://www.visuwords.com/?word={0}"; + if (cb.SelectedIndex == 0) + tb.Text = "http://dictionary.reference.com/browse/{0}"; + else if (cb.SelectedIndex == 1) + tb.Text = "http://www.learnersdictionary.com/search/{0}"; + else if (cb.SelectedIndex == 2) + tb.Text = "http://www.merriam-webster.com/dictionary/{0}"; + else if (cb.SelectedIndex == 3) + tb.Text = "http://www.thefreedictionary.com/{0}"; + else if (cb.SelectedIndex == 4) + tb.Text = "http://thesaurus.com/browse/{0}"; + else if (cb.SelectedIndex == 5) + tb.Text = "http://www.urbandictionary.com/define.php?term={0}"; + else if (cb.SelectedIndex == 6) + tb.Text = "http://www.visuwords.com/?word={0}"; + else if (cb.SelectedIndex == 7) + tb.Text = "http://en.m.wikipedia.org/wiki?search={0}"; } } @@ -2072,5 +2148,15 @@ namespace Nikse.SubtitleEdit.Forms panelListViewSyntaxColorError.BackColor = colorDialogSSAStyle.Color; } + private void textBox1_TextChanged(object sender, EventArgs e) + { + + } + + private void label1_Click(object sender, EventArgs e) + { + + } + } } diff --git a/src/Logic/Language.cs b/src/Logic/Language.cs index a13c05fd7..591bfc691 100644 --- a/src/Logic/Language.cs +++ b/src/Logic/Language.cs @@ -1429,6 +1429,12 @@ can edit in same subtitle file (collaboration)", Pause = "Pause", TogglePlayPause = "Toggle play/pause", Fullscreen = "Fullscreen", + CustomSearch1 = "Translate, custom search 1", + CustomSearch2 = "Translate, custom search 2", + CustomSearch3 = "Translate, custom search 3", + CustomSearch4 = "Translate, custom search 4", + CustomSearch5 = "Translate, custom search 5", + CustomSearch6 = "Translate, custom search 6", SyntaxColoring = "Syntax coloring", ListViewSyntaxColoring = "List view syntax coloring", SyntaxColorDurationIfTooSmall = "Color duration if too short", diff --git a/src/Logic/LanguageStructure.cs b/src/Logic/LanguageStructure.cs index f00047dd3..c95f72401 100644 --- a/src/Logic/LanguageStructure.cs +++ b/src/Logic/LanguageStructure.cs @@ -1351,6 +1351,12 @@ public string TogglePlayPause { get; set; } public string Pause { get; set; } public string Fullscreen { get; set; } + public string CustomSearch1 { get; set; } + public string CustomSearch2 { get; set; } + public string CustomSearch3 { get; set; } + public string CustomSearch4 { get; set; } + public string CustomSearch5 { get; set; } + public string CustomSearch6 { get; set; } public string SyntaxColoring { get; set; } public string ListViewSyntaxColoring { get; set; } public string SyntaxColorDurationIfTooSmall { get; set; } diff --git a/src/Logic/Settings.cs b/src/Logic/Settings.cs index 5c94ce350..45f1f2ff6 100644 --- a/src/Logic/Settings.cs +++ b/src/Logic/Settings.cs @@ -446,8 +446,18 @@ namespace Nikse.SubtitleEdit.Logic public class VideoControlsSettings { - public string CustomSearchText { get; set; } - public string CustomSearchUrl { get; set; } + public string CustomSearchText1 { get; set; } + public string CustomSearchText2 { get; set; } + public string CustomSearchText3 { get; set; } + public string CustomSearchText4 { get; set; } + public string CustomSearchText5 { get; set; } + public string CustomSearchText6 { get; set; } + public string CustomSearchUrl1 { get; set; } + public string CustomSearchUrl2 { get; set; } + public string CustomSearchUrl3 { get; set; } + public string CustomSearchUrl4 { get; set; } + public string CustomSearchUrl5 { get; set; } + public string CustomSearchUrl6 { get; set; } public string LastActiveTab { get; set; } public bool WaveFormDrawGrid { get; set; } public Color WaveFormGridColor { get; set; } @@ -466,8 +476,11 @@ namespace Nikse.SubtitleEdit.Logic public VideoControlsSettings() { - CustomSearchText = "The Free Dictionary"; - CustomSearchUrl = "http://www.thefreedictionary.com/{0}"; + CustomSearchText1 = "The Free Dictionary"; + CustomSearchUrl1 = "http://www.thefreedictionary.com/{0}"; + CustomSearchText2 = "Wikipedia"; + CustomSearchUrl2 = "http://en.m.wikipedia.org/wiki?search={0}"; + LastActiveTab = "Translate"; WaveFormDrawGrid = true; WaveFormGridColor = Color.FromArgb(255, 20, 20, 18); @@ -599,6 +612,12 @@ namespace Nikse.SubtitleEdit.Logic public string WaveformSearchSilenceForward { get; set; } public string WaveformSearchSilenceBack { get; set; } public string WaveformAddTextHere { get; set; } + public string MainTranslateCustomSearch1 { get; set; } + public string MainTranslateCustomSearch2 { get; set; } + public string MainTranslateCustomSearch3 { get; set; } + public string MainTranslateCustomSearch4 { get; set; } + public string MainTranslateCustomSearch5 { get; set; } + public string MainTranslateCustomSearch6 { get; set; } public Shortcuts() { @@ -1337,12 +1356,42 @@ namespace Nikse.SubtitleEdit.Logic settings.VideoControls = new VideoControlsSettings(); node = doc.DocumentElement.SelectSingleNode("VideoControls"); - subNode = node.SelectSingleNode("CustomSearchText"); + subNode = node.SelectSingleNode("CustomSearchText1"); if (subNode != null) - settings.VideoControls.CustomSearchText = subNode.InnerText; - subNode = node.SelectSingleNode("CustomSearchUrl"); + settings.VideoControls.CustomSearchText1 = subNode.InnerText; + subNode = node.SelectSingleNode("CustomSearchText2"); if (subNode != null) - settings.VideoControls.CustomSearchUrl = subNode.InnerText; + settings.VideoControls.CustomSearchText2 = subNode.InnerText; + subNode = node.SelectSingleNode("CustomSearchText3"); + if (subNode != null) + settings.VideoControls.CustomSearchText3 = subNode.InnerText; + subNode = node.SelectSingleNode("CustomSearchText4"); + if (subNode != null) + settings.VideoControls.CustomSearchText4 = subNode.InnerText; + subNode = node.SelectSingleNode("CustomSearchText5"); + if (subNode != null) + settings.VideoControls.CustomSearchText5 = subNode.InnerText; + subNode = node.SelectSingleNode("CustomSearchText6"); + if (subNode != null) + settings.VideoControls.CustomSearchText6 = subNode.InnerText; + subNode = node.SelectSingleNode("CustomSearchUrl1"); + if (subNode != null) + settings.VideoControls.CustomSearchUrl1 = subNode.InnerText; + subNode = node.SelectSingleNode("CustomSearchUrl1"); + if (subNode != null) + settings.VideoControls.CustomSearchUrl1 = subNode.InnerText; + subNode = node.SelectSingleNode("CustomSearchUrl2"); + if (subNode != null) + settings.VideoControls.CustomSearchUrl2 = subNode.InnerText; + subNode = node.SelectSingleNode("CustomSearchUrl3"); + if (subNode != null) + settings.VideoControls.CustomSearchUrl3 = subNode.InnerText; + subNode = node.SelectSingleNode("CustomSearchUrl4"); + if (subNode != null) + settings.VideoControls.CustomSearchUrl5 = subNode.InnerText; + subNode = node.SelectSingleNode("CustomSearchUrl6"); + if (subNode != null) + settings.VideoControls.CustomSearchUrl6 = subNode.InnerText; subNode = node.SelectSingleNode("LastActiveTab"); if (subNode != null) settings.VideoControls.LastActiveTab = subNode.InnerText; @@ -1645,6 +1694,24 @@ namespace Nikse.SubtitleEdit.Logic subNode = node.SelectSingleNode("WaveformAddTextHere"); if (subNode != null) settings.Shortcuts.WaveformAddTextHere = subNode.InnerText; + subNode = node.SelectSingleNode("MainTranslateCustomSearch1"); + if (subNode != null) + settings.Shortcuts.MainTranslateCustomSearch1 = subNode.InnerText; + subNode = node.SelectSingleNode("MainTranslateCustomSearch2"); + if (subNode != null) + settings.Shortcuts.MainTranslateCustomSearch2 = subNode.InnerText; + subNode = node.SelectSingleNode("MainTranslateCustomSearch3"); + if (subNode != null) + settings.Shortcuts.MainTranslateCustomSearch3 = subNode.InnerText; + subNode = node.SelectSingleNode("MainTranslateCustomSearch4"); + if (subNode != null) + settings.Shortcuts.MainTranslateCustomSearch4 = subNode.InnerText; + subNode = node.SelectSingleNode("MainTranslateCustomSearch5"); + if (subNode != null) + settings.Shortcuts.MainTranslateCustomSearch5 = subNode.InnerText; + subNode = node.SelectSingleNode("MainTranslateCustomSearch6"); + if (subNode != null) + settings.Shortcuts.MainTranslateCustomSearch6 = subNode.InnerText; } settings.RemoveTextForHearingImpaired = new RemoveTextForHearingImpairedSettings(); @@ -1914,8 +1981,18 @@ namespace Nikse.SubtitleEdit.Logic textWriter.WriteEndElement(); textWriter.WriteStartElement("VideoControls", ""); - textWriter.WriteElementString("CustomSearchText", settings.VideoControls.CustomSearchText); - textWriter.WriteElementString("CustomSearchUrl", settings.VideoControls.CustomSearchUrl); + textWriter.WriteElementString("CustomSearchText1", settings.VideoControls.CustomSearchText1); + textWriter.WriteElementString("CustomSearchText2", settings.VideoControls.CustomSearchText2); + textWriter.WriteElementString("CustomSearchText3", settings.VideoControls.CustomSearchText3); + textWriter.WriteElementString("CustomSearchText4", settings.VideoControls.CustomSearchText4); + textWriter.WriteElementString("CustomSearchText5", settings.VideoControls.CustomSearchText5); + textWriter.WriteElementString("CustomSearchText6", settings.VideoControls.CustomSearchText6); + textWriter.WriteElementString("CustomSearchUrl1", settings.VideoControls.CustomSearchUrl1); + textWriter.WriteElementString("CustomSearchUrl2", settings.VideoControls.CustomSearchUrl2); + textWriter.WriteElementString("CustomSearchUrl3", settings.VideoControls.CustomSearchUrl3); + textWriter.WriteElementString("CustomSearchUrl4", settings.VideoControls.CustomSearchUrl4); + textWriter.WriteElementString("CustomSearchUrl5", settings.VideoControls.CustomSearchUrl5); + textWriter.WriteElementString("CustomSearchUrl6", settings.VideoControls.CustomSearchUrl6); textWriter.WriteElementString("LastActiveTab", settings.VideoControls.LastActiveTab); textWriter.WriteElementString("WaveFormDrawGrid", settings.VideoControls.WaveFormDrawGrid.ToString()); textWriter.WriteElementString("WaveFormGridColor", settings.VideoControls.WaveFormGridColor.ToArgb().ToString()); @@ -2027,6 +2104,12 @@ namespace Nikse.SubtitleEdit.Logic textWriter.WriteElementString("WaveformSearchSilenceForward", settings.Shortcuts.WaveformSearchSilenceForward); textWriter.WriteElementString("WaveformSearchSilenceBack", settings.Shortcuts.WaveformSearchSilenceBack); textWriter.WriteElementString("WaveformAddTextHere", settings.Shortcuts.WaveformAddTextHere); + textWriter.WriteElementString("MainTranslateCustomSearch1", settings.Shortcuts.MainTranslateCustomSearch1); + textWriter.WriteElementString("MainTranslateCustomSearch2", settings.Shortcuts.MainTranslateCustomSearch2); + textWriter.WriteElementString("MainTranslateCustomSearch3", settings.Shortcuts.MainTranslateCustomSearch3); + textWriter.WriteElementString("MainTranslateCustomSearch4", settings.Shortcuts.MainTranslateCustomSearch4); + textWriter.WriteElementString("MainTranslateCustomSearch5", settings.Shortcuts.MainTranslateCustomSearch5); + textWriter.WriteElementString("MainTranslateCustomSearch6", settings.Shortcuts.MainTranslateCustomSearch6); textWriter.WriteEndElement(); textWriter.WriteStartElement("RemoveTextForHearingImpaired", "");