private void itemList_MouseDoubleClick(object sender, MouseEventArgs e) { object selectedItem = items.SelectedItem; ClearList(); // show verbs in clicked class if (selectedItem is VerbClass) { VerbClass verbClass = selectedItem as VerbClass; if (verbClass != null) { foreach (string verb in verbClass.GetVerbs(recursiveChk.Checked)) { items.Items.Add(verb); } } } // show classes for clicked verb else if (selectedItem is string) { string verb = (string)selectedItem; foreach (VerbClass verbClass in _verbNetEngine.GetClassesFor(verb)) { items.Items.Add(verbClass); } } }
private void getVerbsInClassBtn_Click(object sender, EventArgs e) { ClearList(); VerbClass verbClass = classCombo.SelectedItem as VerbClass; if (verbClass != null) { foreach (string verb in verbClass.GetVerbs(recursiveChk.Checked)) { items.Items.Add(verb); } } }