Changeset 6725 for branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.ExperimentManager/3.3/Views/RefreshableHiveExperimentListView.cs
- Timestamp:
- 09/08/11 16:38:28 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.ExperimentManager/3.3/Views/RefreshableHiveExperimentListView.cs
r6479 r6725 28 28 namespace HeuristicLab.Clients.Hive.ExperimentManager.Views { 29 29 [View("HiveExperimentList View")] 30 [Content(typeof(ItemCollection<Refreshable HiveExperiment>), false)]31 public partial class RefreshableHiveExperimentListView : ItemCollectionView<Refreshable HiveExperiment> {30 [Content(typeof(ItemCollection<RefreshableJob>), false)] 31 public partial class RefreshableHiveExperimentListView : ItemCollectionView<RefreshableJob> { 32 32 33 33 public RefreshableHiveExperimentListView() { … … 43 43 } 44 44 45 protected override Refreshable HiveExperimentCreateItem() {46 return new Refreshable HiveExperiment() { IsAllowedPrivileged = HiveClient.Instance.IsAllowedPrivileged };45 protected override RefreshableJob CreateItem() { 46 return new RefreshableJob() { IsAllowedPrivileged = HiveClient.Instance.IsAllowedPrivileged }; 47 47 } 48 48 … … 54 54 } 55 55 56 protected override void Content_ItemsAdded(object sender, Collections.CollectionItemsChangedEventArgs<Refreshable HiveExperiment> e) {56 protected override void Content_ItemsAdded(object sender, Collections.CollectionItemsChangedEventArgs<RefreshableJob> e) { 57 57 base.Content_ItemsAdded(sender, e); 58 58 59 59 } 60 60 61 protected override ListViewItem CreateListViewItem(Refreshable HiveExperimentitem) {61 protected override ListViewItem CreateListViewItem(RefreshableJob item) { 62 62 ListViewItem listViewItem = base.CreateListViewItem(item); 63 63 listViewItem.SubItems.Clear(); 64 listViewItem.SubItems.Insert(0, new ListViewItem.ListViewSubItem(listViewItem, item. HiveExperiment.DateCreated.ToString("dd.MM.yyyy HH:mm")));65 listViewItem.SubItems.Insert(1, new ListViewItem.ListViewSubItem(listViewItem, item. HiveExperiment.Name));66 listViewItem.Group = GetListViewGroup(item. HiveExperiment.OwnerUsername);64 listViewItem.SubItems.Insert(0, new ListViewItem.ListViewSubItem(listViewItem, item.Job.DateCreated.ToString("dd.MM.yyyy HH:mm"))); 65 listViewItem.SubItems.Insert(1, new ListViewItem.ListViewSubItem(listViewItem, item.Job.Name)); 66 listViewItem.Group = GetListViewGroup(item.Job.OwnerUsername); 67 67 return listViewItem; 68 68 } … … 70 70 protected override void UpdateListViewItemText(ListViewItem listViewItem) { 71 71 if (listViewItem == null) throw new ArgumentNullException(); 72 var item = listViewItem.Tag as Refreshable HiveExperiment;73 listViewItem.SubItems[0].Text = item == null ? "null" : item. HiveExperiment.DateCreated.ToString("dd.MM.yyyy HH:mm");74 listViewItem.SubItems[1].Text = item == null ? "null" : item. HiveExperiment.Name;75 listViewItem.Group = GetListViewGroup(item. HiveExperiment.OwnerUsername);72 var item = listViewItem.Tag as RefreshableJob; 73 listViewItem.SubItems[0].Text = item == null ? "null" : item.Job.DateCreated.ToString("dd.MM.yyyy HH:mm"); 74 listViewItem.SubItems[1].Text = item == null ? "null" : item.Job.Name; 75 listViewItem.Group = GetListViewGroup(item.Job.OwnerUsername); 76 76 listViewItem.ToolTipText = item == null ? string.Empty : item.ItemName + ": " + item.ItemDescription; 77 77 }
Note: See TracChangeset
for help on using the changeset viewer.