Exemplo n.º 1
0
        }     // LoadCursors
        #endif

        #endregion

        #region Load Images

        /// <summary>
        /// Load images information.
        /// </summary>
        private static void LoadImagesDescription()
        {
            if (skinDescription.Resource.Element("Skin").Element("Images") == null)
            {
                return;
            }

            foreach (var image in skinDescription.Resource.Element("Skin").Element("Images").Elements())
            {
                SkinImage skinImage = new SkinImage
                {
                    Name     = ReadAttribute(image, "Name", null, true),
                    Filename = ReadAttribute(image, "Asset", null, true)
                };
                Images.Add(skinImage);
            }
        } // LoadImages
Exemplo n.º 2
0
        } // SkinLayer

        public SkinLayer(SkinLayer source) : base(source)
        {
            if (source != null)
            {
                Image          = new SkinImage(source.Image);
                Width          = source.Width;
                Height         = source.Height;
                OffsetX        = source.OffsetX;
                OffsetY        = source.OffsetY;
                Alignment      = source.Alignment;
                SizingMargins  = source.SizingMargins;
                ContentMargins = source.ContentMargins;
                States         = source.States;
                Overlays       = source.Overlays;
                Text           = new SkinText(source.Text);
                Attributes     = new SkinList <SkinAttribute>(source.Attributes);
            }
            else
            {
                throw new Exception("Parameter for SkinLayer copy constructor cannot be null.");
            }
        } // SkinLayer
Exemplo n.º 3
0
 public SkinImage(SkinImage source) : base(source)
 {
     Texture  = source.Texture;
     Filename = source.Filename;
 } // SkinImage