Exemplo n.º 1
0
        public TextureDisplay(BrowsablePointer item)
        {
            this.item      = item;
            DoubleBuffered = false;
            AppPaintable   = true;
            CanFocus       = true;
            item.Changed  += HandleItemChanged;

            flip = new Animator(6000, 6000, delegate { flip.Start(); item.MoveNext(true); });
            flip.RunWhenStarted = false;
        }
        private void HandleItemChanged(BrowsablePointer p, BrowsablePointerChangedArgs args)
        {
            Animator = new Animator(3000, 20, HandleTick);

            if (glx == null)
            {
                return;
            }

            //Console.WriteLine ("Begin previous = {0} texture = {1}",
            //		   previous != null ? previous.Id.ToString () : "null",
            //		   next != null ? next.Id.ToString () : "null");

            if (!item.IsValid || item.Collection.Count < 0)
            {
                return;
            }

            Next = null;
            PreloadNext();

            //Console.WriteLine ("End previous = {0} texture = {1}",
            //		   previous != null ? previous.Id.ToString () : "null",
            //		   next != null ? next.Id.ToString () : "null");

            if (IsRealized)
            {
                Animator.Start();
            }
        }
        protected override void OnMapped()
        {
            base.OnMapped();

            if (Animator != null)
            {
                Animator.Start();
            }
        }
Exemplo n.º 4
0
        private void HandleItemChanged(BrowsablePointer p, BrowsablePointerChangedArgs args)
        {
            Animator = new Animator(3000, 20, HandleTick);

            if (glx == null)
            {
                return;
            }

            if (!item.IsValid || item.Collection.Count < 0)
            {
                return;
            }

            //Next = null;
            PreloadNext();

            if (running)
            {
                Animator.Start();
            }
        }
		private void HandleItemChanged (BrowsablePointer p, BrowsablePointerChangedArgs args)
		{
			Animator = new Animator (3000, 20, HandleTick);

			if (glx == null)
				return;

			//Console.WriteLine ("Begin previous = {0} texture = {1}", 
			//		   previous != null ? previous.Id.ToString () : "null", 
			//		   next != null ? next.Id.ToString () : "null");

			if (!item.IsValid || item.Collection.Count < 0)
				return;

			Next = null;
			PreloadNext ();

			//Console.WriteLine ("End previous = {0} texture = {1}", 
			//		   previous != null ? previous.Id.ToString () : "null", 
			//		   next != null ? next.Id.ToString () : "null");

			if (IsRealized)
				Animator.Start ();
		}
		private void HandleItemChanged (BrowsablePointer p, BrowsablePointerChangedArgs args)
		{
			Animator = new Animator (3000, 20, HandleTick);

			if (glx == null)
				return;

			if (!item.IsValid || item.Collection.Count < 0)
				return;

			//Next = null;
			PreloadNext ();

			if (running)
				Animator.Start ();
		}