示例#1
0
        /// <summary>
        /// Загрузить конфигурацию компонента из XML-узла
        /// </summary>
        public override void LoadFromXml(XmlNode xmlNode)
        {
            base.LoadFromXml(xmlNode);

            BackColorOnHover   = xmlNode.GetChildAsString("BackColorOnHover");
            BorderColorOnHover = xmlNode.GetChildAsString("BorderColorOnHover");
            ForeColorOnHover   = xmlNode.GetChildAsString("ForeColorOnHover");
            UnderlineOnHover   = xmlNode.GetChildAsBool("UnderlineOnHover");
            PopupSize          = PopupSize.GetChildAsSize(xmlNode, "PopupSize");
            Target             = xmlNode.GetChildAsEnum <LinkTarget>("Target");
            Url    = xmlNode.GetChildAsString("Url");
            ViewID = xmlNode.GetChildAsInt("ViewID");
        }
示例#2
0
        /// <summary>
        /// Сохранить конфигурацию компонента в XML-узле
        /// </summary>
        public override void SaveToXml(XmlElement xmlElem)
        {
            base.SaveToXml(xmlElem);

            xmlElem.AppendElem("BackColorOnHover", BackColorOnHover);
            xmlElem.AppendElem("BorderColorOnHover", BorderColorOnHover);
            xmlElem.AppendElem("ForeColorOnHover", ForeColorOnHover);
            xmlElem.AppendElem("UnderlineOnHover", UnderlineOnHover);
            PopupSize.AppendElem(xmlElem, "PopupSize", PopupSize);
            xmlElem.AppendElem("Target", Target);
            xmlElem.AppendElem("Url", Url);
            xmlElem.AppendElem("ViewID", ViewID);
        }
示例#3
0
文件: Link.cs 项目: zhiqiang-hu/scada
        /// <summary>
        /// Сохранить конфигурацию компонента в XML-узле
        /// </summary>
        public override void SaveToXml(XmlElement xmlElem)
        {
            base.SaveToXml(xmlElem);

            xmlElem.AppendElem("BackColorOnHover", BackColorOnHover);
            xmlElem.AppendElem("BorderColorOnHover", BorderColorOnHover);
            xmlElem.AppendElem("ForeColorOnHover", ForeColorOnHover);
            xmlElem.AppendElem("UnderlineOnHover", UnderlineOnHover);
            xmlElem.AppendElem("CnlNums", ScadaUtils.IntCollectionToStr(CnlNums));
            PopupSize.AppendElem(xmlElem, "PopupSize", PopupSize);
            xmlElem.AppendElem("Target", Target);
            xmlElem.AppendElem("Url", Url);
            xmlElem.AppendElem("ViewID", ViewID);
        }
示例#4
0
文件: Link.cs 项目: zhiqiang-hu/scada
        /// <summary>
        /// Загрузить конфигурацию компонента из XML-узла
        /// </summary>
        public override void LoadFromXml(XmlNode xmlNode)
        {
            base.LoadFromXml(xmlNode);

            BackColorOnHover   = xmlNode.GetChildAsString("BackColorOnHover");
            BorderColorOnHover = xmlNode.GetChildAsString("BorderColorOnHover");
            ForeColorOnHover   = xmlNode.GetChildAsString("ForeColorOnHover");
            UnderlineOnHover   = xmlNode.GetChildAsBool("UnderlineOnHover");
            CnlNums.Clear();
            CnlNums.AddRange(ScadaUtils.ParseIntArray(xmlNode.GetChildAsString("CnlNums")));
            PopupSize = PopupSize.GetChildAsSize(xmlNode, "PopupSize");
            Target    = xmlNode.GetChildAsEnum <LinkTarget>("Target");
            Url       = xmlNode.GetChildAsString("Url");
            ViewID    = xmlNode.GetChildAsInt("ViewID");
        }
示例#5
0
        /// <summary>
        /// Создать и добавить XML-элемент размера
        /// </summary>
        public static XmlElement AppendElem(XmlElement parentXmlElem, string elemName, PopupSize popupSize)
        {
            XmlElement xmlElem = parentXmlElem.OwnerDocument.CreateElement(elemName);

            xmlElem.AppendElem("Width", popupSize.Width);
            xmlElem.AppendElem("Height", popupSize.Height);
            return((XmlElement)parentXmlElem.AppendChild(xmlElem));
        }