void CaseSearchFormLoad(object sender, EventArgs e) { const int searchDelayMilliseconds = 700; ResultsListBox.Items.Add(c_langMakeNewCase); ResultsListBox.SelectedIndex = 0; m_searchTimer = new System.Windows.Forms.Timer(); m_searchTimer.Interval = searchDelayMilliseconds; m_searchTimer.Tick += new EventHandler(searchTimerTick); KeywordsTextBox.Focus(); }
void ApplyBtnClick(object sender, EventArgs e) { if (string.IsNullOrWhiteSpace(KeywordsTextBox.Text)) { MessageBox.Show("Введите ключевые слова через запятую или точку с запятой.", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning); KeywordsTextBox.Focus(); } else { m_ApplyData = true; ControlPanel.Enabled = false; KeywordsPanel.Enabled = false; if (!m_bw.IsBusy) { m_bw.RunWorkerAsync(); } } }
void EditKeywordsFormShown(object sender, EventArgs e) { KeywordsTextBox.Focus(); }