ScreenToGif.Modern.PlayPreview C# (CSharp) Method

PlayPreview() private method

private PlayPreview ( ) : void
return void
        private void PlayPreview()
        {
            if (_timerPlayPreview.Enabled)
            {
                _timerPlayPreview.Tick -= timerPlayPreview_Tick;
                _timerPlayPreview.Stop();

                lblDelay.Visible = true;
                trackBar.Value = _actualFrame;
                trackBar.Visible = true;
                this.Text = Resources.Title_EditorFrame + trackBar.Value + " - " + (_listFramesEdit.Count - 1);
                btnPreview.Text = Resources.Con_PlayPreview;
                btnPreview.Image = Resources.Play_17Green;

                DelayUpdate();
            }
            else
            {
                lblDelay.Visible = false;
                this.Text = String.Format("Screen To Gif - {0}", Resources.Title_PlayingAnimation);
                btnPreview.Text = Resources.Con_StopPreview;
                btnPreview.Image = Resources.Stop_17Red;
                _actualFrame = trackBar.Value;

                #region Starts playing the next frame

                if (_listFramesEdit.Count - 1 == _actualFrame)
                {
                    _actualFrame = 0;
                }
                else
                {
                    _actualFrame++;
                }

                #endregion

                _timerPlayPreview.Tick += timerPlayPreview_Tick;
                _timerPlayPreview.Start();

                trackBar.Visible = false;
            }
        }
Modern