private void TestGifButton_Click(object sender, EventArgs e) { GifTestTimer.Stop(); GifTestTimer.Interval = (int)Delay.Value; _beginIndex = ImageBeginIndex.Value; _endIndex = ImageEndIndex.Value; _imageIndex = _beginIndex; GifTestTimer.Start(); }
private void GifTestTimer_Tick(object sender, EventArgs e) { var index = Math.Max(0, Math.Min(_prevAmongusImage.Count - 1, _imageIndex)); pictureBox1.Image = _prevAmongusImage[index].Image; if (_imageIndex >= _endIndex) { GifTestTimer.Stop(); } _imageIndex++; }