Exemple #1
0
        public LoadingAttributes(LoadingAttributes attributes) : base(attributes)
        {
            if (null == attributes)
            {
                return;
            }

            if (null != attributes.FPS)
            {
                FPS = attributes.FPS.Clone() as IntSelector;
            }
            if (null != attributes.LoadingSize)
            {
                LoadingSize = attributes.LoadingSize;
            }
            if (null != attributes.ImageArray)
            {
                ImageArray = attributes.ImageArray;
            }
        }
Exemple #2
0
        private void Initialize()
        {
            loadingAttrs = attributes as LoadingAttributes;
            if (null == loadingAttrs)
            {
                throw new Exception("Loading attribute parse error.");
            }
            ApplyAttributes(this, loadingAttrs);

            imageVisual = new AnimatedImageVisual()
            {
                URLS        = new List <string>(),
                FrameDelay  = 16.6f,
                LoopCount   = -1,
                Size        = new Size2D(100, 100),
                Position    = new Vector2(0, 0),
                Origin      = Visual.AlignType.Center,
                AnchorPoint = Visual.AlignType.Center
            };

            UpdateVisual();

            this.AddVisual("loadingImageVisual", imageVisual);
        }
Exemple #3
0
 public Loading(LoadingAttributes attributes) : base(attributes)
 {
     Initialize();
 }