Пример #1
0
        /// <summary>
        /// Loads the options from the XML node.
        /// </summary>
        public virtual void LoadFromXml(XmlElement xmlElem)
        {
            if (xmlElem == null)
            {
                throw new ArgumentNullException(nameof(xmlElem));
            }

            Active = xmlElem.GetAttrAsBool("active", true);
            Name   = xmlElem.GetAttrAsString("name");
            CnlNums.AddRange(RangeUtils.StrToRange(xmlElem.GetChildAsString("CnlNums"), true, true));
            DeviceNums.AddRange(RangeUtils.StrToRange(xmlElem.GetChildAsString("DeviceNums"), true, true));
            Query = xmlElem.GetChildAsString("Query");
        }
Пример #2
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");
            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");
        }