Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/23/11 19:39:18 (13 years ago)
Author:
ascheibe
Message:

#1659

  • Permissions can now be deleted
  • fixed overlay icons for permissions
  • fixed overlay icons in job list
Location:
trunk/sources/HeuristicLab.Clients.Hive.JobManager/3.3/Views
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Clients.Hive.JobManager/3.3/Views/HiveJobPermissionListView.cs

    r6976 r7059  
    2222using System;
    2323using System.Windows.Forms;
     24using HeuristicLab.Collections;
    2425using HeuristicLab.Core.Views;
    2526using HeuristicLab.MainForm;
     
    4445      return new JobPermission() { JobId = this.hiveExperimentId };
    4546    }
     47
     48    protected override void Content_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<JobPermission> e) {
     49      base.Content_ItemsRemoved(sender, e);
     50      foreach (var item in e.Items) {
     51        if (item.GrantedUserId != Guid.Empty) {
     52          HiveClient.Delete(item);
     53        }
     54      }
     55    }
    4656  }
    4757}
  • trunk/sources/HeuristicLab.Clients.Hive.JobManager/3.3/Views/RefreshableHiveJobListView.cs

    r7056 r7059  
    6363        c.AutoResize(ColumnHeaderAutoResizeStyle.ColumnContent);
    6464      }
     65      foreach (var item in e.Items) {
     66        item.ItemImageChanged += new EventHandler(item_ItemImageChanged);
     67      }
     68    }
     69
     70    void item_ItemImageChanged(object sender, EventArgs e) {
     71      RefreshableJob job = sender as RefreshableJob;
     72      if (job != null) {
     73        foreach (ListViewItem item in this.itemsListView.Items) {
     74          if (item.Tag != null) {
     75            RefreshableJob cur = item.Tag as RefreshableJob;
     76            if (cur != null && cur == job) {
     77              this.UpdateListViewItemImage(item);
     78            }
     79          }
     80        }
     81      }
    6582    }
    6683
    6784    protected override void Content_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<RefreshableJob> e) {
    6885      base.Content_ItemsRemoved(sender, e);
     86      foreach (var item in e.Items) {
     87        item.ItemImageChanged -= new EventHandler(item_ItemImageChanged);
     88      }
    6989      if (Content != null && Content.Count == 0) {
    7090        foreach (ColumnHeader c in this.itemsListView.Columns) {
Note: See TracChangeset for help on using the changeset viewer.