private void addList() { WordsImportForm import = new WordsImportForm(); import.ShowDialog(this); if (import.chWord != "" && import.keyWord != "") { this.listViewEx1.Items.Add(new ListViewItem(new string[] { import.chWord, import.keyWord })); isEdit = true; } }
private void editList() { if (this.listViewEx1.SelectedItems.Count != 0) { if (listViewEx1.SelectedItems.Count != 0) { WordsImportForm import = new WordsImportForm(); import.Text = "编辑关键词"; import.panelEx1.Text = "编辑关键词"; import.textBoxX1.Text = this.listViewEx1.SelectedItems[0].SubItems[0].Text; import.textBoxX2.Text = this.listViewEx1.SelectedItems[0].SubItems[1].Text; import.buttonX1.Text = "确定"; import.ShowDialog(this); if (import.chWord != "" && import.keyWord != "") { this.listViewEx1.SelectedItems[0].SubItems[0].Text = import.chWord; this.listViewEx1.SelectedItems[0].SubItems[1].Text = import.keyWord; isEdit = true; } } } }