コード例 #1
0
 public AccelerationViewModel(AgresivityCalculator calculator)
 {
     ReportInterval = 5;
     _calculator = calculator;
     _accelerometer = Accelerometer.GetDefault();
     _accelerometer.ReportInterval = ReportInterval;
 }
コード例 #2
0
        public GpsDataViewModel(AgresivityCalculator calculator)
        {
            MovementThreshold = 5;
            _calculator = calculator;
            _watcher = new GeoCoordinateWatcher(GeoPositionAccuracy.High);
            _watcher.MovementThreshold = MovementThreshold;
            _watcher.PositionChanged += _watcher_PositionChanged;

            GpsData = new System.Device.Location.GeoCoordinate();
            GpsData.Speed = 54;
        }