C# Класс Paint.Gauge

Abstract Base class for all types of Guage
Наследование: ToolBoxToolTouchBase, IGauge
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
CurrentMarker float
GaugeColor Color
MarkerWidth int
PreviousMarker float

Открытые методы

Метод Описание
Draw ( bool refreshDisplay ) : void

Draw the gauge.

Gauge ( Color backgroundColor, IGraphicsDisplay graphicsDisplay, Rectangle bounds, int markerWidth, Color gaugeColor, float startMarker ) : System

Initializes a new instance of the Paint.Gauge class.

Защищенные методы

Метод Описание
CreateGaugeRectangle ( ) : Rectangle

Simply creates a rectangle that defines the location and size of the gauge

CreateMarkerRectangle ( ) : Rectangle

Creates a rectangle that defines the location and size of the marker

OnMarkerChanged ( EventArgs e ) : void

Raises the marker changed event.

Описание методов

CreateGaugeRectangle() защищенный абстрактный Метод

Simply creates a rectangle that defines the location and size of the gauge
protected abstract CreateGaugeRectangle ( ) : Rectangle
Результат Microsoft.Xna.Framework.Rectangle

CreateMarkerRectangle() защищенный абстрактный Метод

Creates a rectangle that defines the location and size of the marker
protected abstract CreateMarkerRectangle ( ) : Rectangle
Результат Microsoft.Xna.Framework.Rectangle

Draw() публичный Метод

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 ///
Результат void

Gauge() публичный Метод

Initializes a new instance of the Paint.Gauge class.
public Gauge ( Color backgroundColor, IGraphicsDisplay graphicsDisplay, Rectangle bounds, int markerWidth, Color gaugeColor, float startMarker ) : System
backgroundColor Color
graphicsDisplay IGraphicsDisplay
bounds Microsoft.Xna.Framework.Rectangle
markerWidth int
gaugeColor Color
startMarker float
Результат System

OnMarkerChanged() защищенный Метод

Raises the marker changed event.
protected OnMarkerChanged ( EventArgs e ) : void
e System.EventArgs /// Any relevant EventArgs - should be EventArgs.Empty ///
Результат void

Описание свойств

CurrentMarker защищенное свойство

The current position/value of the marker.
protected float CurrentMarker
Результат float

GaugeColor защищенное свойство

The color of the gauge.
protected Color GaugeColor
Результат Color

MarkerWidth защищенное свойство

The size of the marker.
protected int MarkerWidth
Результат int

PreviousMarker защищенное свойство

The previous position/value of the marker.
protected float PreviousMarker
Результат float