Пример #1
0
        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)
                {
                }
            }
        }
Пример #2
0
        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();
        }
Пример #3
0
 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)
         {
         }
     }
 }
Пример #4
0
 private void ToolStripButtonRecargar_Click(object sender, EventArgs e)
 {
     WebBrowserPrincipal.Refresh();
 }
Пример #5
0
 private void ToolStripButtonAdelante_Click(object sender, EventArgs e)
 {
     WebBrowserPrincipal.GoForward();
 }
Пример #6
0
 private void ToolStripButtonAtras_Click(object sender, EventArgs e)
 {
     WebBrowserPrincipal.GoBack();
 }