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."); } }
private void LoadImages(string addon, bool archive) { if (doc["Skin"]["Images"] == null) { return; } XmlNodeList l = doc["Skin"]["Images"].GetElementsByTagName("Image"); if (l != null && l.Count > 0) { foreach (XmlElement e in l) { SkinImage si = new SkinImage(); si.Name = ReadAttribute(e, "Name", null, true); si.Archive = archive; 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; }
private void LoadImages(string addon, bool archive) { if (doc["Skin"]["Images"] == null) return; XmlNodeList l = doc["Skin"]["Images"].GetElementsByTagName("Image"); if (l != null && l.Count > 0) { foreach (XmlElement e in l) { SkinImage si = new SkinImage(); si.Name = ReadAttribute(e, "Name", null, true); si.Archive = archive; si.Asset = ReadAttribute(e, "Asset", null, true); si.Addon = addon; images.Add(si); } } }