Changeset 9559
- Timestamp:
- 05/29/13 15:59:19 (12 years ago)
- Location:
- stable
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
stable
- Property svn:mergeinfo changed
/trunk/sources merged: 9523,9540
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Clients.Hive.JobManager/3.3/ListViewItemDateComparer.cs
r9456 r9559 31 31 public class ListViewItemDateComparer : IComparer { 32 32 private int col; 33 p rivate SortOrder order;33 public SortOrder Order { get; set; } 34 34 35 35 public ListViewItemDateComparer() { 36 36 col = 0; 37 order = SortOrder.Ascending;37 Order = SortOrder.Ascending; 38 38 } 39 39 40 40 public ListViewItemDateComparer(int column, SortOrder order) { 41 41 col = column; 42 this.order = order;42 Order = order; 43 43 } 44 44 … … 66 66 } 67 67 68 if ( order == SortOrder.Descending) {68 if (Order == SortOrder.Descending) { 69 69 // invert the value returned by Compare. 70 70 returnVal *= -1; -
stable/HeuristicLab.Clients.Hive.JobManager/3.3/Views/RefreshableHiveJobListView.cs
r9456 r9559 44 44 this.itemsListView.Columns.Add(new ColumnHeader("Date") { Text = "Date" }); 45 45 this.itemsListView.Columns.Add(new ColumnHeader("Name") { Text = "Name" }); 46 foreach (ColumnHeader c in this.itemsListView.Columns) { 47 c.AutoResize(ColumnHeaderAutoResizeStyle.HeaderSize); 48 } 46 49 47 this.itemsListView.HeaderStyle = ColumnHeaderStyle.Clickable; 50 48 this.itemsListView.FullRowSelect = true; 51 49 52 50 this.itemsListView.ListViewItemSorter = new ListViewItemDateComparer(0, SortOrder.Ascending); 53 this.itemsListView.Sorting = SortOrder.Ascending;54 this.itemsListView.Sort();55 51 56 52 progress = new Progress() { … … 59 55 }; 60 56 progressView = new ProgressView(this, progress); 57 } 58 59 protected override void SortItemsListView(SortOrder sortOrder) { 60 if (itemsListView.Sorting == sortOrder || sortOrder == SortOrder.None) return; 61 ((ListViewItemDateComparer)itemsListView.ListViewItemSorter).Order = sortOrder; 62 itemsListView.Sorting = sortOrder; 63 itemsListView.Sort(); 64 AdjustListViewColumnSizes(); 61 65 } 62 66
Note: See TracChangeset
for help on using the changeset viewer.