public PropertyIntegralFilterControl(VirtualPropertyFilter filter)
 {
     this.components = null;
     this.InitializeComponent();
     this.InitializeToolStripItems();
     this.SetFilter(filter);
 }
 public DateFilterControl(VirtualPropertyFilter filter)
 {
     this.DateFormats = new string[] { "d", "D", "MM", "dd", "yy", "yyyy", "d/M", "ddd" };
     this.components = null;
     if (filter == null)
     {
         throw new ArgumentNullException("filter");
     }
     this.InitializeComponent();
     this.InitializeToolStripItems();
     this.SetProperty(filter.PropertyId);
     this.SetFilter((DateFilter) filter.Filter);
 }
 public PropertyStringFilterControl(VirtualPropertyFilter filter)
 {
     this.components = null;
     if (filter == null)
     {
         throw new ArgumentNullException("filter");
     }
     if (!(filter.Filter is StringFilter))
     {
         throw new ArgumentException("filter is not StringFilter");
     }
     this.InitializeComponent();
     this.InitializeToolStripItems();
     this.SetFilter(filter);
 }
 private void SetFilter(VirtualPropertyFilter filter)
 {
     if (filter == null)
     {
         throw new ArgumentNullException("filter");
     }
     this.SetProperty(filter.PropertyId);
     IntegralFilter<byte> filter2 = filter.Filter as IntegralFilter<byte>;
     IntegralFilter<short> filter3 = filter.Filter as IntegralFilter<short>;
     IntegralFilter<ushort> filter4 = filter.Filter as IntegralFilter<ushort>;
     IntegralFilter<int> filter5 = filter.Filter as IntegralFilter<int>;
     IntegralFilter<uint> filter6 = filter.Filter as IntegralFilter<uint>;
     IntegralFilter<long> filter7 = filter.Filter as IntegralFilter<long>;
     if ((((filter2 == null) && (filter5 == null)) && (filter6 == null)) && (filter7 == null))
     {
         throw new ArgumentException("filter is not integral filder of supported type");
     }
     base.CanRaiseFilterChanged = false;
     try
     {
         if (filter2 != null)
         {
             CustomFilterControl.PerformDropDownClick(this.tsddValueOperation, filter2.ValueComparision);
             this.tstbValueFrom.Tag = filter2.FromValue;
             this.tstbValueTo.Tag = filter2.ToValue;
         }
         if (filter3 != null)
         {
             CustomFilterControl.PerformDropDownClick(this.tsddValueOperation, filter3.ValueComparision);
             this.tstbValueFrom.Tag = filter3.FromValue;
             this.tstbValueTo.Tag = filter3.ToValue;
         }
         if (filter4 != null)
         {
             CustomFilterControl.PerformDropDownClick(this.tsddValueOperation, filter4.ValueComparision);
             this.tstbValueFrom.Tag = filter4.FromValue;
             this.tstbValueTo.Tag = filter4.ToValue;
         }
         if (filter5 != null)
         {
             CustomFilterControl.PerformDropDownClick(this.tsddValueOperation, filter5.ValueComparision);
             this.tstbValueFrom.Tag = filter5.FromValue;
             this.tstbValueTo.Tag = filter5.ToValue;
         }
         if (filter6 != null)
         {
             CustomFilterControl.PerformDropDownClick(this.tsddValueOperation, filter6.ValueComparision);
             this.tstbValueFrom.Tag = filter6.FromValue;
             this.tstbValueTo.Tag = filter6.ToValue;
         }
         if (filter7 != null)
         {
             CustomFilterControl.PerformDropDownClick(this.tsddValueOperation, filter7.ValueComparision);
             this.tstbValueFrom.Tag = filter7.FromValue;
             this.tstbValueTo.Tag = filter7.ToValue;
         }
         this.tstbValueFrom.Text = this.tstbValueFrom.Tag.ToString();
         this.tstbValueTo.Text = this.tstbValueTo.Tag.ToString();
     }
     finally
     {
         base.CanRaiseFilterChanged = true;
     }
 }
 public void SetFilter(VirtualPropertyFilter filter)
 {
     if (filter == null)
     {
         this.Clear();
     }
     else
     {
         VirtualProperty property = VirtualProperty.Get(filter.PropertyId);
         if (property == null)
         {
             throw new ArgumentException("filter has unknown PropertyId");
         }
         base.CanRaiseFilterChanged = false;
         try
         {
             this.tslPropertyName.Tag = filter.PropertyId;
             this.tslPropertyName.Text = property.LocalizedName;
             StringFilter filter2 = (StringFilter) filter.Filter;
             CustomFilterControl.PerformDropDownClick(this.tsddContentComparision, filter2.Comparision);
             this.tstbText.Text = filter2.Text;
             this.tsmiOptionWholeWords.Checked = (filter2.Options & ContentFilterOptions.WholeWords) > 0;
             this.tsmiOptionSpaceCompress.Checked = (filter2.Options & ContentFilterOptions.SpaceCompress) > 0;
             this.tsmiOptionRegex.Checked = (filter2.Options & ContentFilterOptions.Regex) > 0;
             this.tsmiOptionCaseSensitive.Checked = (filter2.Options & ContentFilterOptions.CaseSensitive) > 0;
         }
         finally
         {
             base.CanRaiseFilterChanged = true;
         }
     }
 }
 private void Write84_VirtualPropertyFilter(string n, string ns, VirtualPropertyFilter o, bool isNullable, bool needType)
 {
     if (o == null)
     {
         if (isNullable)
         {
             base.WriteNullTagLiteral(n, ns);
         }
     }
     else
     {
         if (!needType && (o.GetType() != typeof(VirtualPropertyFilter)))
         {
             throw base.CreateUnknownTypeException(o);
         }
         base.WriteStartElement(n, ns, o, false, null);
         if (needType)
         {
             base.WriteXsiType("VirtualPropertyFilter", "");
         }
         base.WriteElementStringRaw("PropertyId", "", XmlConvert.ToString(o.PropertyId));
         if (o.Filter != null)
         {
             if (o.Filter is IntegralFilter<byte>)
             {
                 this.Write83_IntegralFilterOfByte("ByteFilter", "", (IntegralFilter<byte>) o.Filter, false, false);
             }
             else if (o.Filter is IntegralFilter<uint>)
             {
                 this.Write79_IntegralFilterOfUInt32("UInt32Filter", "", (IntegralFilter<uint>) o.Filter, false, false);
             }
             else if (o.Filter is IntegralFilter<int>)
             {
                 this.Write81_IntegralFilterOfInt32("Int32Filter", "", (IntegralFilter<int>) o.Filter, false, false);
             }
             else if (o.Filter is IntegralFilter<long>)
             {
                 this.Write77_IntegralFilterOfInt64("Int64Filter", "", (IntegralFilter<long>) o.Filter, false, false);
             }
             else if (o.Filter is DateFilter)
             {
                 this.Write69_DateFilter("DateFilter", "", (DateFilter) o.Filter, false, false);
             }
             else if (o.Filter is SimpleFilter<Version>)
             {
                 this.Write75_SimpleFilterOfVersion("VersionFilter", "", (SimpleFilter<Version>) o.Filter, false, false);
             }
             else if (o.Filter is StringFilter)
             {
                 this.Write72_StringFilter("StringFilter", "", (StringFilter) o.Filter, false, false);
             }
             else if (o.Filter != null)
             {
                 throw base.CreateUnknownTypeException(o.Filter);
             }
         }
         base.WriteEndElement(o);
     }
 }
 private void SetFilter(VirtualPropertyFilter filter)
 {
     if (filter == null)
     {
         throw new ArgumentNullException("filter");
     }
     this.SetProperty(filter.PropertyId);
     SimpleFilter<Version> filter2 = filter.Filter as SimpleFilter<Version>;
     if (filter2 == null)
     {
         throw new ArgumentException("filter is not SimpleFilter<Version>");
     }
     base.CanRaiseFilterChanged = false;
     try
     {
         CustomFilterControl.PerformDropDownClick(this.tsddValueOperation, filter2.ValueComparision);
         this.tstbValue.Tag = filter2.FromValue;
         this.tstbValue.Text = this.tstbValue.Tag.ToString();
     }
     finally
     {
         base.CanRaiseFilterChanged = true;
     }
 }
 private VirtualPropertyFilter Read84_VirtualPropertyFilter(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.id70_VirtualPropertyFilter) || (type.Namespace != this.id2_Item)))
     {
         throw base.CreateUnknownTypeException(type);
     }
     if (flag)
     {
         return null;
     }
     VirtualPropertyFilter o = new VirtualPropertyFilter();
     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.id215_PropertyId)) && (base.Reader.NamespaceURI == this.id2_Item))
             {
                 o.PropertyId = XmlConvert.ToInt32(base.Reader.ReadElementString());
                 flagArray[0] = true;
             }
             else if ((!flagArray[1] && (base.Reader.LocalName == this.id184_DateFilter)) && (base.Reader.NamespaceURI == this.id2_Item))
             {
                 o.Filter = this.Read69_DateFilter(false, true);
                 flagArray[1] = true;
             }
             else if ((!flagArray[1] && (base.Reader.LocalName == this.id216_StringFilter)) && (base.Reader.NamespaceURI == this.id2_Item))
             {
                 o.Filter = this.Read72_StringFilter(false, true);
                 flagArray[1] = true;
             }
             else if ((!flagArray[1] && (base.Reader.LocalName == this.id217_VersionFilter)) && (base.Reader.NamespaceURI == this.id2_Item))
             {
                 o.Filter = this.Read75_SimpleFilterOfVersion(false, true);
                 flagArray[1] = true;
             }
             else if ((!flagArray[1] && (base.Reader.LocalName == this.id218_Int64Filter)) && (base.Reader.NamespaceURI == this.id2_Item))
             {
                 o.Filter = this.Read77_IntegralFilterOfInt64(false, true);
                 flagArray[1] = true;
             }
             else if ((!flagArray[1] && (base.Reader.LocalName == this.id219_UInt32Filter)) && (base.Reader.NamespaceURI == this.id2_Item))
             {
                 o.Filter = this.Read79_IntegralFilterOfUInt32(false, true);
                 flagArray[1] = true;
             }
             else if ((!flagArray[1] && (base.Reader.LocalName == this.id220_Int32Filter)) && (base.Reader.NamespaceURI == this.id2_Item))
             {
                 o.Filter = this.Read81_IntegralFilterOfInt32(false, true);
                 flagArray[1] = true;
             }
             else if ((!flagArray[1] && (base.Reader.LocalName == this.id221_ByteFilter)) && (base.Reader.NamespaceURI == this.id2_Item))
             {
                 o.Filter = this.Read83_IntegralFilterOfByte(false, true);
                 flagArray[1] = true;
             }
             else
             {
                 base.UnknownNode(o, ":PropertyId, :DateFilter, :StringFilter, :VersionFilter, :Int64Filter, :UInt32Filter, :Int32Filter, :ByteFilter");
             }
         }
         else
         {
             base.UnknownNode(o, ":PropertyId, :DateFilter, :StringFilter, :VersionFilter, :Int64Filter, :UInt32Filter, :Int32Filter, :ByteFilter");
         }
         base.Reader.MoveToContent();
         base.CheckReaderCount(ref whileIterations, ref readerCount);
     }
     base.ReadEndElement();
     return o;
 }