public AttrFilterControl(AttributeFilter filter)
 {
     this.components = null;
     this.InitializeComponent();
     this.InitializeControls();
     this.SetFilter(filter);
 }
 private void Write93_AttributeFilter(string n, string ns, AttributeFilter o, bool isNullable, bool needType)
 {
     if (o == null)
     {
         if (isNullable)
         {
             base.WriteNullTagLiteral(n, ns);
         }
     }
     else
     {
         if (!needType)
         {
             System.Type type = o.GetType();
             if (type != typeof(AttributeFilter))
             {
                 if (type != typeof(VirtualItemAttributeFilter))
                 {
                     throw base.CreateUnknownTypeException(o);
                 }
                 this.Write94_VirtualItemAttributeFilter(n, ns, (VirtualItemAttributeFilter) o, isNullable, true);
                 return;
             }
         }
         base.WriteStartElement(n, ns, o, false, null);
         if (needType)
         {
             base.WriteXsiType("AttributeFilter", "");
         }
         base.WriteElementString("IncludeAttributes", "", this.Write92_FileAttributes(o.IncludeAttributes));
         base.WriteElementString("ExcludeAttributes", "", this.Write92_FileAttributes(o.ExcludeAttributes));
         base.WriteEndElement(o);
     }
 }
 public void SetFilter(AttributeFilter filter)
 {
     if (filter == null)
     {
         this.Clear();
     }
     else
     {
         foreach (CheckBox box in this.AttrCheckBoxList)
         {
             if ((filter.IncludeAttributes & ((FileAttributes) box.Tag)) > 0)
             {
                 box.CheckState = CheckState.Checked;
             }
             else if ((filter.ExcludeAttributes & ((FileAttributes) box.Tag)) > 0)
             {
                 box.CheckState = CheckState.Unchecked;
             }
             else
             {
                 box.CheckState = CheckState.Indeterminate;
             }
         }
     }
 }
 private AttributeFilter Read93_AttributeFilter(bool isNullable, bool checkType)
 {
     XmlQualifiedName type = checkType ? base.GetXsiType() : null;
     bool flag = false;
     if (isNullable)
     {
         flag = base.ReadNull();
     }
     if ((checkType && (type != null)) && ((type.Name != this.id182_AttributeFilter) || (type.Namespace != this.id2_Item)))
     {
         if ((type.Name != this.id61_VirtualItemAttributeFilter) || (type.Namespace != this.id2_Item))
         {
             throw base.CreateUnknownTypeException(type);
         }
         return this.Read94_VirtualItemAttributeFilter(isNullable, false);
     }
     if (flag)
     {
         return null;
     }
     AttributeFilter o = new AttributeFilter();
     bool[] flagArray = new bool[2];
     while (base.Reader.MoveToNextAttribute())
     {
         if (!base.IsXmlnsAttribute(base.Reader.Name))
         {
             base.UnknownNode(o);
         }
     }
     base.Reader.MoveToElement();
     if (base.Reader.IsEmptyElement)
     {
         base.Reader.Skip();
         return o;
     }
     base.Reader.ReadStartElement();
     base.Reader.MoveToContent();
     int whileIterations = 0;
     int readerCount = base.ReaderCount;
     while ((base.Reader.NodeType != XmlNodeType.EndElement) && (base.Reader.NodeType != XmlNodeType.None))
     {
         if (base.Reader.NodeType == XmlNodeType.Element)
         {
             if ((!flagArray[0] && (base.Reader.LocalName == this.id205_IncludeAttributes)) && (base.Reader.NamespaceURI == this.id2_Item))
             {
                 o.IncludeAttributes = this.Read92_FileAttributes(base.Reader.ReadElementString());
                 flagArray[0] = true;
             }
             else if ((!flagArray[1] && (base.Reader.LocalName == this.id206_ExcludeAttributes)) && (base.Reader.NamespaceURI == this.id2_Item))
             {
                 o.ExcludeAttributes = this.Read92_FileAttributes(base.Reader.ReadElementString());
                 flagArray[1] = true;
             }
             else
             {
                 base.UnknownNode(o, ":IncludeAttributes, :ExcludeAttributes");
             }
         }
         else
         {
             base.UnknownNode(o, ":IncludeAttributes, :ExcludeAttributes");
         }
         base.Reader.MoveToContent();
         base.CheckReaderCount(ref whileIterations, ref readerCount);
     }
     base.ReadEndElement();
     return o;
 }