Esempio n. 1
0
        public DepartureViewModel(INavigationService navigationService, ConnectionQueryViewModel queryVM)
        {
            this.IsDataConnectionAvailable = true;

            DateTimeField = DateTime.Now;
            this.navigationService = navigationService;
            this.queryVM = queryVM;
            this.Departures = new ObservableCollection<DepartureResultViewModel>();
        }
Esempio n. 2
0
        public SearchViewModel(INavigationService navigationService, ConnectionQueryViewModel queryVM)
        {
            //DepartureField = "Anton-Bruckner-Str., Erlangen";
            //_departureId = 3003357;

            //ArrivalField = "Nürnberg, Gostenhof";
            //_arrivalId = 3000703;

            DateTimeField = DateTime.Now;

            this.navigationService = navigationService;
            this.queryVM = queryVM;
            efa = EfaRequest.Instance;
        }
Esempio n. 3
0
        public StationsViewModel(INavigationService navigationService, ConnectionQueryViewModel queryVM)
        {
            NearbyProgressBarVisibility = Visibility.Collapsed;
            SearchProgressBarVisibility = Visibility.Collapsed;

            NearbyStations = new ObservableCollection<ItemViewModel>();
            FoundStations = new ObservableCollection<ItemViewModel>();

            FavoriteStations = new ObservableCollection<ItemViewModel>();
            FavoriteStations.Add(new ItemViewModel { City = "Erlangen", StationName = "Anton-Bruckner-Str.", Location = new Location(LocationType.STATION, 3003357) });
            FavoriteStations.Add(new ItemViewModel { City = "Erlangen", StationName = "Schenkstr.", Location = new Location(LocationType.STATION, 3003373) });
            FavoriteStations.Add(new ItemViewModel { City = "Erlangen", StationName = "St. Johann", Location = new Location(LocationType.STATION, 3003859) });
            FavoriteStations.Add(new ItemViewModel { City = "Fürth", StationName = "Hauptbahnhof", Location = new Location(LocationType.STATION, 3002110) });
            FavoriteStations.Add(new ItemViewModel { City = "Nürnberg", StationName = "Gostenhof", Location = new Location(LocationType.STATION, 3000703) });
            FavoriteStations.Add(new ItemViewModel { City = "Nürnberg", StationName = "Plärrer", Location = new Location(LocationType.STATION, 3003859) });

            this.navigationService = navigationService;
            this.queryVM = queryVM;

            efaRequest = EfaRequest.Instance;
            efaRequest.ResolveAdressCompleted += new EventHandler<ResolveAddressCompletedEventArgs>(Request_ResolveAdressCompleted);
            efaRequest.SearchNearbyLocationsCompleted += new EventHandler<SearchLocationsCompletedEventArgs>(Request_SearchNearbyLocationsCompleted);
            //efaRequest.LocationRetrievalFailed += new EventHandler<LocationRetrievalFailedEventArgs>(Request_LocationRetrievalFailed);
        }