- Timestamp:
- 05/04/12 17:57:40 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Clients.Hive.JobManager/3.3/Views/RefreshableHiveJobView.cs
r7582 r7782 69 69 Content.IsAllowedPrivilegedChanged += new EventHandler(Content_IsAllowedPrivilegedChanged); 70 70 Content.Loaded += new EventHandler(Content_Loaded); 71 Content.TaskReceived += new EventHandler(Content_TaskReceived); 71 72 } 72 73 … … 83 84 Content.ExecutionTimeChanged -= new EventHandler(Content_ExecutionTimeChanged); 84 85 Content.Loaded -= new EventHandler(Content_Loaded); 86 Content.TaskReceived -= new EventHandler(Content_TaskReceived); 85 87 base.DeregisterContentEvents(); 86 88 } … … 167 169 168 170 #region Content Events 171 void Content_TaskReceived(object sender, EventArgs e) { 172 runCollectionViewHost.Content = GetAllRunsFromJob(Content); 173 } 174 169 175 private void HiveTasks_ItemsAdded(object sender, CollectionItemsChangedEventArgs<HiveTask> e) { 170 176 if (InvokeRequired) 171 177 Invoke(new CollectionItemsChangedEventHandler<HiveTask>(HiveTasks_ItemsAdded), sender, e); 172 178 else { 173 foreach (HiveTask t in e.Items) {174 t.TaskStateChanged += new EventHandler(HiveTask_TaskStateChanged);175 }176 179 SetEnabledStateOfControls(); 177 180 } … … 182 185 Invoke(new CollectionItemsChangedEventHandler<HiveTask>(HiveTasks_ItemsRemoved), sender, e); 183 186 else { 184 foreach (HiveTask t in e.Items) {185 t.TaskStateChanged -= new EventHandler(HiveTask_TaskStateChanged);186 }187 187 SetEnabledStateOfControls(); 188 188 } … … 193 193 Invoke(new CollectionItemsChangedEventHandler<HiveTask>(HiveTasks_CollectionReset), sender, e); 194 194 else { 195 foreach (HiveTask t in e.Items) { 196 t.TaskStateChanged -= new EventHandler(HiveTask_TaskStateChanged); 197 } 198 SetEnabledStateOfControls(); 199 } 200 } 201 202 void HiveTask_TaskStateChanged(object sender, EventArgs e) { 203 runCollectionViewHost.Content = GetAllRunsFromJob(Content); 195 SetEnabledStateOfControls(); 196 } 204 197 } 205 198
Note: See TracChangeset
for help on using the changeset viewer.