Changeset 2833
- Timestamp:
- 02/19/10 03:03:41 (15 years ago)
- Location:
- trunk/sources
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Core.Views/3.3/VariableView.Designer.cs
r2796 r2833 108 108 // valuePanel 109 109 // 110 this.valuePanel.AllowDrop = true; 110 111 this.valuePanel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 111 112 | System.Windows.Forms.AnchorStyles.Left) -
trunk/sources/HeuristicLab.Core/3.3/ItemArray.cs
r2830 r2833 58 58 public ItemArray(T[] array) : base(array) { 59 59 foreach (T item in this) 60 i tem.Changed += new ChangedEventHandler(Item_Changed);60 if (item != null) item.Changed += new ChangedEventHandler(Item_Changed); 61 61 } 62 62 public ItemArray(IEnumerable<T> collection) : base(collection) { 63 63 foreach (T item in this) 64 i tem.Changed += new ChangedEventHandler(Item_Changed);64 if (item != null) item.Changed += new ChangedEventHandler(Item_Changed); 65 65 } 66 66 -
trunk/sources/HeuristicLab.Core/3.3/ItemCollection.cs
r2830 r2833 59 59 public ItemCollection(IEnumerable<T> collection) : base(collection) { 60 60 foreach (T item in this) 61 i tem.Changed += new ChangedEventHandler(Item_Changed);61 if (item != null) item.Changed += new ChangedEventHandler(Item_Changed); 62 62 } 63 63 -
trunk/sources/HeuristicLab.Core/3.3/ItemList.cs
r2830 r2833 59 59 public ItemList(IEnumerable<T> collection) : base(collection) { 60 60 foreach (T item in this) 61 i tem.Changed += new ChangedEventHandler(Item_Changed);61 if (item != null) item.Changed += new ChangedEventHandler(Item_Changed); 62 62 } 63 63 -
trunk/sources/HeuristicLab.Core/3.3/ItemSet.cs
r2830 r2833 58 58 public ItemSet(IEnumerable<T> collection) : base(collection) { 59 59 foreach (T item in this) 60 i tem.Changed += new ChangedEventHandler(Item_Changed);60 if (item != null) item.Changed += new ChangedEventHandler(Item_Changed); 61 61 } 62 62 -
trunk/sources/HeuristicLab.Core/3.3/NamedItemCollection.cs
r2830 r2833 105 105 private void RegisterItemEvents(IEnumerable<T> items) { 106 106 foreach (T item in items) { 107 item.NameChanging += new EventHandler<CancelEventArgs<string>>(Item_NameChanging); 108 item.NameChanged += new EventHandler(Item_NameChanged); 109 item.Changed += new ChangedEventHandler(Item_Changed); 107 if (item != null) { 108 item.NameChanging += new EventHandler<CancelEventArgs<string>>(Item_NameChanging); 109 item.NameChanged += new EventHandler(Item_NameChanged); 110 item.Changed += new ChangedEventHandler(Item_Changed); 111 } 110 112 } 111 113 } 112 114 private void DeregisterItemEvents(IEnumerable<T> items) { 113 115 foreach (T item in items) { 114 item.NameChanging -= new EventHandler<CancelEventArgs<string>>(Item_NameChanging); 115 item.NameChanged -= new EventHandler(Item_NameChanged); 116 item.Changed -= new ChangedEventHandler(Item_Changed); 116 if (item != null) { 117 item.NameChanging -= new EventHandler<CancelEventArgs<string>>(Item_NameChanging); 118 item.NameChanged -= new EventHandler(Item_NameChanged); 119 item.Changed -= new ChangedEventHandler(Item_Changed); 120 } 117 121 } 118 122 } -
trunk/sources/HeuristicLab.Core/3.3/Variable.cs
r2830 r2833 72 72 : base(name) { 73 73 this.value = value; 74 this.value.Changed += new ChangedEventHandler(Value_Changed);74 if (this.value != null) this.value.Changed += new ChangedEventHandler(Value_Changed); 75 75 } 76 76 public Variable(string name, string description, IItem value) 77 77 : base(name, description) { 78 78 this.value = value; 79 this.value.Changed += new ChangedEventHandler(Value_Changed);79 if (this.value != null) this.value.Changed += new ChangedEventHandler(Value_Changed); 80 80 } 81 81
Note: See TracChangeset
for help on using the changeset viewer.