示例#1
0
        ////////////////////////////////////////////////////////////////////////////

        ////////////////////////////////////////////////////////////////////////////
        public SkinControl(SkinControl source)
            : base(source)
        {
            this.Inherits      = source.Inherits;
            this.DefaultSize   = source.DefaultSize;
            this.MinimumSize   = source.MinimumSize;
            this.OriginMargins = source.OriginMargins;
            this.ClientMargins = source.ClientMargins;
            this.ResizerSize   = source.ResizerSize;
            this.Layers        = new SkinList <SkinLayer>(source.Layers);
            this.Attributes    = new SkinList <SkinAttribute>(source.Attributes);
        }
示例#2
0
        ////////////////////////////////////////////////////////////////////////////

        ////////////////////////////////////////////////////////////////////////////
        public SkinList(SkinList <T> source)
            : base()
        {
            for (int i = 0; i < source.Count; i++)
            {
                Type[] t = new Type[1];
                t[0] = typeof(T);

                object[] p = new object[1];
                p[0] = source[i];

                this.Add((T)t[0].GetConstructor(t).Invoke(p));
            }
        }
示例#3
0
        ////////////////////////////////////////////////////////////////////////////

        #endregion

        #region         //// Construstors //////

        ////////////////////////////////////////////////////////////////////////////
        public Skin(Manager manager, string name)
            : base(manager)
        {
            this.name             = name;
            content               = new ContentManager(Manager.Game.Services);
            content.RootDirectory = GetFolder();
            doc        = new XDocument();
            controls   = new SkinList <SkinControl>();
            fonts      = new SkinList <SkinFont>();
            images     = new SkinList <SkinImage>();
            cursors    = new SkinList <SkinCursor>();
            attributes = new SkinList <SkinAttribute>();

            LoadSkin(null);
        }
示例#4
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.");
            }
        }