From 0ebd9fe25d107300d8a6cde72a466fddbd582bfa Mon Sep 17 00:00:00 2001 From: BehzadKhosravifar Date: Wed, 14 Oct 2015 14:22:31 +0330 Subject: [PATCH] Fix ui and ... --- src/WHOis/MainForm.Designer.cs | 14 ++++++++------ src/WHOis/MainForm.cs | 9 ++++++--- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/WHOis/MainForm.Designer.cs b/src/WHOis/MainForm.Designer.cs index 144416a..d8f7711 100644 --- a/src/WHOis/MainForm.Designer.cs +++ b/src/WHOis/MainForm.Designer.cs @@ -245,7 +245,7 @@ private void InitializeComponent() // this.progResult.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.progResult.Location = new System.Drawing.Point(6, 373); + this.progResult.Location = new System.Drawing.Point(6, 341); this.progResult.Name = "progResult"; this.progResult.Size = new System.Drawing.Size(552, 23); this.progResult.TabIndex = 7; @@ -259,7 +259,7 @@ private void InitializeComponent() this.grbResult.Controls.Add(this.progResult); this.grbResult.Location = new System.Drawing.Point(350, 35); this.grbResult.Name = "grbResult"; - this.grbResult.Size = new System.Drawing.Size(564, 402); + this.grbResult.Size = new System.Drawing.Size(564, 370); this.grbResult.TabIndex = 12; this.grbResult.TabStop = false; this.grbResult.Text = "WHOis Details"; @@ -290,7 +290,7 @@ private void InitializeComponent() this.dgvResult.RowHeadersVisible = false; this.dgvResult.RowTemplate.Height = 30; this.dgvResult.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.dgvResult.Size = new System.Drawing.Size(552, 348); + this.dgvResult.Size = new System.Drawing.Size(552, 316); this.dgvResult.TabIndex = 8; // // colDomain @@ -305,10 +305,12 @@ private void InitializeComponent() // // groupBox2 // + this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); this.groupBox2.Controls.Add(this.txtLogger); - this.groupBox2.Location = new System.Drawing.Point(350, 443); + this.groupBox2.Location = new System.Drawing.Point(350, 411); this.groupBox2.Name = "groupBox2"; - this.groupBox2.Size = new System.Drawing.Size(564, 89); + this.groupBox2.Size = new System.Drawing.Size(564, 121); this.groupBox2.TabIndex = 13; this.groupBox2.TabStop = false; this.groupBox2.Text = "Error Log"; @@ -320,7 +322,7 @@ private void InitializeComponent() this.txtLogger.Multiline = true; this.txtLogger.Name = "txtLogger"; this.txtLogger.ScrollBars = System.Windows.Forms.ScrollBars.Both; - this.txtLogger.Size = new System.Drawing.Size(558, 70); + this.txtLogger.Size = new System.Drawing.Size(558, 102); this.txtLogger.TabIndex = 0; // // MainForm diff --git a/src/WHOis/MainForm.cs b/src/WHOis/MainForm.cs index a1a424d..13f8c66 100644 --- a/src/WHOis/MainForm.cs +++ b/src/WHOis/MainForm.cs @@ -35,6 +35,7 @@ private void MainForm_Load(object sender, EventArgs e) if (chk.Checked) ChkDomain_CheckStateChanged(chk, e); } + } private void ChkDomain_CheckStateChanged(object sender, EventArgs e) @@ -83,6 +84,8 @@ private async void btnLookUp_Click(object sender, EventArgs e) foreach (string name in names) { + var url = name.Replace(" ", ""); + Dictionary extensionReserving = new Dictionary(); foreach (var extension in selectedExtensions) @@ -94,14 +97,14 @@ private async void btnLookUp_Click(object sender, EventArgs e) server = "whois.nic.ir"; } - var res = await Whoise(name, extension, server); + var res = await Whoise(url, extension, server); extensionReserving.Add(extension, res); InvokeIfRequire(() => progResult.Value++); } - Add(name, extensionReserving); + Add(url, extensionReserving); } UiActivation(true); @@ -192,7 +195,7 @@ private async Task Whoise(string name, string postfix, string server) private void Log(string msg) { - InvokeIfRequire(() => txtLogger.Text += string.Format("{0} {1} {0}", Environment.NewLine, msg)); + InvokeIfRequire(() => txtLogger.Text += string.Format("{0}{1} {0}", Environment.NewLine, msg)); } public void InvokeIfRequire(Action act)