Пример #1
0
 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;
     }
 }
Пример #2
0
 public ObjectListComparer(ObjectSortElement element, ObjectSortOrder sortOrder, int subitemIndex, ColumnHeader column)
 {
     _element = element;
     _sortOrder = sortOrder;
     _subitemIndex = subitemIndex;
     _column = column;
 }
Пример #3
0
        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();
        }