//////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// private void LoadImages(string addon) { if (doc.Root.Element("Images") == null) { return; } var l = doc.Root.Element("Images").Elements("Image"); if (l != null) { foreach (var e in l) { SkinImage si = new SkinImage(); si.Name = ReadAttribute(e, "Name", null, true); si.Asset = ReadAttribute(e, "Asset", null, true); si.Addon = addon; images.Add(si); } } }
//////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// public SkinLayer(SkinLayer source) : base(source) { if (source != null) { this.Image = new SkinImage(source.Image); this.Width = source.Width; this.Height = source.Height; this.OffsetX = source.OffsetX; this.OffsetY = source.OffsetY; this.Alignment = source.Alignment; this.SizingMargins = source.SizingMargins; this.ContentMargins = source.ContentMargins; this.States = source.States; this.Overlays = source.Overlays; this.Text = new SkinText(source.Text); this.Attributes = new SkinList <SkinAttribute>(source.Attributes); } else { throw new Exception("Parameter for SkinLayer copy constructor cannot be null."); } }
//////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// public SkinImage(SkinImage source) : base(source) { this.Resource = source.Resource; this.Asset = source.Asset; }