Changeset 9026 for trunk/sources
- Timestamp:
- 12/11/12 16:36:26 (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
r7259 r9026 20 20 #endregion 21 21 22 using System; 22 23 using System.Drawing; 24 using System.Linq; 23 25 using System.Windows.Forms; 24 26 using HeuristicLab.Collections; … … 38 40 : base() { 39 41 InitializeComponent(); 42 } 43 44 protected override void OnContentChanged() { 45 base.OnContentChanged(); 46 if (Content != null) { 47 SetNumberOfCheckItems(); 48 } 40 49 } 41 50 … … 98 107 } 99 108 } 109 SetNumberOfCheckItems(); 100 110 } 101 111 } 102 112 #endregion 113 114 private void SetNumberOfCheckItems() { 115 this.itemsGroupBox.Text = String.Format("Items (Checked: {0}/{1})", Content.CheckedItems.Count(), Content.Count); 116 } 103 117 } 104 118 } -
trunk/sources/HeuristicLab.Core.Views/3.3/CheckedItemListView.cs
r7259 r9026 20 20 #endregion 21 21 22 using System; 23 using System.Drawing; 22 24 using System.Linq; 23 using System.Drawing;24 25 using System.Windows.Forms; 25 26 using HeuristicLab.Collections; … … 51 52 Content.CheckedItemsChanged -= new CollectionItemsChangedEventHandler<IndexedItem<T>>(Content_CheckedItemsChanged); 52 53 base.DeregisterContentEvents(); 54 } 55 56 protected override void OnContentChanged() { 57 base.OnContentChanged(); 58 if (Content != null) { 59 SetNumberOfCheckItems(); 60 } 53 61 } 54 62 … … 133 141 itemsListView.Items[item.Index].Checked = Content.ItemChecked(item.Value); 134 142 } 143 SetNumberOfCheckItems(); 135 144 } 136 145 } 137 146 #endregion 147 148 private void SetNumberOfCheckItems() { 149 this.itemsGroupBox.Text = String.Format("Items (Checked: {0}/{1})", Content.CheckedItems.Count(), Content.Count); 150 } 138 151 } 139 152 }
Note: See TracChangeset
for help on using the changeset viewer.