private void WordList_ColumnClick(object sender, ColumnClickEventArgs e) { WordListComparer comparer = ((WordListComparer)ActiveWordList.ListViewItemSorter); comparer.SortKey = (WordSortKeyType)e.Column; comparer.Ascending = !comparer.Ascending; ActiveWordList.Sort(); }
private void WordList_MouseDoubleClick(object sender, MouseEventArgs e) { if (ActiveWordList.FocusedItem != null) { ListViewHitTestInfo hitInfo = ActiveWordList.HitTest(e.Location); if (hitInfo.SubItem != null) { NewWordItem wordItem = (NewWordItem)hitInfo.SubItem.Tag; if (hitInfo.SubItem.Text == NewWordItem.ToProficiencyString(wordItem.Proficiency)) { // modify proficiency wordItem.IncProficiency(); hitInfo.SubItem.Text = NewWordItem.ToProficiencyString(wordItem.Proficiency); return; } } editToolStripMenuItemWord_Click(sender, e); } }