private void CommandLineControl_Enter(object sender, EventArgs e) // Received focus { QuickSearchPopup = // link to quicksearch control that processes keyboard input QuickSearchPopup.Initialize(CommandLineControl, CommandLineControl.FindForm(), ContentsTreeCtl); QuickSearchPopup.StructurePopupEnabled = false; // no structure popup here QuickSearchPopup.ConsiderShellFocus = false; // need to turn this off }
/// <summary> /// Reset the tree with preferred project selected and a blank commandline /// </summary> public void ResetTreeAndCommandLine() { QuickSearchPopup.Hide(); CommandLineControl.Text = ""; CommandLineControl.ClosePopup(); ContentsTreeCtl.RefillTree(); CommandLineControl.Focus(); // do last return; }
private void CommandLineControl_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) { if (e.Button.Kind == ButtonPredefines.Search) { if (QuickSearchPopup != null) { QuickSearchPopup.ExecuteCommandLine(); } CommandLineControl.Focus(); } else if (e.Button.Kind == ButtonPredefines.Combo) { CommandLineControl.ShowPopup(); } else // delete/clear text & close popup { DelayedCallback.Schedule(ResetTreeAndCommandLine); } return; }
/// <summary> /// Initialize /// </summary> public void Activate() { CommandLineControl.Focus(); }