public DateFilterControl(VirtualItemDateFilter 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(); base.CanRaiseFilterChanged = false; CustomFilterControl.PerformDropDownClick(this.tsddDate, filter.DatePart); this.SetFilter(filter); base.CanRaiseFilterChanged = true; }
private void Write99_VirtualItemDateFilter(string n, string ns, VirtualItemDateFilter o, bool isNullable, bool needType) { if (o == null) { if (isNullable) { base.WriteNullTagLiteral(n, ns); } } else { if (!needType && (o.GetType() != typeof(VirtualItemDateFilter))) { throw base.CreateUnknownTypeException(o); } base.WriteStartElement(n, ns, o, false, null); if (needType) { base.WriteXsiType("VirtualItemDateFilter", ""); } base.WriteElementString("DateComparision", "", this.Write67_DateComparision(o.DateComparision)); if (o.NotOlderThan != 1) { base.WriteElementStringRaw("NotOlderThan", "", XmlConvert.ToString(o.NotOlderThan)); } if (o.DateMeasure != DateUnit.Day) { base.WriteElementString("DateMeasure", "", this.Write68_DateUnit(o.DateMeasure)); } base.WriteElementStringRaw("FromDate", "", XmlSerializationWriter.FromDate(o.FromDate)); base.WriteElementStringRaw("ToDate", "", XmlSerializationWriter.FromDate(o.ToDate)); if (o.DatePart != ItemDateTimePart.LastWriteTime) { base.WriteElementString("DatePart", "", this.Write90_ItemDateTimePart(o.DatePart)); } base.WriteEndElement(o); } }
private VirtualItemDateFilter Read99_VirtualItemDateFilter(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.id64_VirtualItemDateFilter) || (type.Namespace != this.id2_Item))) { throw base.CreateUnknownTypeException(type); } if (flag) { return null; } VirtualItemDateFilter o = new VirtualItemDateFilter(); bool[] flagArray = new bool[6]; 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.id194_DateComparision)) && (base.Reader.NamespaceURI == this.id2_Item)) { o.DateComparision = this.Read67_DateComparision(base.Reader.ReadElementString()); flagArray[0] = true; } else if ((!flagArray[1] && (base.Reader.LocalName == this.id195_NotOlderThan)) && (base.Reader.NamespaceURI == this.id2_Item)) { if (base.Reader.IsEmptyElement) { base.Reader.Skip(); } else { o.NotOlderThan = XmlConvert.ToInt32(base.Reader.ReadElementString()); } flagArray[1] = true; } else if ((!flagArray[2] && (base.Reader.LocalName == this.id196_DateMeasure)) && (base.Reader.NamespaceURI == this.id2_Item)) { if (base.Reader.IsEmptyElement) { base.Reader.Skip(); } else { o.DateMeasure = this.Read68_DateUnit(base.Reader.ReadElementString()); } flagArray[2] = true; } else if ((!flagArray[3] && (base.Reader.LocalName == this.id197_FromDate)) && (base.Reader.NamespaceURI == this.id2_Item)) { o.FromDate = XmlSerializationReader.ToDate(base.Reader.ReadElementString()); flagArray[3] = true; } else if ((!flagArray[4] && (base.Reader.LocalName == this.id198_ToDate)) && (base.Reader.NamespaceURI == this.id2_Item)) { o.ToDate = XmlSerializationReader.ToDate(base.Reader.ReadElementString()); flagArray[4] = true; } else if ((!flagArray[5] && (base.Reader.LocalName == this.id199_DatePart)) && (base.Reader.NamespaceURI == this.id2_Item)) { if (base.Reader.IsEmptyElement) { base.Reader.Skip(); } else { o.DatePart = this.Read90_ItemDateTimePart(base.Reader.ReadElementString()); } flagArray[5] = true; } else { base.UnknownNode(o, ":DateComparision, :NotOlderThan, :DateMeasure, :FromDate, :ToDate, :DatePart"); } } else { base.UnknownNode(o, ":DateComparision, :NotOlderThan, :DateMeasure, :FromDate, :ToDate, :DatePart"); } base.Reader.MoveToContent(); base.CheckReaderCount(ref whileIterations, ref readerCount); } base.ReadEndElement(); return o; }