C# Class Habanero.Faces.Win.ControlMapperStrategyWin

Provides a set of behaviour strategies that can be applied to a control depending on the environment
Inheritance: IControlMapperStrategy
显示文件 Open project: Chillisoft/habanero.faces Class Usage Examples

Public Methods

Method Description
AddCurrentBOPropHandlers ( ControlMapper mapper, IBOProp boProp ) : void

Adds handlers to events of a current business object property.

AddKeyPressEventHandler ( IControlHabanero control ) : void

Handles the default key press behaviours on a control. This is typically used to change the handling of the enter key (such as having the enter key cause focus to move to the next control).

RemoveCurrentBOPropHandlers ( ControlMapper mapper, IBOProp boProp ) : void

Removes handlers to events of a current business object property. It is essential that if the AddCurrentBoPropHandlers is implemented then this is implemented such that editing a business object that is no longer being shown on the control does not does not update the value in the control.

Protected Methods

Method Description
CtlKeyUpHandler ( object sender, KeyEventArgs e ) : void

A handler to deal with the case where a key has been released. If the key is an Enter key, focus moves to the next item in the tab order.

This has been made protected for the purposes of testing. Since the event based testing using NUnitForms does not work on our build server. This method should not be used in normal production code.

GetFirstControl ( Control parentControl, Control control ) : Control

Provides the first control in the tab order on a control

GetNextControlInTabOrder ( Control parentControl, Control control ) : Control

Provides the next item in the tab order on a control

Private Methods

Method Description
CtlKeyDownHandler ( object sender, KeyEventArgs e ) : void

A handler to deal with the case where a key is down.

CtlKeyPressHandler ( object sender, System e ) : void

A handler to deal with the case where a key has been pressed.

GetNextControl ( Control parentControl, Control control ) : Control
GetPreviousControl ( Control parentControl, Control currentControl ) : Control
IsMultiLineTextBox ( ) : bool
SetFocusOnNextControl ( ) : void

Method Details

AddCurrentBOPropHandlers() public method

Adds handlers to events of a current business object property.
public AddCurrentBOPropHandlers ( ControlMapper mapper, IBOProp boProp ) : void
mapper Habanero.Faces.Base.ControlMapper The control mapper that maps the business object property to the control
boProp IBOProp The business object property being mapped to the control
return void

AddKeyPressEventHandler() public method

Handles the default key press behaviours on a control. This is typically used to change the handling of the enter key (such as having the enter key cause focus to move to the next control).
public AddKeyPressEventHandler ( IControlHabanero control ) : void
control IControlHabanero The control whose events will be handled
return void

CtlKeyUpHandler() protected method

A handler to deal with the case where a key has been released. If the key is an Enter key, focus moves to the next item in the tab order.
This has been made protected for the purposes of testing. Since the event based testing using NUnitForms does not work on our build server. This method should not be used in normal production code.
protected CtlKeyUpHandler ( object sender, KeyEventArgs e ) : void
sender object The object that notified of the event
e System.Windows.Forms.KeyEventArgs Attached arguments regarding the event
return void

GetFirstControl() protected static method

Provides the first control in the tab order on a control
protected static GetFirstControl ( Control parentControl, Control control ) : Control
parentControl System.Windows.Forms.Control The parent of the controls in question
control System.Windows.Forms.Control The current control
return System.Windows.Forms.Control

GetNextControlInTabOrder() protected static method

Provides the next item in the tab order on a control
protected static GetNextControlInTabOrder ( Control parentControl, Control control ) : Control
parentControl System.Windows.Forms.Control The parent of the controls in question
control System.Windows.Forms.Control The current control
return System.Windows.Forms.Control

RemoveCurrentBOPropHandlers() public method

Removes handlers to events of a current business object property. It is essential that if the AddCurrentBoPropHandlers is implemented then this is implemented such that editing a business object that is no longer being shown on the control does not does not update the value in the control.
public RemoveCurrentBOPropHandlers ( ControlMapper mapper, IBOProp boProp ) : void
mapper Habanero.Faces.Base.ControlMapper The control mapper that maps the business object property to the control
boProp IBOProp The business object property being mapped to the control
return void