protected virtual void OnAfterCheck(CheckBoxEventArgs args) { if (AfterCheck != null) { AfterCheck(this, args); } }
public void SetItemCheckState(object item, CheckBoxState newCheckState) { CheckBoxEventArgs args = new CheckBoxEventArgs(item, GetItemCheckState(item), newCheckState); if (BeforeCheck != null) { BeforeCheck(this, args); } _checkStates [item] = args.NewState; if (args.OldState != args.NewState) { OnAfterCheck(args); OwnerControl.InvalidateItem(item); } }