private void SetSortOrder(ObjectSortOrder oldOrder, out ObjectSortOrder newOrder) { if(oldOrder == ObjectSortOrder.Ascending) { newOrder = ObjectSortOrder.Descending; } else if(oldOrder == ObjectSortOrder.Descending) { newOrder = ObjectSortOrder.None; } else { newOrder = ObjectSortOrder.Ascending; } }
public ObjectListComparer(ObjectSortElement element, ObjectSortOrder sortOrder, int subitemIndex, ColumnHeader column) { _element = element; _sortOrder = sortOrder; _subitemIndex = subitemIndex; _column = column; }
private void SetSortImage(ColumnHeader column, ObjectSortOrder order) { if(order == ObjectSortOrder.Ascending) { column.ImageKey = "up.png"; } else if(order == ObjectSortOrder.Descending) { column.ImageKey = "down.png"; } else { HideSortImage(column); } ObjectList.Refresh(); }