C# Class Habanero.Faces.Win.DateTimePickerUtilWinTemp

Gets and sets date-time values in any given date-time picker
Show file Open project: Chillisoft/habanero.faces Class Usage Examples

Public Methods

Method Description
AddValueChangedHandler ( Control dateTimePicker, EventHandler eventHandler ) : void

Adds a ValueChanged handler for the date-time picker

GetValue ( Control dateTimePicker ) : object

Gets a date-time value from the provided picker

RemoveValueChangedHandler ( Control dateTimePicker, EventHandler eventHandler ) : void

Removes a ValueChanged handler for the date-time picker

SetCustomFormat ( Control dateTimePicker, string customFormat ) : void

Specify the custom format for the given date-time picker

SetShowUpDown ( Control dateTimePicker, bool showUpDown ) : void

Specify the time format in the given date-time picker

SetTimeFormat ( Control dateTimePicker ) : void

Specify the time format in the given date-time picker

SetValue ( Control dateTimePicker, System.DateTime date ) : void

Sets the date-time value in the specified date-time picker

SetValue ( Control dateTimePicker, object dateValue ) : void

Sets the date-time value in the specified date-time picker

SetValue ( Control dateTimePicker, string dateString ) : void

Sets the date-time value in the specified date-time picker

Method Details

AddValueChangedHandler() public static method

Adds a ValueChanged handler for the date-time picker
public static AddValueChangedHandler ( Control dateTimePicker, EventHandler eventHandler ) : void
dateTimePicker System.Windows.Forms.Control The date-time picker
eventHandler EventHandler The Handler to add
return void

GetValue() public static method

Gets a date-time value from the provided picker
public static GetValue ( Control dateTimePicker ) : object
dateTimePicker System.Windows.Forms.Control A date-time picker
return object

RemoveValueChangedHandler() public static method

Removes a ValueChanged handler for the date-time picker
public static RemoveValueChangedHandler ( Control dateTimePicker, EventHandler eventHandler ) : void
dateTimePicker System.Windows.Forms.Control The date-time picker
eventHandler EventHandler The Handler to remove
return void

SetCustomFormat() public static method

Specify the custom format for the given date-time picker
public static SetCustomFormat ( Control dateTimePicker, string customFormat ) : void
dateTimePicker System.Windows.Forms.Control The date-time picker
customFormat string The custom format to set for the date-time picker
return void

SetShowUpDown() public static method

Specify the time format in the given date-time picker
public static SetShowUpDown ( Control dateTimePicker, bool showUpDown ) : void
dateTimePicker System.Windows.Forms.Control The date-time picker
showUpDown bool Specifies if the Up/Down control must be shown or not
return void

SetTimeFormat() public static method

Specify the time format in the given date-time picker
public static SetTimeFormat ( Control dateTimePicker ) : void
dateTimePicker System.Windows.Forms.Control The date-time picker
return void

SetValue() public static method

Sets the date-time value in the specified date-time picker
public static SetValue ( Control dateTimePicker, System.DateTime date ) : void
dateTimePicker System.Windows.Forms.Control The date-time picker
date System.DateTime The date to set to
return void

SetValue() public static method

Sets the date-time value in the specified date-time picker
Thrown if the date value is neither /// a string nor a DateTime object
public static SetValue ( Control dateTimePicker, object dateValue ) : void
dateTimePicker System.Windows.Forms.Control The date-time picker
dateValue object The date value as either a string or as /// a DateTime object
return void

SetValue() public static method

Sets the date-time value in the specified date-time picker
public static SetValue ( Control dateTimePicker, string dateString ) : void
dateTimePicker System.Windows.Forms.Control The date-time picker
dateString string The date value as a string
return void