private void pictureBox5_MouseDown(object sender, MouseEventArgs e) { if (currentlyanimating != null) { if (currentlyanimating.IsDisposed == false) currentlyanimating.Dispose(); currentlyanimating = null; } if (e.Button == System.Windows.Forms.MouseButtons.Left) { pictureBox5.BackColor = Color.Teal; } }
private void pictureBox5_MouseLeave(object sender, EventArgs e) { if (currentlyanimating != null) { if (currentlyanimating.IsDisposed == false) currentlyanimating.Dispose(); currentlyanimating = null; } ColorAnimator an = new ColorAnimator((sender as Control)); currentlyanimating = an; an.Animate(255, 255, 255); }
private void pictureBox5_MouseHover(object sender, EventArgs e) { if (currentlyanimating != null) { if (currentlyanimating.IsDisposed == false) currentlyanimating.Dispose(); currentlyanimating = null; } ColorAnimator an = new ColorAnimator((sender as Control)); currentlyanimating = an; an.Animate(210,210,226, true); //Transitions.Transition.run(pictureBox5.BackColor, "B", Convert.ToByte(255), Convert.ToByte(0), new Transitions.TransitionType_Acceleration(2000)); }