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