C# Class Habanero.Faces.Base.DateRangeComboBoxManager

This manager groups common logic for IDateRangeComboBox objects. Do not use this object in working code - rather call CreateDateRangeComboBox in the appropriate control factory.
ファイルを表示 Open project: Chillisoft/habanero.faces Class Usage Examples

Private Properties

Property Type Description
BuildComboBoxList void
CalculateDates void
SetDateRangePairs void

Public Methods

Method Description
AddDateOption ( DateRangeOptions option ) : void

Adds a date range option to the current list of options available

DateRangeComboBoxManager ( IComboBox comboBox ) : System

Constructor to initialise a new ComboBox with a selection of date range options that are suited to a timeless system

GetDateRangeString ( DateRangeOptions option ) : string

Returns the display string for the date range option supplied

InitialiseValues ( ) : void

Initialises the ComboBox with a list of values to display

RemoveDateOption ( DateRangeOptions option ) : void

Removes a date range option from the current list of options available

SetDateRangeString ( DateRangeOptions option, string newDisplayString ) : void

Amends the display string for a given date option

SetTopComboBoxItem ( string displayString ) : void

Sets the item in the ComboBox that first appears to the user

UseAllDateRangeOptions ( ) : void

Populates the ComboBox with all available DateOptions, since the default constructor only provides a standardised collection

Private Methods

Method Description
BuildComboBoxList ( ) : void

Populates the ComboBox with the current set of date options

CalculateDates ( ) : void

Calculates the start and end dates based on the currently selected ComboBox item

SetDateRangePairs ( ) : void

Creates a dictionary of enum and string pairs to define how each option is displayed and to recognise the appropriate option from the user's selection

Method Details

AddDateOption() public method

Adds a date range option to the current list of options available
public AddDateOption ( DateRangeOptions option ) : void
option DateRangeOptions The date range option to add
return void

DateRangeComboBoxManager() public method

Constructor to initialise a new ComboBox with a selection of date range options that are suited to a timeless system
public DateRangeComboBoxManager ( IComboBox comboBox ) : System
comboBox IComboBox The combobox to be managed
return System

GetDateRangeString() public method

Returns the display string for the date range option supplied
public GetDateRangeString ( DateRangeOptions option ) : string
option DateRangeOptions The date range enumeration
return string

InitialiseValues() public method

Initialises the ComboBox with a list of values to display
public InitialiseValues ( ) : void
return void

RemoveDateOption() public method

Removes a date range option from the current list of options available
public RemoveDateOption ( DateRangeOptions option ) : void
option DateRangeOptions The date range option to remove
return void

SetDateRangeString() public method

Amends the display string for a given date option
public SetDateRangeString ( DateRangeOptions option, string newDisplayString ) : void
option DateRangeOptions The date option to amend
newDisplayString string The display string to apply
return void

SetTopComboBoxItem() public method

Sets the item in the ComboBox that first appears to the user
public SetTopComboBoxItem ( string displayString ) : void
displayString string The string to display
return void

UseAllDateRangeOptions() public method

Populates the ComboBox with all available DateOptions, since the default constructor only provides a standardised collection
public UseAllDateRangeOptions ( ) : void
return void