- Timestamp:
- 06/16/11 00:06:54 (13 years ago)
- Location:
- branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/HiveJobs
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/HiveJobs/EngineHiveJob.cs
r6381 r6419 71 71 return jobData; 72 72 } 73 74 public override void ClearData() { 75 base.ClearData(); 76 this.ItemJob.InitialOperation = null; 77 } 73 78 } 74 79 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/HiveJobs/HiveJob.cs
r6381 r6419 123 123 protected bool syncJobsWithOptimizers = true; 124 124 125 public StateLogList StateLog { 126 get { return new StateLogList(this.job.StateLog); } 127 } 128 129 public StateLogListList ChildStateLogList { 130 get { return new StateLogListList(this.childHiveJobs.Select(x => x.StateLog)); } 131 } 132 125 133 #region Constructors and Cloning 126 134 public HiveJob() { … … 234 242 OnToStringChanged(); 235 243 OnItemImageChanged(); 244 OnStateLogChanged(); 236 245 } 237 246 } … … 255 264 } 256 265 257 #region Event s266 #region Event Handler 258 267 public event EventHandler JobChanged; 259 268 private void OnJobChanged() { … … 278 287 private void OnIsFinishedJobDownloadedChanged() { 279 288 var handler = IsFinishedJobDownloadedChanged; 289 if (handler != null) handler(this, EventArgs.Empty); 290 } 291 292 public event EventHandler StateLogChanged; 293 private void OnStateLogChanged() { 294 var handler = StateLogChanged; 280 295 if (handler != null) handler(this, EventArgs.Empty); 281 296 } … … 371 386 public event CollectionItemsChangedEventHandler<IItemTree<HiveJob>> CollectionReset; 372 387 private void OnCollectionReset(object sender, CollectionItemsChangedEventArgs<IndexedItem<HiveJob>> e) { 388 foreach (var item in e.Items) { 389 item.Value.StateLogChanged -= new EventHandler(ChildHiveJob_StateLogChanged); 390 } 373 391 var handler = CollectionReset; 374 392 if (handler != null) handler(this, ToCollectionItemsChangedEventArgs(e)); … … 377 395 public event CollectionItemsChangedEventHandler<IItemTree<HiveJob>> ItemsAdded; 378 396 private void OnItemsAdded(object sender, CollectionItemsChangedEventArgs<IndexedItem<HiveJob>> e) { 397 foreach (var item in e.Items) { 398 item.Value.StateLogChanged += new EventHandler(ChildHiveJob_StateLogChanged); 399 } 379 400 var handler = ItemsAdded; 380 401 if (handler != null) handler(this, ToCollectionItemsChangedEventArgs(e)); … … 383 404 public event CollectionItemsChangedEventHandler<IItemTree<HiveJob>> ItemsRemoved; 384 405 private void OnItemsRemoved(object sender, CollectionItemsChangedEventArgs<IndexedItem<HiveJob>> e) { 406 foreach (var item in e.Items) { 407 item.Value.StateLogChanged -= new EventHandler(ChildHiveJob_StateLogChanged); 408 } 385 409 var handler = ItemsRemoved; 386 410 if (handler != null) handler(this, ToCollectionItemsChangedEventArgs(e)); … … 389 413 private static CollectionItemsChangedEventArgs<IItemTree<HiveJob>> ToCollectionItemsChangedEventArgs(CollectionItemsChangedEventArgs<IndexedItem<HiveJob>> e) { 390 414 return new CollectionItemsChangedEventArgs<IItemTree<HiveJob>>(e.Items.Select(x => x.Value), e.OldItems == null ? null : e.OldItems.Select(x => x.Value)); 415 } 416 417 private void ChildHiveJob_StateLogChanged(object sender, EventArgs e) { 418 OnStateLogChanged(); 391 419 } 392 420 #endregion … … 443 471 /// Delete ItemJob 444 472 /// </summary> 445 public v oid ClearData() {473 public virtual void ClearData() { 446 474 this.ItemJob.Item = null; 447 475 }
Note: See TracChangeset
for help on using the changeset viewer.