private void openKingSoftFileDlg_FileOk(object sender, CancelEventArgs e) { if (!e.Cancel) { if (CurWordPad == null) { if (!AddNewWordPad("Default", true)) { return; } } foreach (string filename in openKingSoftFileDlg.FileNames) { CurWordPad.LoadFromKingsoftWordpad(filename, true); } UpdateWordListFromWordPad(CurWordPad); } }
private void deleteToolStripMenuItemWord_Click(object sender, EventArgs e) { if (ActiveWordList.FocusedItem == null) { return; } // 确认 DialogResult result = MessageBox.Show("Are you sure want to delte the word?", "Confirm", MessageBoxButtons.OKCancel); if (result != DialogResult.OK) { return; } if (CurWordPad.DelWord(ActiveWordList.FocusedItem.Text)) { ActiveWordList.FocusedItem.Remove(); InactiveWordList.Items.RemoveByKey(ActiveWordList.FocusedItem.Text); UpdateWordCount(); } }