Skip to content

Commit

Permalink
Fix ui and ...
Browse files Browse the repository at this point in the history
  • Loading branch information
bezzad committed Oct 14, 2015
1 parent ae79041 commit 0ebd9fe
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
14 changes: 8 additions & 6 deletions src/WHOis/MainForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions src/WHOis/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -83,6 +84,8 @@ private async void btnLookUp_Click(object sender, EventArgs e)

foreach (string name in names)
{
var url = name.Replace(" ", "");

Dictionary<string, bool> extensionReserving = new Dictionary<string, bool>();

foreach (var extension in selectedExtensions)
Expand All @@ -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);
Expand Down Expand Up @@ -192,7 +195,7 @@ private async Task<bool> 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)
Expand Down

0 comments on commit 0ebd9fe

Please sign in to comment.