public NearestAirportService(IGetCurrentLocation locationService)
        {
            _locationService = locationService;

            _airportsService = new AirportNamesService();
            Messenger.Default.Register(this, (FindNearestAirportMessage m) => FindNearestAirport());
        }
        public NearestAirportService(IGetCurrentLocation locationService)
        {
            _locationService = locationService;

            _airportsService = new AirportNamesService();
            Messenger.Default.Register(this, (FindNearestAirportMessage m) => FindNearestAirport());
        }
Exemplo n.º 3
0
        public NearestAirportService(IGeolocation locationService, ITinyMessengerHub messenger)
        {
            _locationService = locationService;
            _messenger       = messenger;

            _airportsService = new AirportNamesService();
            _messenger.Subscribe <FindNearestAirportMessage>(m => FindNearestAirport());
        }
Exemplo n.º 4
0
        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();
        }
Exemplo n.º 5
0
        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();
        }