private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e) { Semaforo s = (Semaforo)AppContext.Instance.get("Semaforo"); elemento elem; elem.url = webBrowser1.Url.ToString(); elem.html = webBrowser1.DocumentStream; s.EscribirCache(elem); textBox1.Text = webBrowser1.Url.ToString(); guardarHistorial(e.Url.ToString()); tabpage.Text = nombreTab(e.Url.ToString()); actual++; hist.Add(e.Url.ToString()); }
public Home() { InitializeComponent(); CheckForIllegalCrossThreadCalls = false;; Navegador nav = new Navegador(tabPage1); nav.TopLevel = false; tabPage1.Controls.Add(nav); tabPage1.Tag = nav; nav.Show(); AppContext.Instance.set("Descargar", true); Semaforo s = new Semaforo(true); s.initSemaforo(); AppContext.Instance.set("Semaforo", s); cargarHistorial(); cargarDescargas(); }