Changeset 7059
- Timestamp:
- 11/23/11 19:39:18 (13 years ago)
- Location:
- trunk/sources
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Clients.Hive.JobManager/3.3/Views/HiveJobPermissionListView.cs
r6976 r7059 22 22 using System; 23 23 using System.Windows.Forms; 24 using HeuristicLab.Collections; 24 25 using HeuristicLab.Core.Views; 25 26 using HeuristicLab.MainForm; … … 44 45 return new JobPermission() { JobId = this.hiveExperimentId }; 45 46 } 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 } 46 56 } 47 57 } -
trunk/sources/HeuristicLab.Clients.Hive.JobManager/3.3/Views/RefreshableHiveJobListView.cs
r7056 r7059 63 63 c.AutoResize(ColumnHeaderAutoResizeStyle.ColumnContent); 64 64 } 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 } 65 82 } 66 83 67 84 protected override void Content_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<RefreshableJob> e) { 68 85 base.Content_ItemsRemoved(sender, e); 86 foreach (var item in e.Items) { 87 item.ItemImageChanged -= new EventHandler(item_ItemImageChanged); 88 } 69 89 if (Content != null && Content.Count == 0) { 70 90 foreach (ColumnHeader c in this.itemsListView.Columns) { -
trunk/sources/HeuristicLab.Clients.Hive/3.3/HiveClient.cs
r6976 r7059 173 173 #region Delete 174 174 public static void Delete(IHiveItem item) { 175 if (item.Id == Guid.Empty )175 if (item.Id == Guid.Empty && item.GetType() != typeof(JobPermission)) 176 176 return; 177 177 … … 510 510 IEnumerable<JobPermission> jps = service.GetJobPermissions(jobId); 511 511 foreach (var hep in jps) { 512 hep. GrantedUserName = service.GetUsernameByUserId(hep.GrantedUserId);512 hep.UnmodifiedGrantedUserNameUpdate(service.GetUsernameByUserId(hep.GrantedUserId)); 513 513 } 514 514 return new HiveItemCollection<JobPermission>(jps); -
trunk/sources/HeuristicLab.Clients.Hive/3.3/RefreshableJob.cs
r7056 r7059 51 51 OnJobChanged(); 52 52 OnToStringChanged(this, EventArgs.Empty); 53 job_ItemImageChanged(this, EventArgs.Empty); 53 54 } 54 55 } -
trunk/sources/HeuristicLab.Clients.Hive/3.3/ServiceClients/JobPermission.cs
r6976 r7059 37 37 } 38 38 39 public void UnmodifiedGrantedUserNameUpdate(string userName) { 40 grantedUserName = userName; 41 } 42 39 43 public JobPermission() { 40 44 this.Permission = Permission.Read;
Note: See TracChangeset
for help on using the changeset viewer.