Exemplo n.º 1
0
        private void OnDocumentLoaded(PDFViewer sender, PDFDocument document)
        {
            if (m_ProgressiveSearch == null)
            {
                m_ProgressiveSearch = PDFProgressiveSearch.CreateSearch(m_PDFViewer.Document, sender.SearchTimeBudgetPerFrame);
            }

            m_ProgressiveSearch.OnSearchFinished  += OnSearchFinished;
            m_ProgressiveSearch.OnProgressChanged += OnProgressChanged;

            m_Registered = true;
        }
Exemplo n.º 2
0
        private void DestroyProgressiveSearch()
        {
            if (m_ProgressiveSearch != null)
            {
                if (m_Registered)
                {
                    m_ProgressiveSearch.OnSearchFinished  -= OnSearchFinished;
                    m_ProgressiveSearch.OnProgressChanged -= OnProgressChanged;

                    m_Registered = false;
                }

                Destroy(m_ProgressiveSearch.gameObject);
                m_ProgressiveSearch = null;
            }
        }
Exemplo n.º 3
0
        private void OnSearchFinished(PDFProgressiveSearch sender, IList <PDFSearchResult>[] searchResults)
        {
            m_SearchFinished = true;

            m_PDFViewer.SetSearchResults(searchResults);
        }
Exemplo n.º 4
0
        private void OnProgressChanged(PDFProgressiveSearch sender, int total)
        {
            m_Total = total;

            UpdateSearchTotal();
        }