/// <summary>
        /// Serializes the specified writer.
        /// </summary>
        /// <param name="writer">Writer.</param>
        public override void Serialize(XmlWriter writer)
        {
            writer.WriteStartElement("DefineEditTextTag");
            writer.WriteElementString("CharacterId", characterId.ToString());
            this.rect.Serialize(writer);
            writer.WriteElementString("WordWrap", wordWrap.ToString());
            writer.WriteElementString("Multiline", multiline.ToString());
            writer.WriteElementString("Password", password.ToString());
            writer.WriteElementString("ReadOnly", readOnly.ToString());
            writer.WriteElementString("HasMaxLength", HasMaxLength.ToString());
            writer.WriteElementString("HasFont", HasFont.ToString());
            writer.WriteElementString("AutoSize", autoSize.ToString());
            writer.WriteElementString("HasLayout", HasLayout.ToString());
            writer.WriteElementString("NoSelect", noSelect.ToString());
            writer.WriteElementString("Border", border.ToString());
            writer.WriteElementString("Html", html.ToString());
            writer.WriteElementString("UsedOutlines", usedOutlines.ToString());

            if (HasFont)
            {
                writer.WriteElementString("FontId", fontId.ToString());
                writer.WriteElementString("FontHeight", fontHeight.ToString());
            }
            if (HasTextColor)
            {
                textColor.Serialize(writer);
            }
            if (HasMaxLength)
            {
                writer.WriteElementString("MaxLenght", maxLenght.ToString());
            }
            if (HasLayout)
            {
                writer.WriteElementString("Align", align.ToString());
                writer.WriteElementString("LeftMargin", leftMargin.ToString());
                writer.WriteElementString("RightMargin", rightMargin.ToString());
                writer.WriteElementString("Indent", indent.ToString());
                writer.WriteElementString("Leading", leading.ToString());
            }
            writer.WriteElementString("VariableName", variableName.ToString());
            if (HasText)
            {
                writer.WriteElementString("InitialText", initialText.ToString());
            }

            writer.WriteEndElement();
        }
Example #2
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = HasVariousPropertyBits.GetHashCode();
         hashCode = (hashCode * 397) ^ HasBackColor.GetHashCode();
         hashCode = (hashCode * 397) ^ HasForeColor.GetHashCode();
         hashCode = (hashCode * 397) ^ HasMaxLength.GetHashCode();
         hashCode = (hashCode * 397) ^ HasBorderStyle.GetHashCode();
         hashCode = (hashCode * 397) ^ HasScrollBars.GetHashCode();
         hashCode = (hashCode * 397) ^ HasDisplayStyle.GetHashCode();
         hashCode = (hashCode * 397) ^ HasMousePointer.GetHashCode();
         hashCode = (hashCode * 397) ^ HasSize.GetHashCode();
         hashCode = (hashCode * 397) ^ HasPasswordChar.GetHashCode();
         hashCode = (hashCode * 397) ^ HasListWidth.GetHashCode();
         hashCode = (hashCode * 397) ^ HasBoundColumn.GetHashCode();
         hashCode = (hashCode * 397) ^ HasTextColumn.GetHashCode();
         hashCode = (hashCode * 397) ^ HasColumnCount.GetHashCode();
         hashCode = (hashCode * 397) ^ HasListRows.GetHashCode();
         hashCode = (hashCode * 397) ^ HasColumnInfoCount.GetHashCode();
         hashCode = (hashCode * 397) ^ HasMatchEntry.GetHashCode();
         hashCode = (hashCode * 397) ^ HasListStyle.GetHashCode();
         hashCode = (hashCode * 397) ^ HasShowDropDownWhen.GetHashCode();
         hashCode = (hashCode * 397) ^ HasDropButtonStyle.GetHashCode();
         hashCode = (hashCode * 397) ^ HasMultiSelect.GetHashCode();
         hashCode = (hashCode * 397) ^ HasValue.GetHashCode();
         hashCode = (hashCode * 397) ^ HasCaption.GetHashCode();
         hashCode = (hashCode * 397) ^ HasPicturePosition.GetHashCode();
         hashCode = (hashCode * 397) ^ HasBorderColor.GetHashCode();
         hashCode = (hashCode * 397) ^ HasSpecialEffect.GetHashCode();
         hashCode = (hashCode * 397) ^ HasMouseIcon.GetHashCode();
         hashCode = (hashCode * 397) ^ HasPicture.GetHashCode();
         hashCode = (hashCode * 397) ^ HasAccelerator.GetHashCode();
         hashCode = (hashCode * 397) ^ HasGroupName.GetHashCode();
         return(hashCode);
     }
 }