private void ChromeBrowser_AddressChanged(object sender, AddressChangedEventArgs e) { if (current == null) { return; } if (!e.Address.Contains("s.to")) { var b = false; foreach (var item in HostPriority.SiteAddrs) { b |= e.Address.Contains(item); } if (b) { current.HostURL = e.Address; if (Captchas.Count > CaptchaThreadNumber) { current = null; Captchas.Remove(this); Close(); } else { LoadURL(); } } else { chromeBrowser.Load(current.URL); } } }
private void Form1_FormClosing(object sender, FormClosingEventArgs e) { if (Captchas != null && Captchas.Count > 0) { if (Captchas.Contains(this)) { Captchas.Remove(this); } if (current != null) { Hosts.Add(current); } } }