예제 #1
0
        internal FastFindControlWPFWrapper(DTE dte, SolutionFiles solution_files, FileFinder file_finder, TextFinder text_finder, GetOpenFilesThread get_open_files_thread, Settings settings, WindowPane window_pane_owner)
        {
            this.InitializeComponent();
            this.m_DTE = dte;
            this.m_TabStopPanel.WpfHost = this.m_WindowsFormsHost;
            bool is_modal = false;

            this.m_FastFindControl = new FastFindControl(dte, solution_files, file_finder, text_finder, get_open_files_thread, settings, "", -1, is_modal);
            this.m_FastFindControl.ControlWantsToClose += onEscToCloseWindow;
            this.m_FastFindControl.Dock = DockStyle.Fill;
            this.m_TabStopPanel.Controls.Add(this.m_FastFindControl);
        }
예제 #2
0
        public void SelectText(bool get_selected_text)
        {
            FastFindControl fastfind_control = this.GetFastFindControl();

            if (fastfind_control != null)
            {
                if (get_selected_text)
                {
                    string initial_text = this.m_DTE.GetSelectedText();
                    if (!string.IsNullOrEmpty(initial_text))
                    {
                        fastfind_control.TextBoxText = initial_text;
                    }
                }
                fastfind_control.SelectText();
            }
        }
예제 #3
0
        public FastFindForm(DTE dte, SolutionFiles solution_files, FileFinder file_finder, TextFinder text_finder, GetOpenFilesThread get_open_files_thread, Settings settings, string initial_text)
        {
            this.InitializeComponent();
            this.m_Settings = settings;
            base.Size       = settings.FastFindFormSize;
            SettingsDialogPage settings_page = VSAnythingPackage.Inst.GetSettingsDialogPage();

            if (string.IsNullOrEmpty(initial_text) && settings_page.RememberLastFind && !string.IsNullOrEmpty(FastFindForm.m_LastFindText))
            {
                initial_text = FastFindForm.m_LastFindText;
            }
            bool is_modal = true;

            this.m_FastFindControl      = new FastFindControl(dte, solution_files, file_finder, text_finder, get_open_files_thread, settings, initial_text, FastFindForm.m_LastSelectedItem, is_modal);
            this.m_FastFindControl.Dock = DockStyle.Fill;
            this.m_FastFindControl.ControlWantsToClose += new FastFindControl.ControlWantsToCloseHandler(this.FastFindControlWantsToClose);
            base.Controls.Add(this.m_FastFindControl);
            this.m_FastFindControl.OnActivated();
        }
예제 #4
0
        public void Show()
        {
            if (this.m_InShow)
            {
                return;
            }
            this.m_InShow = true;
            ToolWindowPane window = this.m_Package.FindToolWindow(typeof(FastFindToolWindowPane), 0, true);

            //mariotodo get_Frame -> Frame
            if (window != null && window.Frame != null)
            {
                ErrorHandler.ThrowOnFailure(((IVsWindowFrame)window.Frame).Show());
                FastFindControl fastfind_control2 = this.GetFastFindControl();
                if (fastfind_control2 != null)
                {
                    fastfind_control2.OnActivated();
                }
            }
            this.m_InShow = false;
        }