C# Class Habanero.Faces.Base.WizardController

Controls the behaviour of a wizard, which guides users through a process one step at a time. Implementsts the IWizardController
Inheritance: IWizardController
Show file Open project: Chillisoft/habanero.faces Class Usage Examples

Public Methods

Method Description
AddStep ( IWizardStep step ) : void

Adds a step to the Wizard. These are added in order. To add items out of order use the WizardSteps property.

CanCancel ( ) : bool

Can the Wizard Controller be cancelled in its current state. I.e. can all changes made by the Wizard to date be cancelled.

CanFinish ( ) : bool

Can the user select finish from when the wizard controller is in the current state.

CanMoveBack ( ) : bool

Checks if the Wizard Can proceed to the next step. Calls through to the IWizardStep.CanMoveBack

CanMoveOn ( string &message ) : bool

Checks if the Wizard can proceed to the next step. Calls through to the CanMoveOn method of the current IWizardStep.

CancelWizard ( ) : void

This provides a method which is called when the wizard is cancelled. The wizard controller can undo any changes that have occured up until that point so as to ensure that the objects are returned to their original state.

CompleteCurrentStep ( ) : void

Does any actions involved in the current wizard step when you move on to the next wizard step. E.g. Updates any Objects from User interface controls.

Finish ( ) : void

Method that is to be run when the Wizard is finished. This method should be overridden to do all persistance that is required. This raises the WizardFinished event which allows you to close forms or do anything else required.

GetCurrentStep ( ) : IWizardStep

Returns the step that the Wizard is currently on.

GetFirstStep ( ) : IWizardStep

Returns the First Step of the Wizard and sets the current step to that step.

GetNextStep ( ) : IWizardStep

Returns the next step in the Wizard and sets the current step to that step.

GetPreviousStep ( ) : IWizardStep

Returns the Previous Step and sets the step pointer to that step.

IsFirstStep ( ) : bool

Checks if the current Step is the first step.

IsLastStep ( ) : bool

Checks if the current step is the last step.

UndoCompleteCurrentStep ( ) : void

Undoes any actions that have been done by the current step when you move back to the previous step. It does this by calling the wizard step moveback

WizardController ( ) : System

Initiliases the Wizard. When the Wizard is created there is no current step, the first call to GetNextStep() will move to the first step.

Private Methods

Method Description
CheckWizardStep ( ) : void
FireWizardFinishedEvent ( ) : void

Method Details

AddStep() public method

Adds a step to the Wizard. These are added in order. To add items out of order use the WizardSteps property.
public AddStep ( IWizardStep step ) : void
step IWizardStep The IWizardStep to add.
return void

CanCancel() public method

Can the Wizard Controller be cancelled in its current state. I.e. can all changes made by the Wizard to date be cancelled.
public CanCancel ( ) : bool
return bool

CanFinish() public method

Can the user select finish from when the wizard controller is in the current state.
public CanFinish ( ) : bool
return bool

CanMoveBack() public method

Checks if the Wizard Can proceed to the next step. Calls through to the IWizardStep.CanMoveBack
public CanMoveBack ( ) : bool
return bool

CanMoveOn() public method

Checks if the Wizard can proceed to the next step. Calls through to the CanMoveOn method of the current IWizardStep.
public CanMoveOn ( string &message ) : bool
message string Describes why the Wizard cannot move on. Only applicable if CanMoveOn returns false.
return bool

CancelWizard() public method

This provides a method which is called when the wizard is cancelled. The wizard controller can undo any changes that have occured up until that point so as to ensure that the objects are returned to their original state.
public CancelWizard ( ) : void
return void

CompleteCurrentStep() public method

Does any actions involved in the current wizard step when you move on to the next wizard step. E.g. Updates any Objects from User interface controls.
public CompleteCurrentStep ( ) : void
return void

Finish() public method

Method that is to be run when the Wizard is finished. This method should be overridden to do all persistance that is required. This raises the WizardFinished event which allows you to close forms or do anything else required.
public Finish ( ) : void
return void

GetCurrentStep() public method

Returns the step that the Wizard is currently on.
public GetCurrentStep ( ) : IWizardStep
return IWizardStep

GetFirstStep() public method

Returns the First Step of the Wizard and sets the current step to that step.
public GetFirstStep ( ) : IWizardStep
return IWizardStep

GetNextStep() public method

Returns the next step in the Wizard and sets the current step to that step.
Thrown if the current step is the last step.
public GetNextStep ( ) : IWizardStep
return IWizardStep

GetPreviousStep() public method

Returns the Previous Step and sets the step pointer to that step.
Thrown if the current step is the first step.
public GetPreviousStep ( ) : IWizardStep
return IWizardStep

IsFirstStep() public method

Checks if the current Step is the first step.
public IsFirstStep ( ) : bool
return bool

IsLastStep() public method

Checks if the current step is the last step.
public IsLastStep ( ) : bool
return bool

UndoCompleteCurrentStep() public method

Undoes any actions that have been done by the current step when you move back to the previous step. It does this by calling the wizard step moveback
public UndoCompleteCurrentStep ( ) : void
return void

WizardController() public method

Initiliases the Wizard. When the Wizard is created there is no current step, the first call to GetNextStep() will move to the first step.
public WizardController ( ) : System
return System