Changeset 11522 for stable/HeuristicLab.Clients.OKB/3.3/RunCreation
- Timestamp:
- 11/04/14 18:35:25 (10 years ago)
- Location:
- stable
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
stable
- Property svn:mergeinfo changed
/trunk/sources merged: 11344-11345,11419
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Clients.OKB/3.3/RunCreation/OKBRun.cs
r11170 r11522 22 22 using System; 23 23 using System.Collections.Generic; 24 using System.ComponentModel; 24 25 using System.Drawing; 25 26 using System.IO; 26 27 using HeuristicLab.Clients.Access; 28 using HeuristicLab.Collections; 27 29 using HeuristicLab.Common; 28 30 using HeuristicLab.Core; … … 51 53 if (value != stored) { 52 54 stored = value; 53 On StoredChanged();55 OnPropertyChanged("Stored"); 54 56 OnItemImageChanged(); 55 57 } … … 60 62 get { return WrappedItem.Algorithm; } 61 63 } 62 public I Dictionary<string, IItem> Parameters {64 public IObservableDictionary<string, IItem> Parameters { 63 65 get { return WrappedItem.Parameters; } 64 66 } 65 public I Dictionary<string, IItem> Results {67 public IObservableDictionary<string, IItem> Results { 66 68 get { return WrappedItem.Results; } 67 69 } … … 162 164 163 165 #region Events 164 public event EventHandler Changed; 165 private void OnChanged() { 166 var handler = Changed; 167 if (handler != null) handler(this, EventArgs.Empty); 168 } 169 public event EventHandler StoredChanged; 170 private void OnStoredChanged() { 171 var handler = StoredChanged; 172 if (handler != null) handler(this, EventArgs.Empty); 166 public event PropertyChangedEventHandler PropertyChanged; 167 private void OnPropertyChanged(string property) { 168 var handler = PropertyChanged; 169 if (handler != null) handler(this, new PropertyChangedEventArgs(property)); 173 170 } 174 171 175 172 protected override void RegisterWrappedItemEvents() { 176 173 base.RegisterWrappedItemEvents(); 177 WrappedItem. Changed += new EventHandler(WrappedItem_Changed);174 WrappedItem.PropertyChanged += WrappedItem_PropertyChanged; 178 175 } 179 176 protected override void DeregisterWrappedItemEvents() { 180 WrappedItem. Changed -= new EventHandler(WrappedItem_Changed);177 WrappedItem.PropertyChanged -= WrappedItem_PropertyChanged; 181 178 base.DeregisterWrappedItemEvents(); 182 179 } 183 180 184 private void WrappedItem_ Changed(object sender,EventArgs e) {185 On Changed();181 private void WrappedItem_PropertyChanged(object sender, PropertyChangedEventArgs e) { 182 OnPropertyChanged(e.PropertyName); 186 183 } 187 184 #endregion
Note: See TracChangeset
for help on using the changeset viewer.