示例#1
0
        public void SaveToXmlNode(XmlNode node)
        {
            XmlNode nd = node.OwnerDocument.CreateElement("Font");

            node.AppendChild(nd);
            XmlSerialization.WriteValue(nd, this.Font);
            nd = node.OwnerDocument.CreateElement("TextColor");
            node.AppendChild(nd);
            XmlSerialization.WriteValue(nd, this.TextColor);
            nd = node.OwnerDocument.CreateElement("BackColor");
            node.AppendChild(nd);
            XmlSerialization.WriteValue(nd, this.BackColor);
        }
示例#2
0
        protected override void OnSave(XmlNode node)
        {
            base.OnSave(node);
            XmlNode nd = node.OwnerDocument.CreateElement("UseDefaultValue");

            node.AppendChild(nd);
            XmlSerialization.WriteValue(nd, _useDefault);
            if (_default != null)
            {
                nd = node.OwnerDocument.CreateElement("DefaultValue");
                node.AppendChild(nd);
                XmlSerialization.WriteValue(nd, _default);
            }
            XmlSerialization.SetAttribute(node, "direction", _direction);
        }
 public void SaveToXmlNode(XmlNode node)
 {
     XmlNode nd = node.OwnerDocument.CreateElement("IconType");
     node.AppendChild(nd);
     XmlSerialization.WriteValue(nd, this.IconType);
     nd = node.OwnerDocument.CreateElement("IconSize");
     node.AppendChild(nd);
     XmlSerialization.WriteValue(nd, this.IconSize);
     if (_icon != null)
     {
         nd = node.OwnerDocument.CreateElement("IconImage");
         node.AppendChild(nd);
         XmlSerialization.WriteValue(nd, this._icon);
     }
     nd = node.OwnerDocument.CreateElement("TextAttributes");
     node.AppendChild(nd);
     this.TextAttributes.SaveToXmlNode(nd);
 }