Ejemplo n.º 1
0
        private void FilesListView_ColumnClick(object sender, ColumnClickEventArgs e)
        {
            FilesListView.ColumnSort columnSorter = base.ListViewItemSorter as FilesListView.ColumnSort;
            if (columnSorter != null)
            {
                if (columnSorter.Column != e.Column)
                {
                    columnSorter.Column = e.Column;
                    columnSorter.Order  = SortOrder.Ascending;
                }
                else
                {
                    switch (columnSorter.Order)
                    {
                    case SortOrder.None:
                    case SortOrder.Descending:
                        columnSorter.Order = SortOrder.Ascending;
                        break;

                    case SortOrder.Ascending:
                        columnSorter.Order = SortOrder.Descending;
                        break;
                    }
                }
                this.SetSortIcon(columnSorter.Column, columnSorter.Order);
                base.Sort();
                return;
            }
            this.SetSortIcon(-1, SortOrder.None);
        }
Ejemplo n.º 2
0
 protected override void CreateHandle()
 {
     base.CreateHandle();
     FilesListView.ColumnSort columnSorter = base.ListViewItemSorter as FilesListView.ColumnSort;
     if (columnSorter != null)
     {
         this.SetSortIcon(columnSorter.Column, columnSorter.Order);
     }
 }