private QuickSearchControl addQuickSearchControl(IPluginHost host) { QuickSearchControl myControl = new QuickSearchControl(); //myControl.Enabled = false; ToolStripControlHost myToolStripControlHost = new ToolStripControlHost(myControl); myToolStripControlHost.AutoSize = true; Control.ControlCollection mainWindowControls = host.MainWindow.Controls; CustomToolStripEx toolStrip = (CustomToolStripEx)mainWindowControls["m_toolMain"]; toolStrip.Items.Add(myToolStripControlHost); //host.MainWindow.FileOpened += new EventHandler<FileOpenedEventArgs>(MainWindow_FileOpened); var mainForm = host.MainWindow; mainForm.KeyPreview = true; mainForm.KeyDown += (sender, args) => { if (args.KeyData == (Keys.Shift | Keys.Control | Keys.F)) { myControl.comboBoxSearch.Focus(); } }; //host.MainWindow.Shown += delegate(object o, EventArgs e) { myControl.ParentForm.ActiveControl = myControl.comboBoxSearch; }; //myControl.comboBox.TextChanged += new EventHandler(comboBox1_TextChanged); return(myControl); }
public SearchController(QuickSearchControl qsCcontrol, PwDatabase database, ListView listview) { this.qsUpdateMethod = qsUpdate; this.quickSearchControl = qsCcontrol; this.database = database; this.textUpdateHandler = new EventHandler(control_TextUpdate); this.listview = listview; Debug.Assert(listview != null); this.backgroundWorker.WorkerSupportsCancellation = true; }
public ActiveControllerManager(IPluginHost host, QuickSearchControl qsControl) { this.host = host; this.qsControl = qsControl; host.MainWindow.FileOpened += new EventHandler <KeePass.Forms.FileOpenedEventArgs>(MainWindow_FileOpened); host.MainWindow.FileClosed += new EventHandler <KeePass.Forms.FileClosedEventArgs>(MainWindow_FileClosed); host.MainWindow.DocumentManager.ActiveDocumentSelected += new EventHandler(DocumentManager_ActiveDocumentSelected); host.MainWindow.FocusChanging += new EventHandler <KeePass.Forms.FocusEventArgs>(MainWindow_FocusChanging); this.qsControl.LostFocus += new EventHandler(qsControl_LostFocus); }
public ActiveControllerManager(IPluginHost host, QuickSearchControl qsControl) { this.host = host; this.qsControl = qsControl; host.MainWindow.FileOpened += new EventHandler<KeePass.Forms.FileOpenedEventArgs>(MainWindow_FileOpened); host.MainWindow.FileClosed += new EventHandler<KeePass.Forms.FileClosedEventArgs>(MainWindow_FileClosed); host.MainWindow.DocumentManager.ActiveDocumentSelected += new EventHandler(DocumentManager_ActiveDocumentSelected); host.MainWindow.FocusChanging += new EventHandler<KeePass.Forms.FocusEventArgs>(MainWindow_FocusChanging); this.qsControl.LostFocus += new EventHandler(qsControl_LostFocus); }
public override bool Initialize(IPluginHost host) { QuickSearchExt.host = host; Settings.Default.Load(host); //if (Settings.Default.RemoveQuickFind) //{ //removeBuiltinQuickFind(host); //} updateQuickFindControl(); //toolStrip.Refresh(); this.qsControl = addQuickSearchControl(host); new ActiveControllerManager(host, this.qsControl); //host.CustomConfig.SetBool("QuickSearch.testvalue", true); //Settings.Default.SearchInTitle = false; //test -------------- //Settings set = new Settings(); ////set.tsetting.Add("bla", "blu"); //set.tsetting = new System.Collections.Specialized.StringDictionary(); //set.tsetting.Add("alpha", "alphavalue"); //set.tsetting.Add("beta", "betavalue"); //set.Settingbool = false; ////Debug.WriteLine(set.tsetting.ToString()); //set.Save(); //testend ------------ GlobalWindowManager.WindowAdded += new EventHandler<GwmWindowEventArgs>(GlobalWindowManager_WindowAdded); return true; //return base.Initialize(host); }
public override bool Initialize(IPluginHost host) { QuickSearchExt.host = host; Settings.Default.Load(host); //if (Settings.Default.RemoveQuickFind) //{ //removeBuiltinQuickFind(host); //} updateQuickFindControl(); //toolStrip.Refresh(); this.qsControl = addQuickSearchControl(host); new ActiveControllerManager(host, this.qsControl); //host.CustomConfig.SetBool("QuickSearch.testvalue", true); //Settings.Default.SearchInTitle = false; //test -------------- //Settings set = new Settings(); ////set.tsetting.Add("bla", "blu"); //set.tsetting = new System.Collections.Specialized.StringDictionary(); //set.tsetting.Add("alpha", "alphavalue"); //set.tsetting.Add("beta", "betavalue"); //set.Settingbool = false; ////Debug.WriteLine(set.tsetting.ToString()); //set.Save(); //testend ------------ GlobalWindowManager.WindowAdded += new EventHandler <GwmWindowEventArgs>(GlobalWindowManager_WindowAdded); return(true); //return base.Initialize(host); }
private QuickSearchControl addQuickSearchControl(IPluginHost host) { QuickSearchControl myControl = new QuickSearchControl(); //myControl.Enabled = false; ToolStripControlHost myToolStripControlHost = new ToolStripControlHost(myControl); myToolStripControlHost.AutoSize = true; Control.ControlCollection mainWindowControls = host.MainWindow.Controls; CustomToolStripEx toolStrip = (CustomToolStripEx)mainWindowControls["m_toolMain"]; toolStrip.Items.Add(myToolStripControlHost); //host.MainWindow.FileOpened += new EventHandler<FileOpenedEventArgs>(MainWindow_FileOpened); var mainForm = host.MainWindow; mainForm.KeyPreview = true; mainForm.KeyDown += (sender, args) => { if (args.KeyData == (Keys.Shift|Keys.Control|Keys.F)) { myControl.comboBoxSearch.Focus(); } }; //host.MainWindow.Shown += delegate(object o, EventArgs e) { myControl.ParentForm.ActiveControl = myControl.comboBoxSearch; }; //myControl.comboBox.TextChanged += new EventHandler(comboBox1_TextChanged); return myControl; }