private void drag_area_tracker_OnDragComplete(bool button_left_pressed, bool button_right_pressed, Point mouse_down_point, Point mouse_up_point)
        {
            if (button_left_pressed)
            {
                WordList selected_words = text_selection_manager.OnDragComplete(button_left_pressed, button_right_pressed, mouse_down_point, mouse_up_point);
                ReflectWordList(selected_words);
            }

            string selected_text = text_selection_manager.GetLastSelectedWordsString();

            if (selected_text.Length > 0)
            {
                PDFRendererControl pdf_renderer_control = GetPDFRendererControl();

                if (pdf_renderer_control != null)
                {
                    if (button_right_pressed)
                    {
                        PDFDocument pdf_document = pdf_renderer_control?.GetPDFDocument();
                        ASSERT.Test(pdf_document != null);

                        PDFTextSelectPopup popup = new PDFTextSelectPopup(selected_text, pdf_document);
                        popup.Open();
                    }

                    pdf_renderer_control.OnTextSelected(selected_text);
                }
            }
        }
Esempio n. 2
0
        void drag_area_tracker_OnDragComplete(bool button_left_pressed, bool button_right_pressed, Point mouse_down_point, Point mouse_up_point)
        {
            if (button_left_pressed)
            {
                WordList selected_words = text_selection_manager.OnDragComplete(button_left_pressed, button_right_pressed, mouse_down_point, mouse_up_point);
                ReflectWordList(selected_words);
            }

            string selected_text = text_selection_manager.GetLastSelectedWordsString();

            if (selected_text.Length > 0)
            {
                if (button_right_pressed)
                {
                    PDFTextSelectPopup popup = new PDFTextSelectPopup(selected_text, pdf_renderer_control_stats.pdf_document);
                    popup.Open();
                }

                this.pdf_renderer_control_stats.pdf_renderer_control.OnTextSelected(selected_text);
            }
        }