Example #1
0
 /// <summary>
 /// This Method starts the timer for the picture animation
 /// </summary>
 private void startAnimation()
 {
     stopAnimation();
     ToEndAnimation.Interval   = speed;
     ToStartAnimation.Interval = speed;
     ToEndAnimation.Start();
 }
Example #2
0
 /// <summary>
 /// If the animation is in "up-phase" then every tick the picture Y-Cordinate -= 1
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void ToStartAnimation_Tick(object sender, EventArgs e)
 {
     if (this.pictureBox1.Location.Y > y)
     {
         pictureBox1.Location = new Point(pictureBox1.Location.X, pictureBox1.Location.Y - 1);
     }
     else
     {
         ToStartAnimation.Stop();
         ToEndAnimation.Start();
     }
 }
Example #3
0
 /// <summary>
 /// This method stops the animation
 /// </summary>
 private void stopAnimation()
 {
     ToEndAnimation.Stop();
     ToStartAnimation.Stop();
     this.pictureBox1.Location = new Point(pictureBox1.Location.X, y);
 }