public MainViewModel() { gpsService = DependencyService.Get <IGpsService>(); getGPSPositionCommand = ReactiveCommand.CreateFromTask(GetPositionAsync); getWeatherCommand = ReactiveCommand.CreateFromTask(GetWeatherAsync); getWeatherCommand.IsExecuting.ToProperty(this, vm => vm.IsLoading, out isLoading); }
/// <summary> /// Starts the training /// </summary> /// <param name="enduranceDataService">Service to communicate with the peripheral.</param> /// <param name="gpsService">Service to get GPS coordinates from the environment.</param> public void Start(EnduranceDataService enduranceDataService, IGpsService gpsService) { cancellation = new CancellationTokenSource(); Task.Factory.StartNew(() => { laps = new List <Lap>(); heartRate = new HeartRate(); enduranceDataService.StartActivitiy(); gpsService.StartTracking(); while (!cancellation.Token.IsCancellationRequested) { Thread.Sleep(trainingsReadIntervalMs); var nextLapDto = enduranceDataService.GetNextRawLap(); var nextHeartRate = enduranceDataService.GetHeartRate(); var lap = new Lap(nextLapDto.LapDistance, nextLapDto.LapTime); laps.Add(lap); heartRate = heartRate.AddPulses(nextHeartRate.Select(h => (h.Item1, h.Item2.Pulse)).ToList()); } enduranceDataService.StopActivity(); gpsService.StopTracking(); gpsCoordinates = gpsService.GetCoordinates().Select(c => new GpsCoordinate(c.Item1, c.Item2)).ToList(); } ); }
public SafetyCheckService(Repositories.IRepositories repositories, IGatewayQueuedService gatewayQueuedService, IGpsService gpsService, IInfoService infoService) { _repositories = repositories; _gatewayQueuedService = gatewayQueuedService; _gpsService = gpsService; _infoService = infoService; }
public MobileDispatchController(IDispatchService dispatchService, ITrailerService trailerService, IGpsService gpsService, IBasicSettingService basicSettingService) { this._dispatchService = dispatchService; this._trailerService = trailerService; this._gpsService = gpsService; this._basicSettingService = basicSettingService; }
public CrawlerApp(IRioBusRepository riobusRepository, ILineService lineService, IUnitOfWork work, IModalService modalService, IGpsService gpsService, IItineraryService itineraryService, IDataRioRepository datarioRepository) { _riobusRepository = riobusRepository; _lineService = lineService; _work = work; _modalService = modalService; _gpsService = gpsService; _itineraryService = itineraryService; _datarioRepository = datarioRepository; }
public DataChunkService( Repositories.IRepositories repositories, IGatewayQueuedService gatewayQueuedService, IGpsService gpsService, ILoggingService loggingService) { _repositories = repositories; _gatewayQueuedService = gatewayQueuedService; _gpsService = gpsService; _loggingService = loggingService; }
public MainPageViewModel(INavigationService navigationService, IAnalyticsService analyticsService, IAppPropertiesService appPropertiesService, IGpsService gpsService) : base(navigationService, analyticsService, appPropertiesService) { _gpsService = gpsService ?? DependencyService.Get <IGpsService>(); //_toolbarItemCommand = ReactiveCommand.Create(LogoutToolbarCommand); _navigateToPlaceSearchbarCommand = ReactiveCommand.CreateFromTask(NavigateToPlaceSearchbarAsync); _navigateToMoviesCommand = ReactiveCommand.CreateFromTask(NavigateToMoviesAsync); _mapTappedCommand = ReactiveCommand.Create <bool>(param => MapTappedAsync(param)); _closeMapSelectionCommand = ReactiveCommand.Create(CloseMapSelectionModeAsync); _okMapSelectionCommand = ReactiveCommand.Create(OkMapSelectionAsync); }
public ImageUploadService( Repositories.IRepositories repositories, IGpsService gpsService, ILoggingService loggingService, IReachability reachability, IHttpService httpService) { _repositories = repositories; _gpsService = gpsService; _loggingService = loggingService; _reachability = reachability; _httpService = httpService; }
protected override void OnCreate(Bundle bundle) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(bundle); global::Xamarin.Forms.Forms.Init(this, bundle); LoadApplication(new App()); Xamarin.FormsMaps.Init(this, bundle); gpsService = Xamarin.Forms.DependencyService.Get <IGpsService>(); }
public NewMovementPageViewModel(IDialogService dialogService, IGpsService gpsService, INavigationService navigationService, IDbService dbService, IStorageService storageService) : base(navigationService, dbService, storageService) { this.dialogService = dialogService; this.gpsService = gpsService; saveCommand = new DelegateCommand(SaveExecute, SaveCanExecute); kindChangedCommand = new DelegateCommand(KindChangedExecute); LoadKinds(); LoadBankAccounts(); movement.PropertyChanged += delegate { saveCommand.RaiseCanExecuteChanged(); }; }
public BusStopRepository(IGpsService gpsService) { try { CreateDatabaseFile(); _gpsService = gpsService; _gpsService.LocationChanged = LocationChanged; _gpsService.Start(); ThreadPool.QueueUserWorkItem(o => { GetHandShake(); //GetBusStopList(); }); } catch (Exception ex) { Debug.WriteLine(ex.ToString()); throw; } }
public GpsController(IGpsService gpsService, ICommonService commonService) { this._gpsService = gpsService; this._commonService = commonService; }
public SanntidView() { _sanntid = TinyIoCContainer.Current.Resolve<Realtime>(); _gpsService = TinyIoCContainer.Current.Resolve<IGpsService>(); }
public ModalApp(IModalService modalService, IGpsService gpsService) { _modalService = modalService; _gpsService = gpsService; }
public MapDetailViewModel(IGpsService gpsService) { this.gpsService = gpsService; SetupCommands(); }
public GpsController(IGpsService gpsService, ILoginService loginService) { this.gpsService = gpsService; this.loginService = loginService; }
public Application(IGpsService gpsService) { _gpsSvc = gpsService; }
public GeoService(IGpsService gpsService) { GpsService = gpsService; }
public MainViewModel(IGpsService gps, HeritagePropertyService service, INavigation navigation) { this.Navigation = navigation; this.GpsService = gps; this.HeritagePropertyService = service; }
public MapViewModel() { gpsService = DependencyService.Get <IGpsService>(); getGPSPositionCommand = ReactiveCommand.CreateFromTask(GetPositionAsync); }
public TrainingService(ITrainingRepository trainingRepository, IGpsService gpsService) { this.trainingRepository = trainingRepository; this.gpsService = gpsService; }
public MainViewModel(IGpsService gps, HeritagePropertyService service, INavigation navigation) { this.Navigation = navigation; this.GpsService = gps; this.HeritagePropertyService = service; }