/// <summary> /// Changes the current displayed frame /// </summary> /// <param name="newFrame">The new frame to display</param> public void ChangeFrame(int newFrame) { if (_currentAnimation == null || _currentAnimation.FrameCount == 0) { return; } _currentFrame = newFrame; lbl_currentFrame.Text = "" + (newFrame + 1); _frameBitmap?.Dispose(); _frameBitmap = _currentAnimation.GetComposedBitmapForFrame(newFrame); pnl_preview.Image = _frameBitmap; }