Example #1
0
        ////////////////////////////////////////////////////////////////////////////

        ////////////////////////////////////////////////////////////////////////////
        private void LoadSkinAttributes()
        {
            if (doc.Root.Element("Attributes") == null)
            {
                return;
            }

            var l = doc.Root.Element("Attributes").Elements("Attribute");

            if (l != null)
            {
                foreach (var e in l)
                {
                    SkinAttribute sa = new SkinAttribute();
                    sa.Name  = ReadAttribute(e, "Name", null, true);
                    sa.Value = ReadAttribute(e, "Value", null, true);
                    attributes.Add(sa);
                }
            }
        }
Example #2
0
        ////////////////////////////////////////////////////////////////////////////

        ////////////////////////////////////////////////////////////////////////////
        private void LoadLayerAttributes(SkinLayer sl, IEnumerable <XElement> l)
        {
            foreach (var e in l)
            {
                string        name = ReadAttribute(e, "Name", null, true);
                SkinAttribute sa   = sl.Attributes[name];
                bool          inh  = true;

                if (sa == null)
                {
                    sa  = new SkinAttribute();
                    inh = false;
                }

                sa.Name = name;
                ReadAttribute(ref sa.Value, inh, e, "Value", null, true);

                if (!inh)
                {
                    sl.Attributes.Add(sa);
                }
            }
        }
Example #3
0
        ////////////////////////////////////////////////////////////////////////////

        ////////////////////////////////////////////////////////////////////////////
        public SkinAttribute(SkinAttribute source)
            : base(source)
        {
            this.Value = source.Value;
        }