Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/10/18 23:06:00 (6 years ago)
Author:
jzenisek
Message:

#2839: fixed couple of minor issues

  • changed tags in resource selector
  • added project information in job list and adapted sortation
  • fixed hand-down save by withdrawing additional offset-rights (permissions, resources),...
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.JobManager/3.3/Views/RefreshableHiveJobListView.cs

    r14185 r15992  
    4141      this.itemsListView.Columns.Add(new ColumnHeader("Date") { Text = "Date" });
    4242      this.itemsListView.Columns.Add(new ColumnHeader("Name") { Text = "Name" });
     43      this.itemsListView.Columns.Add(new ColumnHeader("Project") { Text = "Project" });
    4344
    4445      this.itemsListView.HeaderStyle = ColumnHeaderStyle.Clickable;
    4546      this.itemsListView.FullRowSelect = true;
    4647
    47       this.itemsListView.ListViewItemSorter = new ListViewItemDateComparer(0, SortOrder.Ascending);
     48      this.itemsListView.ListViewItemSorter = new ListViewItemComparer(new int[] { 2, 0 }, new SortOrder[] { SortOrder.Ascending, SortOrder.Ascending });
     49
     50      foreach (ColumnHeader c in this.itemsListView.Columns) {
     51        c.AutoResize(ColumnHeaderAutoResizeStyle.HeaderSize);
     52        int w = c.Width;
     53        c.AutoResize(ColumnHeaderAutoResizeStyle.ColumnContent);
     54        if(w > c.Width) {
     55          c.AutoResize(ColumnHeaderAutoResizeStyle.HeaderSize);
     56        }
     57      }
    4858    }
    4959
    5060    protected override void SortItemsListView(SortOrder sortOrder) {
    5161      if (itemsListView.Sorting == sortOrder || sortOrder == SortOrder.None) return;
    52       ((ListViewItemDateComparer)itemsListView.ListViewItemSorter).Order = sortOrder;
     62      ((ListViewItemComparer)itemsListView.ListViewItemSorter).Orders[1] = sortOrder;
    5363      itemsListView.Sorting = sortOrder;
    5464      itemsListView.Sort();
    55       AdjustListViewColumnSizes();
     65      //AdjustListViewColumnSizes();
    5666    }
    5767
     
    133143        base.Content_ItemsAdded(sender, e);
    134144        foreach (ColumnHeader c in this.itemsListView.Columns) {
     145          c.AutoResize(ColumnHeaderAutoResizeStyle.HeaderSize);
     146          int w = c.Width;
    135147          c.AutoResize(ColumnHeaderAutoResizeStyle.ColumnContent);
     148          if (w > c.Width) {
     149            c.AutoResize(ColumnHeaderAutoResizeStyle.HeaderSize);
     150          }
    136151        }
    137152        foreach (var item in e.Items) {
     
    180195      listViewItem.SubItems.Insert(0, new ListViewItem.ListViewSubItem(listViewItem, item.Job.DateCreated.ToString()));
    181196      listViewItem.SubItems.Insert(1, new ListViewItem.ListViewSubItem(listViewItem, item.Job.Name));
     197      listViewItem.SubItems.Insert(2, new ListViewItem.ListViewSubItem(listViewItem, HiveClient.Instance.GetProjectAncestry(item.Job.ProjectId)));
     198     
    182199      listViewItem.Group = GetListViewGroup(item.Job.OwnerUsername);
    183200      return listViewItem;
     
    189206      listViewItem.SubItems[0].Text = item == null ? "null" : item.Job.DateCreated.ToString("dd.MM.yyyy HH:mm");
    190207      listViewItem.SubItems[1].Text = item == null ? "null" : item.Job.Name;
     208      listViewItem.SubItems[2].Text = item == null ? "null" : HiveClient.Instance.GetProjectAncestry(item.Job.ProjectId);
    191209      listViewItem.Group = GetListViewGroup(item.Job.OwnerUsername);
    192210      listViewItem.ToolTipText = item == null ? string.Empty : item.ItemName + ": " + item.ItemDescription;
Note: See TracChangeset for help on using the changeset viewer.