private void TxtSearchQuery_LostFocus(object sender, EventArgs e) { if (string.IsNullOrWhiteSpace(txtSearchQuery.Text)) { txtSearchQuery.Text = SharedConstants.SearchText; SearchFocusLost?.Invoke(this, new EventArgs()); treeBookmarks.Invalidate(); } }
private void TxtSearchQuery_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e) { if (e.KeyCode == Keys.Escape) { txtSearchQuery.Text = SharedConstants.SearchText; SearchFocusLost?.Invoke(this, new EventArgs()); treeBookmarks.Invalidate(); treeBookmarks.Focus(); } }