C# Class Smrf.AppLib.ColorPicker

Represents a user control that allows the user to pick a color.
The user control consists of a panel that displays the current color and a button that opens the standard ColorDialog for editing the color.

Use the Color property to set the initial color after the user control is created. If you are just displaying the color and don't want the user to edit it, set ShowButton to false to hide the button. A ColorChanged event is fired when the user edits the color. Read the Color property to get the edited color.

Inheritance: System.Windows.Forms.UserControl
Show file Open project: 2014-sed-team3/term-project

Public Methods

Method Description
ColorPicker ( ) : System

Initializes a new instance of the ColorPicker class.

Protected Methods

Method Description
ChangeColor ( ) : void
Dispose ( bool disposing ) : void

Clean up any resources being used.

Private Methods

Method Description
AssertValid ( ) : void
InitializeComponent ( ) : void

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

btnColor_Click ( object sender, System e ) : void
pnlColor_MouseDown ( object sender, MouseEventArgs e ) : void

Method Details

ChangeColor() protected method

protected ChangeColor ( ) : void
return void

ColorPicker() public method

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

Dispose() protected method

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool
return void