Changeset 6760 for branches/PersistenceSpeedUp/HeuristicLab.Core.Views/3.3/CheckedItemCollectionView.cs
- Timestamp:
- 09/14/11 13:59:25 (13 years ago)
- Location:
- branches/PersistenceSpeedUp
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PersistenceSpeedUp
- Property svn:ignore
-
old new 12 12 *.psess 13 13 *.vsp 14 *.docstates
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/PersistenceSpeedUp/HeuristicLab.Core.Views/3.3/CheckedItemCollectionView.cs
r5445 r6760 20 20 #endregion 21 21 22 using System.Drawing; 22 23 using System.Windows.Forms; 23 24 using HeuristicLab.Collections; … … 49 50 } 50 51 52 private Color backupColor = Color.Empty; 51 53 protected override void SetEnabledStateOfControls() { 54 if (backupColor == Color.Empty) backupColor = base.itemsListView.BackColor; 52 55 base.SetEnabledStateOfControls(); 53 base.itemsListView.Enabled = !this.Locked; 56 if (ReadOnly || Locked) 57 base.itemsListView.BackColor = ListView.DefaultBackColor; 58 else 59 base.itemsListView.BackColor = backupColor; 54 60 } 55 61 … … 70 76 bool check = e.NewValue == CheckState.Checked; 71 77 if (Content.ItemChecked(checkedItem) != check) { 72 Content.SetItemCheckedState(checkedItem, check); 78 if (!ReadOnly && !Locked) Content.SetItemCheckedState(checkedItem, check); 79 else e.NewValue = e.CurrentValue; 73 80 } 74 81 }
Note: See TracChangeset
for help on using the changeset viewer.