private void threadNameListView_ColumnClick(object sender, ColumnClickEventArgs e) { _suppressEvents = true; // Create the sorting objects the first time they are required. if (_threadNameSorter == null) { _threadNameSorter = new ListViewItemSorter(threadNameListView); threadNameCheckCol.Tag = _checkComparer; } _threadNameSorter.Sort(e); _suppressEvents = false; }
private void methodListView_ColumnClick(object sender, ColumnClickEventArgs e) { _suppressEvents = true; // Create the sorter object the first time it is required. if (_methodSorter == null) { methodCheckCol.Tag = _checkComparer; _methodSorter = new ListViewItemSorter(methodListView); } _methodSorter.Sort(e.Column); _suppressEvents = false; }
private void SortLoggers(int colIndex) { _suppressEvents = true; // Create the sorter object the first time it is required. if (_loggerSorter == null) { loggerCheckCol.Tag = _checkComparer; _loggerSorter = new ListViewItemSorter(loggerListView); } _loggerSorter.Sort(colIndex); _suppressEvents = false; }
private void loggerListView_ColumnClick(object sender, ColumnClickEventArgs e) { _suppressEvents = true; // Create the sorter object the first time it is required. if (_loggerSorter == null) { // Create a delegate for comparing the IDs of the ThreadObjects that // correspond to two ListViewItems. loggerCheckCol.Tag = _checkComparer; _loggerSorter = new ListViewItemSorter(loggerListView); } _loggerSorter.Sort(e); _suppressEvents = false; }
private void threadIdListView_ColumnClick(object sender, ColumnClickEventArgs e) { _suppressEvents = true; // Create the sorting objects the first time they are required. if (_threadIdSorter == null) { // Create a delegate for comparing the IDs of the ThreadObjects that // correspond to two ListViewItems. ListViewItemSorter.RowComparer idComparer = delegate(ListViewItem x, ListViewItem y) { // The ListViewItem tags are ThreadObjects. int xint = ((ThreadObject)x.Tag).Id; int yint = ((ThreadObject)y.Tag).Id; return(xint - yint); }; threadIdCol.Tag = idComparer; threadCheckCol.Tag = _checkComparer; _threadIdSorter = new ListViewItemSorter(threadIdListView); } _threadIdSorter.Sort(e); _suppressEvents = false; }