public bool IsMemberFlag(FlagCheckedListBoxItem composite) { return this.IsFlag && (this.value & composite.value) == this.value; }
public FlagCheckedListBoxItem Add(int v, string c) { FlagCheckedListBoxItem flagCheckedListBoxItem = new FlagCheckedListBoxItem(v, c); base.Items.Add(flagCheckedListBoxItem); return flagCheckedListBoxItem; }
public FlagCheckedListBoxItem Add(FlagCheckedListBoxItem item) { base.Items.Add(item); return item; }
protected void UpdateCheckedItems(FlagCheckedListBoxItem composite, CheckState cs) { if (composite.value == 0) { this.UpdateCheckedItems(0); } int num = 0; for (int i = 0; i < base.Items.Count; i++) { FlagCheckedListBoxItem flagCheckedListBoxItem = base.Items[i] as FlagCheckedListBoxItem; if (base.GetItemChecked(i)) { num |= flagCheckedListBoxItem.value; } } if (cs == CheckState.Unchecked) { num &= ~composite.value; } else { num |= composite.value; } this.UpdateCheckedItems(num); }