- Timestamp:
- 01/09/13 14:59:22 (12 years ago)
- Location:
- trunk/sources/HeuristicLab.Core.Views/3.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Core.Views/3.3/CheckedItemCollectionView.cs
r9026 r9134 110 110 } 111 111 } 112 protected override void Content_CollectionReset(object sender, CollectionItemsChangedEventArgs<T> e) { 113 base.Content_CollectionReset(sender, e); 114 SetNumberOfCheckItems(); 115 } 116 protected override void Content_ItemsAdded(object sender, CollectionItemsChangedEventArgs<T> e) { 117 base.Content_ItemsAdded(sender, e); 118 SetNumberOfCheckItems(); 119 } 120 protected override void Content_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<T> e) { 121 base.Content_ItemsRemoved(sender, e); 122 SetNumberOfCheckItems(); 123 } 112 124 #endregion 113 125 114 126 private void SetNumberOfCheckItems() { 115 this.itemsGroupBox.Text = String.Format("Items (Checked: {0}/{1})", Content.CheckedItems.Count(), Content.Count); 127 if (InvokeRequired) { 128 Invoke((Action)SetNumberOfCheckItems); 129 } else { 130 this.itemsGroupBox.Text = String.Format("Items (Checked: {0}/{1})", Content.CheckedItems.Count(), Content.Count); 131 } 116 132 } 117 133 } -
trunk/sources/HeuristicLab.Core.Views/3.3/CheckedItemListView.cs
r9026 r9134 144 144 } 145 145 } 146 protected override void Content_CollectionReset(object sender, CollectionItemsChangedEventArgs<IndexedItem<T>> e) { 147 base.Content_CollectionReset(sender, e); 148 SetNumberOfCheckItems(); 149 } 150 protected override void Content_ItemsAdded(object sender, CollectionItemsChangedEventArgs<IndexedItem<T>> e) { 151 base.Content_ItemsAdded(sender, e); 152 SetNumberOfCheckItems(); 153 } 154 protected override void Content_ItemsMoved(object sender, CollectionItemsChangedEventArgs<IndexedItem<T>> e) { 155 base.Content_ItemsMoved(sender, e); 156 SetNumberOfCheckItems(); 157 } 158 protected override void Content_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<IndexedItem<T>> e) { 159 base.Content_ItemsRemoved(sender, e); 160 SetNumberOfCheckItems(); 161 } 162 protected override void Content_ItemsReplaced(object sender, CollectionItemsChangedEventArgs<IndexedItem<T>> e) { 163 base.Content_ItemsReplaced(sender, e); 164 SetNumberOfCheckItems(); 165 } 146 166 #endregion 147 167 148 168 private void SetNumberOfCheckItems() { 149 this.itemsGroupBox.Text = String.Format("Items (Checked: {0}/{1})", Content.CheckedItems.Count(), Content.Count); 169 if (InvokeRequired) { 170 Invoke((Action)SetNumberOfCheckItems); 171 } else { 172 this.itemsGroupBox.Text = String.Format("Items (Checked: {0}/{1})", Content.CheckedItems.Count(), Content.Count); 173 } 150 174 } 151 175 }
Note: See TracChangeset
for help on using the changeset viewer.