private void whoIsToolStripMenuItem_Click(object sender, EventArgs e) { Uri url = new Uri(uiTabbedBrowserControl.CurrentTab.Browser.URL); try { string host = url.Host; if (!(host.EndsWith(".com") || host.EndsWith(".net"))) { if (host.StartsWith("www.")) host = host.Remove(0, 4); } var whois = new WhoisLookup().Lookup(host); var view = new ViewPageSource(whois.ToString(), Enums.Actions.Whois, new Tuple<string, string, string>(url.Host, host, "")); view.Show(); } catch { MessageBox.Show("Unable to obtain Whois? information for this website.", "Error obtaining Whois?", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } }