C# Класс RoverOperator.Content.GPSViewViewModel

Наследование: INotifyPropertyChanged
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
_addTargetCommand RelayCommand
_removeTargetCommand RelayCommand
canAddTarget bool
map MarsRover.Map

Открытые методы

Метод Описание
GPSViewViewModel ( Dispatcher d ) : System
targetPin_MouseRightButtonUp ( object sender, System.Windows.Input.MouseButtonEventArgs e ) : void

Right click event to remove target (best way to do this even though using commands seems to be more elegant)

updateTargetDetails ( ) : void

Updates the information in the details view

Защищенные методы

Метод Описание
OnPropertyChanged ( string name ) : void

Приватные методы

Метод Описание
ExecuteAddTargetCommand ( ) : void

Add the target pin to target list

ExecuteRemoveTargetCommand ( ) : void

(DEPRECATED) Remove the target pin to target list

RefreshMap ( ) : void

Force map refresh when the rover pin gets updated.

UpdateGPS ( GPSCoordinates gpsCoordinates ) : void
addTarget ( MarsRover.Location targetLocation ) : void

Add a target to the map (triggered by Add button)

degreesToRadians ( double degrees ) : double

Convert degrees to radians

determineCanAddTarget ( ) : void

Decide whether or not to allow the command to execute

formatRoverPin ( ) : void

Change the style of the rover pin

formatTargetPin ( Pushpin targetPin ) : void

Change the style of the target pins

getDistance ( MarsRover.Location location1, MarsRover.Location location2 ) : double

Get distance in kilometers between two locations

removeTarget ( Pushpin targetToRemove ) : void

Remove target from map (triggered by right clocking on a pushpin)

setRoverPinLocation ( ) : void

(DEPRECATED) Binds the rover location data being sent by StatusUpdater to PushPin on the Map

updateRoverLocation ( ) : void

Update location of rover pin (triggered by the update of rovercoordinates

validateCoordinateString ( string coordinateString, double &coordinate ) : bool

Data validation on user entered coordinates

Описание методов

GPSViewViewModel() публичный Метод

public GPSViewViewModel ( Dispatcher d ) : System
d System.Windows.Threading.Dispatcher
Результат System

OnPropertyChanged() защищенный Метод

protected OnPropertyChanged ( string name ) : void
name string
Результат void

targetPin_MouseRightButtonUp() публичный Метод

Right click event to remove target (best way to do this even though using commands seems to be more elegant)
public targetPin_MouseRightButtonUp ( object sender, System.Windows.Input.MouseButtonEventArgs e ) : void
sender object
e System.Windows.Input.MouseButtonEventArgs
Результат void

updateTargetDetails() публичный Метод

Updates the information in the details view
public updateTargetDetails ( ) : void
Результат void

Описание свойств

_addTargetCommand публичное свойство

public RelayCommand _addTargetCommand
Результат RelayCommand

_removeTargetCommand публичное свойство

public RelayCommand _removeTargetCommand
Результат RelayCommand

canAddTarget публичное свойство

public bool canAddTarget
Результат bool

map публичное свойство

public Map,MarsRover map
Результат MarsRover.Map