C# Class OS2Indberetning.ViewModel.GpsViewModel

Viewmodel of the GPS page. Handles all view logic
Inheritance: XLabs.Forms.Mvvm.ViewModel, INotifyPropertyChanged, IDisposable
Afficher le fichier Open project: os2indberetning/OS2_Windows_Phone

Méthodes publiques

Méthode Description
Dispose ( ) : void

Method that handles cleanup of the viewmodel

GpsIsAvailable ( ) : void

Method to do stuff when gps is not available

GpsNotAvailable ( ) : void

Method to do stuff when gps is not available

GpsViewModel ( ) : System

Constructor that handles initialization of the viewmodel

HandleAppearedMessage ( object sender ) : void

Method that handles the Appeared message

HandleFinishDriveMessage ( ) : void

Method that handles the FinishDrive message

HandleStopGpsMessage ( ) : void

Method that handles the StopGps message

HandleToggleGpsMessage ( ) : void

Method that handles the ToggleGps message

PauseDistanceTooBig ( double distance ) : void

Method that handles sending a PauseError

PositionChanged ( object sender, XLabs.Platform.Services.Geolocation.PositionEventArgs e ) : void

Method that handles change in positions from the gps signal

SetAccuracy ( double dist = null ) : void

Method to help with setting the correct text for Accuracy

SetupGps ( ) : void

Method that does the initial gps setup

TestForAvailibility ( ) : void

Method that checks for gps signal

TestGpsSignalTimer ( ) : void

Method that checks for gps signal when the gps in on pause The cause of this is to notify the user of gps signal even when he isnt tracking

Timer ( ) : void

Method that handles that tracks if gps signal have been missing for 30 seconds

Méthodes protégées

Méthode Description
OnPropertyChanged ( string propertyName ) : void

Private Methods

Méthode Description
CountDown ( ) : void

Method that does a countdown on the screen. Also makes sure the gps isnt tracked while countdown is active

HandleBackMessage ( ) : void

Method that handles the Back message

PositionError ( object sender, XLabs.Platform.Services.Geolocation.PositionErrorEventArgs e ) : void

Method that gets called when an error event is triggered in the locator

Subscribe ( ) : void

Method that handles subscribing to the needed messages

Unsubscribe ( ) : void

Method that handles unsubscribing

Method Details

Dispose() public méthode

Method that handles cleanup of the viewmodel
public Dispose ( ) : void
Résultat void

GpsIsAvailable() public méthode

Method to do stuff when gps is not available
public GpsIsAvailable ( ) : void
Résultat void

GpsNotAvailable() public méthode

Method to do stuff when gps is not available
public GpsNotAvailable ( ) : void
Résultat void

GpsViewModel() public méthode

Constructor that handles initialization of the viewmodel
public GpsViewModel ( ) : System
Résultat System

HandleAppearedMessage() public méthode

Method that handles the Appeared message
public HandleAppearedMessage ( object sender ) : void
sender object
Résultat void

HandleFinishDriveMessage() public méthode

Method that handles the FinishDrive message
public HandleFinishDriveMessage ( ) : void
Résultat void

HandleStopGpsMessage() public méthode

Method that handles the StopGps message
public HandleStopGpsMessage ( ) : void
Résultat void

HandleToggleGpsMessage() public méthode

Method that handles the ToggleGps message
public HandleToggleGpsMessage ( ) : void
Résultat void

OnPropertyChanged() protected méthode

protected OnPropertyChanged ( string propertyName ) : void
propertyName string
Résultat void

PauseDistanceTooBig() public méthode

Method that handles sending a PauseError
public PauseDistanceTooBig ( double distance ) : void
distance double
Résultat void

PositionChanged() public méthode

Method that handles change in positions from the gps signal
public PositionChanged ( object sender, XLabs.Platform.Services.Geolocation.PositionEventArgs e ) : void
sender object
e XLabs.Platform.Services.Geolocation.PositionEventArgs
Résultat void

SetAccuracy() public méthode

Method to help with setting the correct text for Accuracy
public SetAccuracy ( double dist = null ) : void
dist double
Résultat void

SetupGps() public méthode

Method that does the initial gps setup
public SetupGps ( ) : void
Résultat void

TestForAvailibility() public méthode

Method that checks for gps signal
public TestForAvailibility ( ) : void
Résultat void

TestGpsSignalTimer() public méthode

Method that checks for gps signal when the gps in on pause The cause of this is to notify the user of gps signal even when he isnt tracking
public TestGpsSignalTimer ( ) : void
Résultat void

Timer() public méthode

Method that handles that tracks if gps signal have been missing for 30 seconds
public Timer ( ) : void
Résultat void