Paint.PlaybackProgressBar.Draw C# (CSharp) Method

Draw() public method

public Draw ( bool refreshDisplay ) : void
refreshDisplay bool
return void
        public void Draw(bool refreshDisplay)
        {
            if (refreshDisplay || this.Percentage != this.previousPercentage)
            {
                this.graphicsDisplay.DrawGraphic(ImageType.ProgressBarLeft, this.boundsLeftImage, this.playbackProgressBarDefinition.BackgroundColor);
                this.graphicsDisplay.DrawGraphic(ImageType.ProgressBarMiddle, this.boundsMiddleImage, this.playbackProgressBarDefinition.BackgroundColor);
                this.graphicsDisplay.DrawGraphic(ImageType.ProgressBarRight, this.boundsRightImage, this.playbackProgressBarDefinition.BackgroundColor);

                this.graphicsDisplay.DrawGraphic(ImageType.EmptySquare, this.boundsProgressIndicator, this.playbackProgressBarDefinition.BackgroundColor);

                var boundsIndicatorPercentage = new Rectangle(
                    this.boundsProgressIndicator.X,
                    this.boundsProgressIndicator.Y,
                    (int) (this.boundsProgressIndicator.Width * (this.Percentage / 100f)),
                    this.boundsProgressIndicator.Height);

                this.graphicsDisplay.DrawGraphic(ImageType.EmptySquare, boundsIndicatorPercentage, this.playbackProgressBarDefinition.ProgressIndicatorColor);

                this.previousPercentage = this.Percentage;
            }
        }
PlaybackProgressBar