コード例 #1
0
 public HexContentFilterControl(HexContentFilter filter)
 {
     this.components = null;
     if (filter == null)
     {
         throw new ArgumentNullException("filter");
     }
     this.InitializeComponent();
     this.InitializeToolStripItems();
     base.CanRaiseFilterChanged = false;
     CustomFilterControl.PerformDropDownClick(this.tsddContentComparision, filter.Comparision);
     this.MaskProvider = new MaskedTextProvider(CreateMask(filter.Sequence.Length * 2), CultureInfo.InvariantCulture, true);
     this.MaskProvider.Add(filter.SequenceAsString);
     this.tstbHex.Text = this.MaskProvider.ToDisplayString();
     base.CanRaiseFilterChanged = true;
 }
コード例 #2
0
 private void Write104_HexContentFilter(string n, string ns, HexContentFilter 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(HexContentFilter))
             {
                 if (type != typeof(VirtualItemHexContentFilter))
                 {
                     throw base.CreateUnknownTypeException(o);
                 }
                 this.Write105_VirtualItemHexContentFilter(n, ns, (VirtualItemHexContentFilter) o, isNullable, true);
                 return;
             }
         }
         base.WriteStartElement(n, ns, o, false, null);
         if (needType)
         {
             base.WriteXsiType("HexContentFilter", "");
         }
         base.WriteElementString("Comparision", "", this.Write71_ContentComparision(o.Comparision));
         base.WriteElementString("Sequence", "", o.SequenceAsString);
         base.WriteEndElement(o);
     }
 }
コード例 #3
0
 private HexContentFilter Read104_HexContentFilter(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.id181_HexContentFilter) || (type.Namespace != this.id2_Item)))
     {
         if ((type.Name != this.id67_VirtualItemHexContentFilter) || (type.Namespace != this.id2_Item))
         {
             throw base.CreateUnknownTypeException(type);
         }
         return this.Read105_VirtualItemHexContentFilter(isNullable, false);
     }
     if (flag)
     {
         return null;
     }
     HexContentFilter o = new HexContentFilter();
     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.id207_Comparision)) && (base.Reader.NamespaceURI == this.id2_Item))
             {
                 o.Comparision = this.Read71_ContentComparision(base.Reader.ReadElementString());
                 flagArray[0] = true;
             }
             else if ((!flagArray[1] && (base.Reader.LocalName == this.id208_Sequence)) && (base.Reader.NamespaceURI == this.id2_Item))
             {
                 o.SequenceAsString = base.Reader.ReadElementString();
                 flagArray[1] = true;
             }
             else
             {
                 base.UnknownNode(o, ":Comparision, :Sequence");
             }
         }
         else
         {
             base.UnknownNode(o, ":Comparision, :Sequence");
         }
         base.Reader.MoveToContent();
         base.CheckReaderCount(ref whileIterations, ref readerCount);
     }
     base.ReadEndElement();
     return o;
 }