Exemplo n.º 1
0
 private void Init()
 {
     this.Interval = 40;
     Duration      = DefaultDuration;
     timer.Tick   += new EventHandler(timer_Tick);
     eventArgs     = new AnimationEventArgs(this);
 }
Exemplo n.º 2
0
        void changeItemHeightScene(object sender, AnimationEventArgs e)
        {
            int index = ((ListBoxAnimation)sender).Index;
            lock (itemOffsets)
            {

                int h0 = itemOffsets[index + 1] - itemOffsets[index];
                int h = e.Value;
                int delta = h - h0;
                for (int i = index + 1; i < itemOffsets.Count; i++)
                {
                    itemOffsets[i] += delta;
                }
            }
            Rectangle bounds = GetItemBounds(index);
            bounds.Height = this.Height - bounds.Top;
            Invalidate(bounds);
        }
Exemplo n.º 3
0
 void animation_Scene(object sender, AnimationEventArgs e)
 {
     int value = Width * e.Value / e.EndValue;
     transitionFunc(value);
     OnTransitionChange(e);
 }
Exemplo n.º 4
0
 protected virtual void OnTransitionChange(AnimationEventArgs e)
 {
     if (TransitionChange != null) TransitionChange(this, e);
 }
Exemplo n.º 5
0
 void navigation_TransitionCompleted(object sender, AnimationEventArgs e)
 {
     header.BeginInit();
     #if SUPPORT_ALPHA
     animBackButton.Visible = false;
     header.ButtonsAlpha = 255;
     header.AnimButtons.Visible = false;
     header.BackButton.Alpha = 255;
     header.AnimButtons.Alpha = 0;
     #endif
     header.AnimLabel.Visible = false;
     header.AnimOffset = 0;
     header.EndInit();
     header.Refresh();
     inTransition = false;
 }
Exemplo n.º 6
0
        void navigation_TransitionChange(object sender, AnimationEventArgs e)
        {
            header.AnimOffset = back ? e.EndValue - e.Value : e.Value;
            header.AnimLabel.Visible = true;
            #if SUPPORT_ALPHA
            int alpha2 = (255 * e.Value / e.EndValue);

            int alpha = 255 - alpha2;
            header.BackButton.Alpha = alpha;
            header.ButtonsAlpha = alpha;
            header.AnimButtons.Alpha = alpha2;
            header.AnimBackButton.Alpha = alpha2;
            #endif
        }
Exemplo n.º 7
0
 void OnAnimationScene(object sender, AnimationEventArgs e)
 {
     AnchorStyles anchor = Anchor;
     try
     {
         Anchor = AnchorStyles.Left | AnchorStyles.Top;
         Top = e.Value;
     }
     finally
     {
         Anchor = anchor;
     }
 }
Exemplo n.º 8
0
 void AlphaAnimationScene(object sender, AnimationEventArgs e)
 {
     Alpha = e.Value;
 }
Exemplo n.º 9
0
        void BindingScene(object sender, AnimationEventArgs e)
        {
            Animation a = (Animation)sender;
            int index = animIndex;
            OffseDeltaItemTops(index, e.Value);

            Invalidate();
            Update();
        }
Exemplo n.º 10
0
 private void Init()
 {
     this.Interval = 40;
     Duration = DefaultDuration;
     timer.Tick += new EventHandler(timer_Tick);
     eventArgs = new AnimationEventArgs(this);
 }
Exemplo n.º 11
0
 void scrollAnimation_Scene(object sender, AnimationEventArgs e)
 {
     ScrollBarVisible = true;
     SetTopOffset(e.Value);
     Debug.WriteLine("Scene");
 }