public bool IsMemberFlag(FlagCheckedListBoxItem composite)
 {
     return this.IsFlag && (this.value & composite.value) == this.value;
 }
Esempio n. 2
0
 public FlagCheckedListBoxItem Add(int v, string c)
 {
     FlagCheckedListBoxItem flagCheckedListBoxItem = new FlagCheckedListBoxItem(v, c);
     base.Items.Add(flagCheckedListBoxItem);
     return flagCheckedListBoxItem;
 }
Esempio n. 3
0
 public FlagCheckedListBoxItem Add(FlagCheckedListBoxItem item)
 {
     base.Items.Add(item);
     return item;
 }
Esempio n. 4
0
 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);
 }