C# Class Geowigo.ViewModels.BaseViewModel

A base class for View models that deal with Wherigo objects.
Inheritance: System.Windows.DependencyObject
Afficher le fichier Open project: WFoundation/WF.Player.WinPhone Class Usage Examples

Méthodes publiques

Свойство Type Description
ApplicationBarProperty System.Windows.DependencyProperty
CartridgeProperty System.Windows.DependencyProperty
IsProgressBarVisibleProperty System.Windows.DependencyProperty
ProgressBarStatusTextProperty System.Windows.DependencyProperty
WherigoObjectProperty System.Windows.DependencyProperty

Méthodes publiques

Méthode Description
BaseViewModel ( ) : System
OnPageBackKeyPress ( CancelEventArgs e ) : void

Called by pages when the back key is pressed.

OnPageNavigatedTo ( System.Windows.Navigation.NavigationEventArgs e, NavigationContext navCtx ) : void

Called by pages when they are navigated to.

OnPageNavigatingFrom ( System.Windows.Navigation.NavigatingCancelEventArgs e, NavigationContext navctx ) : void

Called by the page when the navigation is leaving it.

Méthodes protégées

Méthode Description
InitFromNavigation ( NavigationInfo nav ) : void

Initializes the view model from the navigation context.

OnCoreGameStateChanged ( EngineGameState oldState, EngineGameState newState ) : void

Called when the state of the game engine has changed.

OnCorePropertyChanged ( string propName ) : void

Called when a property of the Wherigo Core has changed.

OnHasMessageBoxChanged ( bool hasMessageBox ) : void

Called when a non-native message box appears or disappears. This allows view models to adjust their layout, such as removing application bars.

The default implementation hides the application bar when a message box appears and shows it when a message box disappears.

OnModelChanged ( Models newModel ) : void

Called when the underlying model has changed.

OnModelChanging ( Models oldValue, Models newValue ) : void

Called when the underlying model is changing.

OnPageBackKeyPressOverride ( CancelEventArgs e ) : void

Called when an allowed back key pressed event has occured.

OnPageNavigatedBackToOverride ( ) : void

Called when the user navigated back to page.

OnWherigoObjectChanged ( WF.Player.Core.WherigoObject obj ) : void

Called when the associated Wherigo object has changed.

OnWherigoObjectPropertyChanged ( string propName ) : void

Called when a property of the associated Wherigo object has changed.

Private Methods

Méthode Description
Core_PropertyChanged ( object sender, PropertyChangedEventArgs e ) : void
InitFromNavigationInternal ( NavigationInfo nav ) : void
OnAppViewModelHasMessageBoxChanged ( object sender, EventArgs e ) : void
OnApplicationBarChanged ( IApplicationBar bar ) : void
OnApplicationBarPropertyChanged ( DependencyObject o, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnIsProgressBarVisibleChanged ( bool newValue ) : void
OnIsProgressBarVisiblePropertyChanged ( DependencyObject o, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnModelChangingInternal ( Models oldValue, Models newValue ) : void
OnWherigoObjectChangedInternal ( System.Windows.DependencyPropertyChangedEventArgs e ) : void
RefreshApplicationBarIsVisible ( bool hasMessageBox = null, bool isProgressBarVisible = null ) : void
WherigoObjectProperty_PropertyChanged ( DependencyObject o, System.Windows.DependencyPropertyChangedEventArgs e ) : void
WherigoObject_PropertyChanged ( object sender, System e ) : void

Method Details

BaseViewModel() public méthode

public BaseViewModel ( ) : System
Résultat System

InitFromNavigation() protected méthode

Initializes the view model from the navigation context.
protected InitFromNavigation ( NavigationInfo nav ) : void
nav NavigationInfo
Résultat void

OnCoreGameStateChanged() protected méthode

Called when the state of the game engine has changed.
protected OnCoreGameStateChanged ( EngineGameState oldState, EngineGameState newState ) : void
oldState EngineGameState State the engine had before the change occured.
newState EngineGameState State the engine has now.
Résultat void

OnCorePropertyChanged() protected méthode

Called when a property of the Wherigo Core has changed.
protected OnCorePropertyChanged ( string propName ) : void
propName string Property that has changed.
Résultat void

OnHasMessageBoxChanged() protected méthode

Called when a non-native message box appears or disappears. This allows view models to adjust their layout, such as removing application bars.
The default implementation hides the application bar when a message box appears and shows it when a message box disappears.
protected OnHasMessageBoxChanged ( bool hasMessageBox ) : void
hasMessageBox bool
Résultat void

OnModelChanged() protected méthode

Called when the underlying model has changed.
protected OnModelChanged ( Models newModel ) : void
newModel Models
Résultat void

OnModelChanging() protected méthode

Called when the underlying model is changing.
protected OnModelChanging ( Models oldValue, Models newValue ) : void
oldValue Models
newValue Models
Résultat void

OnPageBackKeyPress() public méthode

Called by pages when the back key is pressed.
public OnPageBackKeyPress ( CancelEventArgs e ) : void
e CancelEventArgs
Résultat void

OnPageBackKeyPressOverride() protected méthode

Called when an allowed back key pressed event has occured.
protected OnPageBackKeyPressOverride ( CancelEventArgs e ) : void
e CancelEventArgs
Résultat void

OnPageNavigatedBackToOverride() protected méthode

Called when the user navigated back to page.
protected OnPageNavigatedBackToOverride ( ) : void
Résultat void

OnPageNavigatedTo() public méthode

Called by pages when they are navigated to.
public OnPageNavigatedTo ( System.Windows.Navigation.NavigationEventArgs e, NavigationContext navCtx ) : void
e System.Windows.Navigation.NavigationEventArgs
navCtx NavigationContext
Résultat void

OnPageNavigatingFrom() public méthode

Called by the page when the navigation is leaving it.
public OnPageNavigatingFrom ( System.Windows.Navigation.NavigatingCancelEventArgs e, NavigationContext navctx ) : void
e System.Windows.Navigation.NavigatingCancelEventArgs
navctx NavigationContext
Résultat void

OnWherigoObjectChanged() protected méthode

Called when the associated Wherigo object has changed.
protected OnWherigoObjectChanged ( WF.Player.Core.WherigoObject obj ) : void
obj WF.Player.Core.WherigoObject
Résultat void

OnWherigoObjectPropertyChanged() protected méthode

Called when a property of the associated Wherigo object has changed.
protected OnWherigoObjectPropertyChanged ( string propName ) : void
propName string
Résultat void

Property Details

ApplicationBarProperty public_oe static_oe property

public static DependencyProperty,System.Windows ApplicationBarProperty
Résultat System.Windows.DependencyProperty

CartridgeProperty public_oe static_oe property

public static DependencyProperty,System.Windows CartridgeProperty
Résultat System.Windows.DependencyProperty

IsProgressBarVisibleProperty public_oe static_oe property

public static DependencyProperty,System.Windows IsProgressBarVisibleProperty
Résultat System.Windows.DependencyProperty

ProgressBarStatusTextProperty public_oe static_oe property

public static DependencyProperty,System.Windows ProgressBarStatusTextProperty
Résultat System.Windows.DependencyProperty

WherigoObjectProperty public_oe static_oe property

public static DependencyProperty,System.Windows WherigoObjectProperty
Résultat System.Windows.DependencyProperty