Exemple #1
0
        /// <summary>
        /// Initializes a new instance of the MainViewModel class.
        /// </summary>
        public NearStopsViewModel(ITanRestService restService, INavigationService navigationService)
        {
            _restService       = restService;
            _navigationService = navigationService;

            if (ViewModelBase.IsInDesignModeStatic)
            {
                this.NearStops = new ObservableCollection <TanArret>(restService.GetStopFromGeo(0, 0));
            }

            this.SelectionChangedCommand   = new RelayCommand(SelectionChanged);
            this.ForceTrackPositionCommand = new RelayCommand(TraskPosition);
        }
        /// <summary>
        /// Initializes a new instance of the StopDetailsViewModel class.
        /// </summary>
        public StopDetailsViewModel(IDataBaseService dbService, ITanRestService restService,
                                    INavigationService navigationService)
        {
            if (ViewModelBase.IsInDesignModeStatic)
            {
                StopName = "Egalité";
                TanId    = "EGLI";
            }

            _dbService         = dbService;
            _restService       = restService;
            _navigationService = navigationService;

            this.LineSelectionChangedCommand = new RelayCommand <Line>(e => SelectionChanged(e));
            this.GetNextDeparturesCommand    = new RelayCommand(GetNextDepartures);
        }