projects/wms-framework/src/lib/regionsframework/commands/ButtonBaseClickCommandBehavior.ts
The button base click command behavior
Properties |
Methods |
|
constructor(buttonObject: ButtonBaseModel)
|
||||||
Parameters :
|
command |
Type : ICommand
|
Inherited from
CommandBehaviorBase
|
Defined in
CommandBehaviorBase:30
|
commandParameter |
Type : any
|
Inherited from
CommandBehaviorBase
|
Defined in
CommandBehaviorBase:31
|
OnClick |
OnClick(object: any, e: any)
|
Handler for click associated to the target object
Returns :
void
|
Private CommandCanExecuteChanged |
CommandCanExecuteChanged(object: any, e: any)
|
Inherited from
CommandBehaviorBase
|
Defined in
CommandBehaviorBase:129
|
Handler for the command CanExecuteChanged event
Returns :
void
|
Protected ExecuteCommand |
ExecuteCommand()
|
Inherited from
CommandBehaviorBase
|
Defined in
CommandBehaviorBase:115
|
Executes the command
Returns :
void
|
UpdateEnabledState |
UpdateEnabledState()
|
Inherited from
CommandBehaviorBase
|
Defined in
CommandBehaviorBase:97
|
Updates the enable state of the target object
Returns :
void
|
import { ButtonBaseModel } from '../../models/controls/ButtonBaseModel';
import { CommandBehaviorBase } from './CommandBehaviorBase';
/**
* The button base click command behavior
*
* @export
* @class ButtonBaseClickCommandBehavior
* @extends {CommandBehaviorBase<ButtonBaseModel>}
* @wType Microsoft.Practices.Prism.Commands.ButtonBaseClickCommandBehavior
*/
export class ButtonBaseClickCommandBehavior extends CommandBehaviorBase<ButtonBaseModel> {
constructor(buttonObject: ButtonBaseModel) {
super(buttonObject);
if (buttonObject) {
buttonObject.Click.addHandler(this.OnClick, this);
}
}
/**
* Handler for click associated to the target object
*
* @param {*} object
* @param {*} e
* @memberof ButtonBaseClickCommandBehavior
* @wIgnore
*/
OnClick(object: any, e: any) {
this.ExecuteCommand();
}
}