C# Class entity.MetaEditor2.ColorWheel

ファイルを表示 Open project: troymac1ure/Entity Class Usage Examples

Public Properties

Property Type Description
EntName string
LineNumber int
Value object
alphaText System.Windows.Forms.TextBox
blueText System.Windows.Forms.TextBox
chunkOffset int
color ColorHandler.RGB
greenText System.Windows.Forms.TextBox
offsetInMap int
redText System.Windows.Forms.TextBox

Public Methods

Method Description
ColorWheel ( ) : System

Initializes a new instance of the ColorWheel class.

ColorWheel ( int r, int g, int b ) : System

Initializes a new instance of the ColorWheel class.

checkForColor ( string name, DataValues cntl, string search1, string search2 ) : bool

The check for color.

setTextBox ( TextBox tb, Color col ) : void

The set text box.

updateBar ( ) : void

The update bar.

updateBox ( ) : void

The update box.

Protected Methods

Method Description
OnColorChanged ( ) : void
OnLoad ( EventArgs e ) : void
OnMouseDown ( MouseEventArgs e ) : void
OnMouseMove ( MouseEventArgs e ) : void
OnMouseUp ( MouseEventArgs e ) : void
OnPaint ( PaintEventArgs e ) : void
OnResize ( EventArgs e ) : void

Private Methods

Method Description
ComputeDiameter ( Size size ) : float
ComputeRadius ( Size size ) : float
Control_LostFocus ( object sender, EventArgs e ) : void

The control_ lost focus.

Control_TextChanged ( object sender, EventArgs e ) : void

Called when a (ARGB) textbox is changed. Starts a timer, then updates the colorwheel after the timer expires (allowing for typing)

DrawBar ( Graphics g, int width, int height ) : void

The draw bar.

DrawWheel ( Graphics g, int width, int height ) : void

The draw wheel.

GetCirclePoints ( float r, PointF center ) : System.Drawing.PointF[]

The get circle points.

GetColors ( ) : Color[]

The get colors.

GrabColor ( object sender, Point mouseXY ) : void
InitRenderSurface ( ) : void

The init render surface.

InitRendering ( ) : void

The init rendering.

InitializeComponent ( ) : void

Required method for Designer support - do not modify the contents of this method with the code editor.

SphericalToCartesian ( float r, float theta ) : PointF

The spherical to cartesian.

brightnessPictureBox_Paint ( object sender, PaintEventArgs e ) : void
timer1_Tick ( object sender, EventArgs e ) : void

The timer is used to control the color wheel update from the text boxes. If we update instantly, we are unable to type, therefore allow a delay for typing

wheelPictureBox_Click ( object sender, System e ) : void
wheelPictureBox_MouseDown ( object sender, System e ) : void
wheelPictureBox_MouseMove ( object sender, System e ) : void
wheelPictureBox_MouseUp ( object sender, System e ) : void
wheelPictureBox_Paint ( object sender, System e ) : void

Method Details

ColorWheel() public method

Initializes a new instance of the ColorWheel class.
public ColorWheel ( ) : System
return System

ColorWheel() public method

Initializes a new instance of the ColorWheel class.
public ColorWheel ( int r, int g, int b ) : System
r int /// The r. ///
g int /// The g. ///
b int /// The b. ///
return System

OnColorChanged() protected method

protected OnColorChanged ( ) : void
return void

OnLoad() protected method

protected OnLoad ( EventArgs e ) : void
e System.EventArgs
return void

OnMouseDown() protected method

protected OnMouseDown ( MouseEventArgs e ) : void
e MouseEventArgs
return void

OnMouseMove() protected method

protected OnMouseMove ( MouseEventArgs e ) : void
e MouseEventArgs
return void

OnMouseUp() protected method

protected OnMouseUp ( MouseEventArgs e ) : void
e MouseEventArgs
return void

OnPaint() protected method

protected OnPaint ( PaintEventArgs e ) : void
e PaintEventArgs
return void

OnResize() protected method

protected OnResize ( EventArgs e ) : void
e System.EventArgs
return void

checkForColor() public static method

The check for color.
public static checkForColor ( string name, DataValues cntl, string search1, string search2 ) : bool
name string /// The name. ///
cntl DataValues /// The cntl. ///
search1 string /// The search 1. ///
search2 string /// The search 2. ///
return bool

setTextBox() public method

The set text box.
public setTextBox ( TextBox tb, Color col ) : void
tb System.Windows.Forms.TextBox /// The tb. ///
col Color /// The col. ///
return void

updateBar() public method

The update bar.
public updateBar ( ) : void
return void

updateBox() public method

The update box.
public updateBox ( ) : void
return void

Property Details

EntName public_oe property

The ent name.
public string EntName
return string

LineNumber public_oe property

The line number.
public int LineNumber
return int

Value public_oe property

The value.
public object Value
return object

alphaText public_oe property

The alpha text.
public TextBox,System.Windows.Forms alphaText
return System.Windows.Forms.TextBox

blueText public_oe property

The blue text.
public TextBox,System.Windows.Forms blueText
return System.Windows.Forms.TextBox

chunkOffset public_oe property

The chunk offset.
public int chunkOffset
return int

color public_oe property

The color.
public ColorHandler.RGB,entity.MetaEditor2 color
return ColorHandler.RGB

greenText public_oe property

The green text.
public TextBox,System.Windows.Forms greenText
return System.Windows.Forms.TextBox

offsetInMap public_oe property

The offset in map.
public int offsetInMap
return int

redText public_oe property

The red text.
public TextBox,System.Windows.Forms redText
return System.Windows.Forms.TextBox