public NearestAirportService(IGetCurrentLocation locationService) { _locationService = locationService; _airportsService = new AirportNamesService(); Messenger.Default.Register(this, (FindNearestAirportMessage m) => FindNearestAirport()); }
public NearestAirportService(IGeolocation locationService, ITinyMessengerHub messenger) { _locationService = locationService; _messenger = messenger; _airportsService = new AirportNamesService(); _messenger.Subscribe <FindNearestAirportMessage>(m => FindNearestAirport()); }
public AirportsViewModel(IGetAirports airportsService, IStoreObjects objectStore) { _objectStore = objectStore; Airports = new ObservableCollection<Airport>(); Airports.Add(Airport.Nearest); Airports.AddRange(airportsService.GetNorwegianAirports()); SaveCommand = new RelayCommand(OnSave); LoadSelectedAirportFromDisk(); }
public AirportsViewModel(IGetAirports airportsService, IStoreObjects objectStore) { _objectStore = objectStore; Airports = new ObservableCollection <Airport>(); Airports.Add(Airport.Nearest); Airports.AddRange(airportsService.GetNorwegianAirports()); SaveCommand = new RelayCommand(OnSave); LoadSelectedAirportFromDisk(); }