private void ChangeStatus(GIFFileStatus.Status status) { if (status == gifFileStatus.status) { return; } gifFileStatus.status = status; switch (status) { case GIFFileStatus.Status.Playing: ForwardActiveFrame(); if (gifFileStatus.isAutoplay && timer.Enabled == false) { timer.Start(); } controlButton.Image = Properties.Resources.stop_smaller; stopButton.Enabled = true; playButton.Enabled = false; break; case GIFFileStatus.Status.Pausing: if (timer.Enabled) { timer.Stop(); } controlButton.Image = Properties.Resources.play_smaller; stopButton.Enabled = false; playButton.Enabled = true; break; case GIFFileStatus.Status.SeekMoving: if (timer.Enabled) { timer.Stop(); } break; } }
private void seekbar_MouseDown(object sender, MouseEventArgs e) { oldStatus = gifFileStatus.status; ChangeStatus(GIFFileStatus.Status.SeekMoving); }