diff --git a/EonaCat.DnsTester/Helpers/UrlHelper.cs b/EonaCat.DnsTester/Helpers/UrlHelper.cs index e930917..6d1f7d9 100644 --- a/EonaCat.DnsTester/Helpers/UrlHelper.cs +++ b/EonaCat.DnsTester/Helpers/UrlHelper.cs @@ -12,22 +12,20 @@ namespace EonaCat.DnsTester.Helpers { private static readonly RandomNumberGenerator _randomNumberGenerator = RandomNumberGenerator.Create(); public static event EventHandler Log; + public static bool UseSearchEngineYahoo { get; set; } + public static bool UseSearchEngineBing { get; set; } + public static bool UseSearchEngineGoogle { get; set; } + public static bool UseSearchEngineQwant { get; set; } + public static bool UseSearchEngineAsk { get; set; } + public static bool UseSearchEngineWolfram { get; set; } + public static bool UseSearchEngineStartPage { get; set; } + public static bool UseSearchEngineYandex { get; set; } private static async Task> GetRandomUrls(int totalUrls) { var letters = GetRandomLetters(); - Dictionary searchEngineUrls = new Dictionary - { - { "Yahoo", "https://search.yahoo.com/search?p=" }, - { "Bing", "https://www.bing.com/search?q=" }, - { "Google", "https://www.google.com/search?q=" }, - { "Ask", "https://www.ask.com/web?q=" }, - { "WolframAlpha", "https://www.wolframalpha.com/input/?i=" }, - { "StartPage", "https://www.startpage.com/do/dsearch?query=" }, - { "Yandex", "https://www.yandex.com/search/?text=" }, - { "Qwant", "https://www.qwant.com/?q=" } - }; + var searchEngineUrls = GetSearchEngines(); Random rand = new Random(); @@ -95,6 +93,52 @@ namespace EonaCat.DnsTester.Helpers return urls; } + private static Dictionary GetSearchEngines() + { + Dictionary searchEngineUrls = new Dictionary(); + if (UseSearchEngineYahoo) + { + searchEngineUrls.Add("Yahoo", "https://search.yahoo.com/search?p="); + } + + if (UseSearchEngineBing) + { + searchEngineUrls.Add("Bing", "https://www.bing.com/search?q="); + } + + if (UseSearchEngineGoogle) + { + searchEngineUrls.Add("Google", "https://www.google.com/search?q="); + } + + if (UseSearchEngineQwant) + { + searchEngineUrls.Add("Qwant", "https://www.qwant.com/?q="); + } + + if (UseSearchEngineAsk) + { + searchEngineUrls.Add("Ask", "https://www.ask.com/web?q="); + } + + if (UseSearchEngineWolfram) + { + searchEngineUrls.Add("WolframAlpha", "https://www.wolframalpha.com/input/?i="); + } + + if (UseSearchEngineStartPage) + { + searchEngineUrls.Add("StartPage", "https://www.startpage.com/do/dsearch?query="); + } + + if (UseSearchEngineYandex) + { + searchEngineUrls.Add("Yandex", "https://www.yandex.com/search/?text="); + } + + return searchEngineUrls; + } + public static async Task> RetrieveUrls(int numThreads, int numUrlsPerThread) { Task[] tasks = new Task[numThreads]; diff --git a/EonaCat.DnsTester/MainForm.Designer.cs b/EonaCat.DnsTester/MainForm.Designer.cs index e1126ec..d4d8763 100644 --- a/EonaCat.DnsTester/MainForm.Designer.cs +++ b/EonaCat.DnsTester/MainForm.Designer.cs @@ -30,6 +30,25 @@ { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm)); RunTest = new System.Windows.Forms.Button(); + tabControl1 = new System.Windows.Forms.TabControl(); + tabPage1 = new System.Windows.Forms.TabPage(); + panel2 = new System.Windows.Forms.Panel(); + checkBox8 = new System.Windows.Forms.CheckBox(); + checkBox7 = new System.Windows.Forms.CheckBox(); + checkBox6 = new System.Windows.Forms.CheckBox(); + checkBox5 = new System.Windows.Forms.CheckBox(); + checkBox4 = new System.Windows.Forms.CheckBox(); + checkBox3 = new System.Windows.Forms.CheckBox(); + checkBox2 = new System.Windows.Forms.CheckBox(); + checkBox1 = new System.Windows.Forms.CheckBox(); + label4 = new System.Windows.Forms.Label(); + StatusBox = new System.Windows.Forms.ListBox(); + ResultView = new System.Windows.Forms.ListView(); + Url = new System.Windows.Forms.ColumnHeader(); + DNS1DATA = new System.Windows.Forms.ColumnHeader(); + DNS1Performance = new System.Windows.Forms.ColumnHeader(); + DNS2DATA = new System.Windows.Forms.ColumnHeader(); + DNS2Performance = new System.Windows.Forms.ColumnHeader(); panel1 = new System.Windows.Forms.Panel(); numericUpDown2 = new System.Windows.Forms.NumericUpDown(); label2 = new System.Windows.Forms.Label(); @@ -47,14 +66,7 @@ dnsList1 = new System.Windows.Forms.ComboBox(); lblDns2 = new System.Windows.Forms.Label(); lblDns1 = new System.Windows.Forms.Label(); - panel2 = new System.Windows.Forms.Panel(); - StatusBox = new System.Windows.Forms.ListBox(); - ResultView = new System.Windows.Forms.ListView(); - Url = new System.Windows.Forms.ColumnHeader(); - DNS1DATA = new System.Windows.Forms.ColumnHeader(); - DNS1Performance = new System.Windows.Forms.ColumnHeader(); - DNS2DATA = new System.Windows.Forms.ColumnHeader(); - DNS2Performance = new System.Windows.Forms.ColumnHeader(); + tabPage2 = new System.Windows.Forms.TabPage(); panel3 = new System.Windows.Forms.Panel(); btnResolveHost = new System.Windows.Forms.Button(); btnResolveIP = new System.Windows.Forms.Button(); @@ -62,10 +74,13 @@ txtResolveIP = new System.Windows.Forms.TextBox(); label5 = new System.Windows.Forms.Label(); label1 = new System.Windows.Forms.Label(); + tabControl1.SuspendLayout(); + tabPage1.SuspendLayout(); + panel2.SuspendLayout(); panel1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)numericUpDown2).BeginInit(); ((System.ComponentModel.ISupportInitialize)numericUpDown1).BeginInit(); - panel2.SuspendLayout(); + tabPage2.SuspendLayout(); panel3.SuspendLayout(); SuspendLayout(); // @@ -81,6 +96,208 @@ RunTest.UseVisualStyleBackColor = false; RunTest.Click += RunTest_Click; // + // tabControl1 + // + tabControl1.Controls.Add(tabPage1); + tabControl1.Controls.Add(tabPage2); + tabControl1.Location = new System.Drawing.Point(105, 0); + tabControl1.Name = "tabControl1"; + tabControl1.SelectedIndex = 0; + tabControl1.Size = new System.Drawing.Size(2259, 1517); + tabControl1.TabIndex = 27; + // + // tabPage1 + // + tabPage1.Controls.Add(panel2); + tabPage1.Controls.Add(panel1); + tabPage1.Location = new System.Drawing.Point(10, 58); + tabPage1.Name = "tabPage1"; + tabPage1.Padding = new System.Windows.Forms.Padding(3); + tabPage1.Size = new System.Drawing.Size(2239, 1449); + tabPage1.TabIndex = 0; + tabPage1.Text = "Dns tester"; + tabPage1.UseVisualStyleBackColor = true; + // + // panel2 + // + panel2.BackColor = System.Drawing.SystemColors.ControlLight; + panel2.Controls.Add(checkBox8); + panel2.Controls.Add(checkBox7); + panel2.Controls.Add(checkBox6); + panel2.Controls.Add(checkBox5); + panel2.Controls.Add(checkBox4); + panel2.Controls.Add(checkBox3); + panel2.Controls.Add(checkBox2); + panel2.Controls.Add(checkBox1); + panel2.Controls.Add(label4); + panel2.Controls.Add(StatusBox); + panel2.Controls.Add(ResultView); + panel2.Location = new System.Drawing.Point(50, 510); + panel2.Name = "panel2"; + panel2.Size = new System.Drawing.Size(2142, 905); + panel2.TabIndex = 27; + // + // checkBox8 + // + checkBox8.AutoSize = true; + checkBox8.Checked = true; + checkBox8.CheckState = System.Windows.Forms.CheckState.Checked; + checkBox8.Location = new System.Drawing.Point(1301, 42); + checkBox8.Name = "checkBox8"; + checkBox8.Size = new System.Drawing.Size(143, 45); + checkBox8.TabIndex = 70; + checkBox8.Text = "Qwant"; + checkBox8.UseVisualStyleBackColor = true; + // + // checkBox7 + // + checkBox7.AutoSize = true; + checkBox7.Checked = true; + checkBox7.CheckState = System.Windows.Forms.CheckState.Checked; + checkBox7.Location = new System.Drawing.Point(1301, 135); + checkBox7.Name = "checkBox7"; + checkBox7.Size = new System.Drawing.Size(150, 45); + checkBox7.TabIndex = 69; + checkBox7.Text = "Yandex"; + checkBox7.UseVisualStyleBackColor = true; + // + // checkBox6 + // + checkBox6.AutoSize = true; + checkBox6.Checked = true; + checkBox6.CheckState = System.Windows.Forms.CheckState.Checked; + checkBox6.Location = new System.Drawing.Point(1109, 135); + checkBox6.Name = "checkBox6"; + checkBox6.Size = new System.Drawing.Size(181, 45); + checkBox6.TabIndex = 68; + checkBox6.Text = "StartPage"; + checkBox6.UseVisualStyleBackColor = true; + // + // checkBox5 + // + checkBox5.AutoSize = true; + checkBox5.Checked = true; + checkBox5.CheckState = System.Windows.Forms.CheckState.Checked; + checkBox5.Location = new System.Drawing.Point(824, 135); + checkBox5.Name = "checkBox5"; + checkBox5.Size = new System.Drawing.Size(244, 45); + checkBox5.TabIndex = 67; + checkBox5.Text = "WolframAlpha"; + checkBox5.UseVisualStyleBackColor = true; + // + // checkBox4 + // + checkBox4.AutoSize = true; + checkBox4.Checked = true; + checkBox4.CheckState = System.Windows.Forms.CheckState.Checked; + checkBox4.Location = new System.Drawing.Point(654, 135); + checkBox4.Name = "checkBox4"; + checkBox4.Size = new System.Drawing.Size(103, 45); + checkBox4.TabIndex = 66; + checkBox4.Text = "Ask"; + checkBox4.UseVisualStyleBackColor = true; + // + // checkBox3 + // + checkBox3.AutoSize = true; + checkBox3.Checked = true; + checkBox3.CheckState = System.Windows.Forms.CheckState.Checked; + checkBox3.Location = new System.Drawing.Point(1109, 42); + checkBox3.Name = "checkBox3"; + checkBox3.Size = new System.Drawing.Size(154, 45); + checkBox3.TabIndex = 65; + checkBox3.Text = "Google"; + checkBox3.UseVisualStyleBackColor = true; + // + // checkBox2 + // + checkBox2.AutoSize = true; + checkBox2.Checked = true; + checkBox2.CheckState = System.Windows.Forms.CheckState.Checked; + checkBox2.Location = new System.Drawing.Point(824, 41); + checkBox2.Name = "checkBox2"; + checkBox2.Size = new System.Drawing.Size(115, 45); + checkBox2.TabIndex = 64; + checkBox2.Text = "Bing"; + checkBox2.UseVisualStyleBackColor = true; + // + // checkBox1 + // + checkBox1.AutoSize = true; + checkBox1.Checked = true; + checkBox1.CheckState = System.Windows.Forms.CheckState.Checked; + checkBox1.Location = new System.Drawing.Point(654, 42); + checkBox1.Name = "checkBox1"; + checkBox1.Size = new System.Drawing.Size(138, 45); + checkBox1.TabIndex = 63; + checkBox1.Text = "Yahoo"; + checkBox1.UseVisualStyleBackColor = true; + // + // label4 + // + label4.AutoSize = true; + label4.Location = new System.Drawing.Point(56, 42); + label4.Margin = new System.Windows.Forms.Padding(8, 0, 8, 0); + label4.Name = "label4"; + label4.Size = new System.Drawing.Size(472, 41); + label4.TabIndex = 62; + label4.Text = "Use searchengines for url retrieval:"; + label4.Visible = false; + // + // StatusBox + // + StatusBox.FormattingEnabled = true; + StatusBox.HorizontalScrollbar = true; + StatusBox.ItemHeight = 41; + StatusBox.Location = new System.Drawing.Point(56, 741); + StatusBox.Margin = new System.Windows.Forms.Padding(8, 7, 8, 7); + StatusBox.Name = "StatusBox"; + StatusBox.Size = new System.Drawing.Size(2051, 127); + StatusBox.TabIndex = 25; + // + // ResultView + // + ResultView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { Url, DNS1DATA, DNS1Performance, DNS2DATA, DNS2Performance }); + ResultView.GridLines = true; + ResultView.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable; + ResultView.Location = new System.Drawing.Point(56, 214); + ResultView.Margin = new System.Windows.Forms.Padding(8, 7, 8, 7); + ResultView.MultiSelect = false; + ResultView.Name = "ResultView"; + ResultView.Size = new System.Drawing.Size(2051, 487); + ResultView.TabIndex = 24; + ResultView.UseCompatibleStateImageBehavior = false; + ResultView.View = System.Windows.Forms.View.Details; + // + // Url + // + Url.Text = "URL"; + Url.Width = 160; + // + // DNS1DATA + // + DNS1DATA.Text = "Data"; + DNS1DATA.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + DNS1DATA.Width = 140; + // + // DNS1Performance + // + DNS1Performance.Text = "Performance"; + DNS1Performance.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + DNS1Performance.Width = 120; + // + // DNS2DATA + // + DNS2DATA.Text = "Data"; + DNS2DATA.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + DNS2DATA.Width = 140; + // + // DNS2Performance + // + DNS2Performance.Text = "Performance"; + DNS2Performance.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + DNS2Performance.Width = 120; + // // panel1 // panel1.BackColor = System.Drawing.SystemColors.ControlLight; @@ -100,10 +317,10 @@ panel1.Controls.Add(dnsList1); panel1.Controls.Add(lblDns2); panel1.Controls.Add(lblDns1); - panel1.Location = new System.Drawing.Point(155, 294); + panel1.Location = new System.Drawing.Point(50, 49); panel1.Name = "panel1"; - panel1.Size = new System.Drawing.Size(2209, 396); - panel1.TabIndex = 24; + panel1.Size = new System.Drawing.Size(2142, 396); + panel1.TabIndex = 26; // // numericUpDown2 // @@ -135,7 +352,6 @@ comboBox1.TabIndex = 59; comboBox1.Text = "Select record type"; comboBox1.SelectedIndexChanged += comboBox1_SelectedIndexChanged; - comboBox1.KeyPress += comboBox1_KeyPress; // // numericUpDown1 // @@ -185,7 +401,7 @@ // CustomDns2 // CustomDns2.Enabled = false; - CustomDns2.Location = new System.Drawing.Point(1318, 297); + CustomDns2.Location = new System.Drawing.Point(1317, 289); CustomDns2.Margin = new System.Windows.Forms.Padding(8, 7, 8, 7); CustomDns2.Name = "CustomDns2"; CustomDns2.Size = new System.Drawing.Size(668, 47); @@ -206,7 +422,7 @@ // lblCustom2 // lblCustom2.AutoSize = true; - lblCustom2.Location = new System.Drawing.Point(1065, 301); + lblCustom2.Location = new System.Drawing.Point(1064, 293); lblCustom2.Margin = new System.Windows.Forms.Padding(8, 0, 8, 0); lblCustom2.Name = "lblCustom2"; lblCustom2.Size = new System.Drawing.Size(219, 41); @@ -228,7 +444,7 @@ // UseCustomServers // UseCustomServers.AutoSize = true; - UseCustomServers.Location = new System.Drawing.Point(1723, 147); + UseCustomServers.Location = new System.Drawing.Point(1071, 224); UseCustomServers.Margin = new System.Windows.Forms.Padding(8, 7, 8, 7); UseCustomServers.Name = "UseCustomServers"; UseCustomServers.Size = new System.Drawing.Size(262, 45); @@ -247,7 +463,6 @@ dnsList2.Size = new System.Drawing.Size(320, 49); dnsList2.TabIndex = 38; dnsList2.Text = "Select Dns2"; - dnsList2.KeyPress += comboBox1_KeyPress; // // dnsList1 // @@ -259,7 +474,6 @@ dnsList1.Size = new System.Drawing.Size(451, 49); dnsList1.TabIndex = 37; dnsList1.Text = "Select Dns 1"; - dnsList1.KeyPress += comboBox1_KeyPress; // // lblDns2 // @@ -281,69 +495,16 @@ lblDns1.TabIndex = 35; lblDns1.Text = "Dns 1:"; // - // panel2 + // tabPage2 // - panel2.BackColor = System.Drawing.SystemColors.ControlLight; - panel2.Controls.Add(StatusBox); - panel2.Controls.Add(ResultView); - panel2.Location = new System.Drawing.Point(145, 765); - panel2.Name = "panel2"; - panel2.Size = new System.Drawing.Size(2219, 745); - panel2.TabIndex = 25; - // - // StatusBox - // - StatusBox.FormattingEnabled = true; - StatusBox.HorizontalScrollbar = true; - StatusBox.ItemHeight = 41; - StatusBox.Location = new System.Drawing.Point(56, 571); - StatusBox.Margin = new System.Windows.Forms.Padding(8, 7, 8, 7); - StatusBox.Name = "StatusBox"; - StatusBox.Size = new System.Drawing.Size(2126, 127); - StatusBox.TabIndex = 25; - // - // ResultView - // - ResultView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { Url, DNS1DATA, DNS1Performance, DNS2DATA, DNS2Performance }); - ResultView.GridLines = true; - ResultView.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable; - ResultView.Location = new System.Drawing.Point(56, 49); - ResultView.Margin = new System.Windows.Forms.Padding(8, 7, 8, 7); - ResultView.MultiSelect = false; - ResultView.Name = "ResultView"; - ResultView.Size = new System.Drawing.Size(2126, 487); - ResultView.TabIndex = 24; - ResultView.UseCompatibleStateImageBehavior = false; - ResultView.View = System.Windows.Forms.View.Details; - // - // Url - // - Url.Text = "URL"; - Url.Width = 160; - // - // DNS1DATA - // - DNS1DATA.Text = "Data"; - DNS1DATA.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - DNS1DATA.Width = 140; - // - // DNS1Performance - // - DNS1Performance.Text = "Performance"; - DNS1Performance.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - DNS1Performance.Width = 120; - // - // DNS2DATA - // - DNS2DATA.Text = "Data"; - DNS2DATA.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - DNS2DATA.Width = 140; - // - // DNS2Performance - // - DNS2Performance.Text = "Performance"; - DNS2Performance.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - DNS2Performance.Width = 120; + tabPage2.Controls.Add(panel3); + tabPage2.Location = new System.Drawing.Point(10, 58); + tabPage2.Name = "tabPage2"; + tabPage2.Padding = new System.Windows.Forms.Padding(3); + tabPage2.Size = new System.Drawing.Size(2239, 1449); + tabPage2.TabIndex = 1; + tabPage2.Text = "Resolve clients"; + tabPage2.UseVisualStyleBackColor = true; // // panel3 // @@ -354,10 +515,10 @@ panel3.Controls.Add(txtResolveIP); panel3.Controls.Add(label5); panel3.Controls.Add(label1); - panel3.Location = new System.Drawing.Point(155, 45); + panel3.Location = new System.Drawing.Point(15, 12); panel3.Name = "panel3"; panel3.Size = new System.Drawing.Size(2209, 175); - panel3.TabIndex = 26; + panel3.TabIndex = 28; // // btnResolveHost // @@ -418,9 +579,7 @@ AutoSize = true; AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; ClientSize = new System.Drawing.Size(2517, 1693); - Controls.Add(panel3); - Controls.Add(panel2); - Controls.Add(panel1); + Controls.Add(tabControl1); Controls.Add(RunTest); Icon = (System.Drawing.Icon)resources.GetObject("$this.Icon"); Margin = new System.Windows.Forms.Padding(8, 7, 8, 7); @@ -429,11 +588,15 @@ StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; Text = "EonaCat.DnsTester"; Load += TesterUI_Load; + tabControl1.ResumeLayout(false); + tabPage1.ResumeLayout(false); + panel2.ResumeLayout(false); + panel2.PerformLayout(); panel1.ResumeLayout(false); panel1.PerformLayout(); ((System.ComponentModel.ISupportInitialize)numericUpDown2).EndInit(); ((System.ComponentModel.ISupportInitialize)numericUpDown1).EndInit(); - panel2.ResumeLayout(false); + tabPage2.ResumeLayout(false); panel3.ResumeLayout(false); panel3.PerformLayout(); ResumeLayout(false); @@ -441,7 +604,19 @@ #endregion private System.Windows.Forms.Button RunTest; + private System.Windows.Forms.TabControl tabControl1; + private System.Windows.Forms.TabPage tabPage1; + private System.Windows.Forms.Panel panel2; + private System.Windows.Forms.ListBox StatusBox; + private System.Windows.Forms.ListView ResultView; + private System.Windows.Forms.ColumnHeader Url; + private System.Windows.Forms.ColumnHeader DNS1DATA; + private System.Windows.Forms.ColumnHeader DNS1Performance; + private System.Windows.Forms.ColumnHeader DNS2DATA; + private System.Windows.Forms.ColumnHeader DNS2Performance; private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.NumericUpDown numericUpDown2; + private System.Windows.Forms.Label label2; private System.Windows.Forms.ComboBox comboBox1; private System.Windows.Forms.NumericUpDown numericUpDown1; private System.Windows.Forms.Label label3; @@ -456,14 +631,7 @@ private System.Windows.Forms.ComboBox dnsList1; private System.Windows.Forms.Label lblDns2; private System.Windows.Forms.Label lblDns1; - private System.Windows.Forms.Panel panel2; - private System.Windows.Forms.ListBox StatusBox; - private System.Windows.Forms.ListView ResultView; - private System.Windows.Forms.ColumnHeader Url; - private System.Windows.Forms.ColumnHeader DNS1DATA; - private System.Windows.Forms.ColumnHeader DNS1Performance; - private System.Windows.Forms.ColumnHeader DNS2DATA; - private System.Windows.Forms.ColumnHeader DNS2Performance; + private System.Windows.Forms.TabPage tabPage2; private System.Windows.Forms.Panel panel3; private System.Windows.Forms.Button btnResolveHost; private System.Windows.Forms.Button btnResolveIP; @@ -471,8 +639,15 @@ private System.Windows.Forms.TextBox txtResolveIP; private System.Windows.Forms.Label label5; private System.Windows.Forms.Label label1; - private System.Windows.Forms.NumericUpDown numericUpDown2; - private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.CheckBox checkBox1; + private System.Windows.Forms.CheckBox checkBox2; + private System.Windows.Forms.CheckBox checkBox3; + private System.Windows.Forms.CheckBox checkBox8; + private System.Windows.Forms.CheckBox checkBox7; + private System.Windows.Forms.CheckBox checkBox6; + private System.Windows.Forms.CheckBox checkBox5; + private System.Windows.Forms.CheckBox checkBox4; } } diff --git a/EonaCat.DnsTester/MainForm.cs b/EonaCat.DnsTester/MainForm.cs index 1b05810..d6587a2 100644 --- a/EonaCat.DnsTester/MainForm.cs +++ b/EonaCat.DnsTester/MainForm.cs @@ -56,7 +56,7 @@ namespace EonaCat.DnsTester numThreads = 1; } - + SetSearchEngines(); urls = await UrlHelper.RetrieveUrls(numThreads, numUrlsPerThread); AddUrlToView(urls); @@ -65,6 +65,18 @@ namespace EonaCat.DnsTester IsRunning = false; } + private void SetSearchEngines() + { + UrlHelper.UseSearchEngineYahoo = checkBox1.Checked; + UrlHelper.UseSearchEngineBing = checkBox2.Checked; + UrlHelper.UseSearchEngineGoogle = checkBox3.Checked; + UrlHelper.UseSearchEngineQwant = checkBox8.Checked; + UrlHelper.UseSearchEngineAsk = checkBox4.Checked; + UrlHelper.UseSearchEngineWolfram = checkBox5.Checked; + UrlHelper.UseSearchEngineStartPage = checkBox6.Checked; + UrlHelper.UseSearchEngineYandex = checkBox7.Checked; + } + private void SetupView() { if (_useCustomDnsServers) @@ -421,5 +433,15 @@ namespace EonaCat.DnsTester { e.Handled = true; } + + private void checkBox1_CheckedChanged(object sender, EventArgs e) + { + UrlHelper.UseSearchEngineYahoo = checkBox1.Checked; + } + + private void checkBox2_CheckedChanged(object sender, EventArgs e) + { + UrlHelper.UseSearchEngineBing = checkBox2.Checked; + } } } diff --git a/Screenshots/1.png b/Screenshots/1.png index f52c087..bd9aec0 100644 Binary files a/Screenshots/1.png and b/Screenshots/1.png differ