C# Class Btl.ViewModels.TimerViewModel

Inheritance: ViewModelBase
Mostra file Open project: barrylapthorn/countdown_timer

Public Methods

Method Description
TimerViewModel ( ) : System

Construct a new timer view model.

Private Methods

Method Description
AboutExecute ( ) : void

Executed when we want to switch to the about view

AddEventHandlers ( ) : void

Add the event handlers.

BindCommands ( ) : void
CanStartTimerExecute ( ) : bool

can we start the underlying timer?

CanStopTimerExecute ( ) : bool

Can the timer be stopped?

ConsumeMessage ( SimpleMessage message ) : void

Consume any messages that are passed between models

OnCompleted ( object sender, TimerModelEventArgs e ) : void

Fires where the timer completes.

OnReset ( object sender, TimerModelEventArgs e ) : void

Fires when the timer resets.

OnStarted ( object sender, TimerModelEventArgs e ) : void

Fires when the timer starts.

OnStopped ( object sender, TimerModelEventArgs e ) : void

Fires when the timer stops.

OnTick ( object sender, TimerModelEventArgs e ) : void

Fires when the timer ticks. Ticks out to be of the order of tenths of a second or so to prevent excessive spamming of this method.

ResetTimerExecute ( ) : void

Reset the timer and update corresponding values.

SettingsExecute ( ) : void

Executed when we want to switch to the settings view.

StartTimerExecute ( ) : void

Start the underlying timer

StopTimerExecute ( ) : void

Stop the underlying timer.

UpdateMembersFromSettings ( ) : void

Update the TimerViewModel values from the (user defined) settings.

UpdateTimer ( TimerModelEventArgs e ) : void

Update the timer view model properties based on the time span passed in.

UpdateTimerStatusColor ( TimerModelEventArgs e ) : void

Set the solid colour based on the timer status.

UpdateTimerValues ( ) : void

Update the timer view model properties based on the time span passed in.

Method Details

TimerViewModel() public method

Construct a new timer view model.
public TimerViewModel ( ) : System
return System