private void HacerBuesqueda() { if (ToolStripTextBoxURL.TextLength > 2) { try { Mutex mutex = new Mutex(); WebBrowserPrincipal.Navigating += WebBrowserPrincipal_Navigating; if (Contenedor.Cache.Get(ToolStripTextBoxURL.Text) == null) { WebBrowserPrincipal.Navigate(ToolStripTextBoxURL.Text); WebBrowserPrincipal.DocumentCompleted += WebBrowserPrincipal_DocumentCompleted; URL = ToolStripTextBoxURL.Text; } else { mutex.WaitOne(); WebBrowserPrincipal.DocumentStream = (Stream)Contenedor.Cache.Get(ToolStripTextBoxURL.Text); WebBrowserPrincipal.DocumentCompleted += WebBrowserPrincipal_DocumentCompleted1;; mutex.ReleaseMutex(); } mutex.WaitOne(); Thread.Sleep(50); Contenedor.Busqueda = ToolStripTextBoxURL.Text; Contenedor.BusquedaEcha = true; Thread.Sleep(50); mutex.ReleaseMutex(); } catch (Exception ex) { } } }
private void ToolStripButtonCerrar_Click(object sender, EventArgs e) { Mutex mutex = new Mutex(); mutex.WaitOne(); Thread.Sleep(50); Contenedor.CerrarPestanna = true; WebBrowserPrincipal.Dispose(); HiloPestanna.Abort(); Thread.Sleep(50); mutex.ReleaseMutex(); }
private void HacerBuesqueda() { if (ToolStripTextBoxURL.TextLength > 2) { try { WebBrowserPrincipal.Navigate(ToolStripTextBoxURL.Text); Mutex mutex = new Mutex(); mutex.WaitOne(); Thread.Sleep(50); Contenedor.Busqueda = ToolStripTextBoxURL.Text; Contenedor.BusquedaEcha = true; Thread.Sleep(50); mutex.ReleaseMutex(); } catch (Exception ex) { } } }
private void ToolStripButtonRecargar_Click(object sender, EventArgs e) { WebBrowserPrincipal.Refresh(); }
private void ToolStripButtonAdelante_Click(object sender, EventArgs e) { WebBrowserPrincipal.GoForward(); }
private void ToolStripButtonAtras_Click(object sender, EventArgs e) { WebBrowserPrincipal.GoBack(); }