示例#1
0
 private void TimerPlay_Tick(object sender, EventArgs e)
 {
     CreatePicture(images[frame]);
     frame++;
     if (frame > images.Count - 1)
     {
         TimerPlay.Stop();
         PlayStopButton.BackColor = Color.LightGreen;
         PlayStopButton.Text      = "PLAY";
         frame = 0;
     }
 }
示例#2
0
 // play/stop button
 private void PlayStopButton_Click(object sender, EventArgs e)
 {
     if (images.Count != 0)
     {
         if (PlayStopButton.Text == "PLAY")
         {
             TimerPlay.Start();
             PlayStopButton.BackColor = Color.LightCoral;
             PlayStopButton.Text      = "STOP";
         }
         else
         {
             TimerPlay.Stop();
             PlayStopButton.BackColor = Color.LightGreen;
             PlayStopButton.Text      = "PLAY";
         }
     }
     else
     {
         MessageBox.Show("Nothing is loaded. Please Load some Pictures.");
     }
 }