コード例 #1
0
 /// <summary>
 /// Performs a modal animation of a listbox item.
 /// </summary>
 /// <param name="index">The index of the listbox item.</param>
 /// <param name="beginValue">The intial animation value.</param>
 /// <param name="endValue">The final animation value.</param>
 /// <param name="duration">The duration of the animation.</param>
 /// <param name="func">The AnimationFunc.</param>
 public static void AnimateModal(int index, int beginValue, int endValue, int duration, AnimationFunc func)
 {
     using (ListBoxAnimation a = new ListBoxAnimation())
     {
         a.Index        = index;
         a.BeginValue   = beginValue;
         a.EndValue     = endValue;
         a.Duration     = duration;
         a.Scene       += new EventHandler <AnimationEventArgs>(func);
         a.Mode         = AnimationMode.Log;
         a.Acceleration = 0.05f;
         a.StartModal();
     }
 }
コード例 #2
0
ファイル: ListBoxAnimation.cs プロジェクト: north0808/haina
 public static void AnimateModal(int index, int beginValue, int endValue, int duration, AnimationFunc func)
 {
     using (ListBoxAnimation a = new ListBoxAnimation())
     {
         a.Index = index;
         a.BeginValue = beginValue;
         a.EndValue = endValue;
         a.Duration = duration;
         a.Scene +=new EventHandler<AnimationEventArgs>(func);
         a.Mode = AnimationMode.Log;
         a.Acceleration = 0.05f;
         a.StartModal();
     }
 }