Paint.Gauge.Draw C# (CSharp) Method

Draw() public method

Draw the gauge.
public Draw ( bool refreshDisplay ) : void
refreshDisplay bool /// True = we should completely redraw the gauge /// False = we should just draw the regions that have changed since we last drew the gauge ///
return void
        public override void Draw(bool refreshDisplay)
        {
            if (refreshDisplay == true || this.PreviousMarker != this.CurrentMarker)
            {
                // Blank out everything
                this.DrawRectangle(this.Bounds, this.BackgroundColor);

                // Draw the gauge bar
                this.DrawRectangle(this.CreateGaugeRectangle(), this.GaugeColor);

                // Draw the marker
                this.DrawRectangle(this.CreateMarkerRectangle(), this.GaugeColor);

                this.PreviousMarker = this.CurrentMarker;
            }

            return;
        }