Free cookie consent management tool by TermsFeed Policy Generator

Changeset 3738 for trunk


Ignore:
Timestamp:
05/10/10 14:04:46 (15 years ago)
Author:
mkommend
Message:

registered ItemCheck event instead of ItemChecekd in CheckedItemCollectionView and CheckedItemListView (ticket #992)

Location:
trunk/sources/HeuristicLab.Core.Views/3.3
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Core.Views/3.3/CheckedItemCollectionView.Designer.cs

    r3595 r3738  
    4848      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    4949      base.itemsListView.CheckBoxes = true;
    50       base.itemsListView.ItemChecked += new System.Windows.Forms.ItemCheckedEventHandler(itemsListView_ItemChecked);
     50      base.itemsListView.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(itemsListView_ItemCheck);
    5151    }
    5252
  • trunk/sources/HeuristicLab.Core.Views/3.3/CheckedItemCollectionView.cs

    r3628 r3738  
    6868
    6969    #region ListView Events
    70     protected virtual void itemsListView_ItemChecked(object sender, ItemCheckedEventArgs e) {
    71       var checkedItem = (T)e.Item.Tag;
    72       if (Content.ItemChecked(checkedItem) != e.Item.Checked) {
    73         Content.SetItemCheckedState(checkedItem, e.Item.Checked);
     70    protected virtual void itemsListView_ItemCheck(object sender, ItemCheckEventArgs e) {
     71      var checkedItem = (T)itemsListView.Items[e.Index].Tag;
     72      bool check = e.NewValue == CheckState.Checked;
     73      if (Content.ItemChecked(checkedItem) != check) {
     74        Content.SetItemCheckedState(checkedItem, check);
    7475      }
    7576    }
  • trunk/sources/HeuristicLab.Core.Views/3.3/CheckedItemListView.Designer.cs

    r3595 r3738  
    4848      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    4949      base.itemsListView.CheckBoxes = true;
    50       base.itemsListView.ItemChecked += new System.Windows.Forms.ItemCheckedEventHandler(itemsListView_ItemChecked);
     50      base.itemsListView.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(itemsListView_ItemCheck);
    5151    }
    5252
  • trunk/sources/HeuristicLab.Core.Views/3.3/CheckedItemListView.cs

    r3628 r3738  
    7070
    7171    #region ListView Events
    72     protected virtual void itemsListView_ItemChecked(object sender, ItemCheckedEventArgs e) {
    73       var checkedItem = (T)e.Item.Tag;
    74       if (Content.ItemChecked(checkedItem) != e.Item.Checked) {
    75         Content.SetItemCheckedState(checkedItem, e.Item.Checked);
     72    protected virtual void itemsListView_ItemCheck(object sender, ItemCheckEventArgs e) {
     73      var checkedItem = (T) itemsListView.Items[e.Index].Tag;
     74      bool check = e.NewValue == CheckState.Checked;
     75      if (Content.ItemChecked(checkedItem) != check) {
     76        Content.SetItemCheckedState(checkedItem, check);
    7677      }
    7778    }
Note: See TracChangeset for help on using the changeset viewer.