Example #1
0
		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.");
			}
		}
Example #2
0
        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);
                }
            }
        }
Example #3
0
 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.");
     }
 }
Example #4
0
		public SkinImage(SkinImage source)
			: base(source) {
			this.Resource = source.Resource;
			this.Asset = source.Asset;
		}
Example #5
0
 public SkinImage(SkinImage source)
     : base(source)
 {
     this.Resource = source.Resource;
     this.Asset    = source.Asset;
 }
Example #6
0
		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);
				}
			}
		}