private void _addWordBtn_Click(object sender, EventArgs e) { KeywordConfigForm dlg = new KeywordConfigForm(null, TailFileConfig); if (dlg.ShowDialog(this) == DialogResult.OK && !String.IsNullOrEmpty(dlg.TailKeywordConfig.Keyword)) { ListViewItem lvi = _keywordListView.Items.Add(new ListViewItem()); UpdateKeywordListItem(dlg.TailKeywordConfig, ref lvi); } }
private void _edtWordBtn_Click(object sender, EventArgs e) { if (_keywordListView.SelectedItems.Count == 0) { return; } KeywordConfigForm dlg = new KeywordConfigForm(_keywordListView.SelectedItems[0].Tag as TailKeywordConfig, TailFileConfig); if (dlg.ShowDialog(this) == DialogResult.OK && !String.IsNullOrEmpty(dlg.TailKeywordConfig.Keyword)) { ListViewItem lvi = _keywordListView.SelectedItems[0]; UpdateKeywordListItem(dlg.TailKeywordConfig, ref lvi); _keywordListView.Update(); } }
private void _edtWordBtn_Click(object sender, EventArgs e) { if (_keywordListView.SelectedItems.Count == 0) return; KeywordConfigForm dlg = new KeywordConfigForm(_keywordListView.SelectedItems[0].Tag as TailKeywordConfig, TailFileConfig); if (dlg.ShowDialog(this) == DialogResult.OK && !String.IsNullOrEmpty(dlg.TailKeywordConfig.Keyword)) { ListViewItem lvi = _keywordListView.SelectedItems[0]; UpdateKeywordListItem(dlg.TailKeywordConfig, ref lvi); _keywordListView.Update(); } }