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.
Afficher le fichier Open project: Chillisoft/habanero.faces Class Usage Examples

Private Properties

Свойство Type Description
BuildComboBoxList void
CalculateDates void
SetDateRangePairs void

Méthodes publiques

Méthode 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

Méthode 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 méthode

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
Résultat void

DateRangeComboBoxManager() public méthode

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
Résultat System

GetDateRangeString() public méthode

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

InitialiseValues() public méthode

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

RemoveDateOption() public méthode

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
Résultat void

SetDateRangeString() public méthode

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
Résultat void

SetTopComboBoxItem() public méthode

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

UseAllDateRangeOptions() public méthode

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