public void report(string type) { AssemblyAttribute AssemblyAttribute = new AssemblyAttribute(); string[] anonymitylevels = { "High:high", "Low:low", "None:no" }; textBoxReport.Clear(); if (type == "Text") { textBoxReport.AppendText(String.Format("Checked with ProxyMaid, Version {0} ( http://www.proxymaid.com/ )\n", AssemblyAttribute.AssemblyVersion)); textBoxReport.AppendText("# Time out: " + Properties.Settings.Default.ProxyTimeOut + "s\n"); foreach (string anonymity in anonymitylevels) { textBoxReport.AppendText("#\n"); textBoxReport.AppendText("# Proxies with " + anonymity.Split(':')[1] + " anonymity:\n"); foreach (ProxyServer server in _Global.ProxyServers.ToList()) { if (server.Status.Substring(0, 2) == "Ok" && server.Anonymity == anonymity.Split(':')[0]) { textBoxReport.AppendText(server.Ip + ":" + server.Port + "\n"); } } } } else if (type == "BB code") { textBoxReport.AppendText(String.Format("Checked with ProxyMaid, Version {0}\n", AssemblyAttribute.AssemblyVersion)); textBoxReport.AppendText("Time out: " + Properties.Settings.Default.ProxyTimeOut + "s\n"); foreach (string anonymity in anonymitylevels) { textBoxReport.AppendText("\n"); textBoxReport.AppendText("Proxies with " + anonymity.Split(':')[1] + " anonymity:\n"); textBoxReport.AppendText("[CODE]\n"); foreach (ProxyServer server in _Global.ProxyServers.ToList()) { if (server.Status.Substring(0, 2) == "Ok" && server.Anonymity == anonymity.Split(':')[0]) { textBoxReport.AppendText(server.Ip + ":" + server.Port + "\n"); } } textBoxReport.AppendText("[/CODE]\n"); } } else { MessageBox.Show("Unknown report type '" + type + "'."); } }
public FormAboutBox() { InitializeComponent(); AssemblyAttribute AssemblyAttribute = new AssemblyAttribute(); this.Text = String.Format("About {0}", AssemblyAttribute.AssemblyTitle); this.labelProductName.Text = AssemblyAttribute.AssemblyProduct; this.labelVersion.Text = String.Format("Version {0}", AssemblyAttribute.AssemblyVersion); this.labelCopyright.Text = AssemblyAttribute.AssemblyCopyright; this.labelCompanyName.Text = AssemblyAttribute.AssemblyCompany; this.textBoxDescription.Text = AssemblyAttribute.AssemblyDescription; }