Esempio n. 1
0
        public void LanzarExtraccion(string rutaPDF)
        {
            miPDF = new objetoPDF(rutaPDF);

            //Lanzamos el Evento de Comienzo de lectura de Pdf
            StartReadEventArgs StartEvento = new StartReadEventArgs(miPDF.PdfLeido.NumberOfPages);
            StartReadPdf(this, StartEvento);

            miPDF.Insertar_Imagenes(Extraer_Imagenes());

            //Lanzamos el Evento de Finalizacion de lectura de Pdf
            StopReadEventArgs StopEvento = new StopReadEventArgs();
            StopReadPdf(this, StopEvento);
        }
        public void BusquedaGoogle(string patronBusqueda, int numeroBusqueda)
        {
            ImagenesRescatadas.Clear();

            //Lanzamos el Evento de Comienzo de lectura de Pdf
            StartReadEventArgs StartEvento = new StartReadEventArgs();
            StartGooglePetition(this, StartEvento);

            hiloGoogle = new BackgroundWorker();
            hiloGoogle.WorkerReportsProgress = true;
            hiloGoogle.DoWork += hiloGoogle_DoWork;
            hiloGoogle.ProgressChanged += hiloGoogle_ProgressChanged;
            hiloGoogle.RunWorkerCompleted += hiloGoogle_RunWorkerCompleted;
            hiloGoogle.RunWorkerAsync(new string[] { patronBusqueda, numeroBusqueda.ToString() });
        }