예제 #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.");
            }
        }