Example #1
0
 public AppleDeviceOrientationService(IMvxLifetime mvxLifetime, ILogger logger) : base(Common.CoordinateSystemOrientation.RightHanded, mvxLifetime, logger)
 {
     if (ObjCRuntime.Runtime.Arch == ObjCRuntime.Arch.DEVICE)
     {
         _motionManager = new CMMotionManager();
     }
 }
Example #2
0
        public AndroidDeviceOrientationService(IMvxLifetime mvxLifetime, ILogger logger) : base(Common.CoordinateSystemOrientation.LeftHanded, mvxLifetime, logger)
        {
            _sensorManager = (SensorManager)Application.Context.GetSystemService(Context.SensorService);
            _accelerometer = _sensorManager.GetDefaultSensor(SensorType.Accelerometer);

            if (_accelerometer != null)
            {
                _accelerometerSensorListener = new AccelerometerSensorListener();
                _accelerometerSensorListener.NotifyOrientationChanged += OrientationChanged;
            }
        }
Example #3
0
        public HomeViewModel(IOrderWorkflowService orderWorkflowService,
                             IMvxWebBrowserTask browserTask,
                             ILocationService locationService,
                             ITutorialService tutorialService,
                             IPushNotificationService pushNotificationService,
                             IVehicleService vehicleService,
                             IAccountService accountService,
                             IPhoneService phoneService,
                             ITermsAndConditionsService termsService,
                             IPaymentService paymentService,
                             IMvxLifetime mvxLifetime,
                             IPromotionService promotionService,
                             IMetricsService metricsService,
                             IBookingService bookingService,
                             INetworkRoamingService networkRoamingService)
        {
            _locationService         = locationService;
            _orderWorkflowService    = orderWorkflowService;
            _tutorialService         = tutorialService;
            _pushNotificationService = pushNotificationService;
            _vehicleService          = vehicleService;
            _termsService            = termsService;
            _mvxLifetime             = mvxLifetime;
            _metricsService          = metricsService;
            _bookingService          = bookingService;
            _accountService          = accountService;
            _paymentService          = paymentService;

            Panel = new PanelMenuViewModel(browserTask, orderWorkflowService, accountService, phoneService, paymentService, promotionService);

            Map              = AddChild <MapViewModel>();
            OrderOptions     = AddChild <OrderOptionsViewModel>();
            OrderReview      = AddChild <OrderReviewViewModel>();
            OrderEdit        = AddChild <OrderEditViewModel>();
            OrderAirport     = AddChild <OrderAirportViewModel>();
            BottomBar        = AddChild <BottomBarViewModel>();
            AddressPicker    = AddChild <AddressPickerViewModel>();
            BookingStatus    = AddChild <BookingStatusViewModel>();
            DropOffSelection = AddChild <DropOffSelectionMidTripViewModel>();

            Observe(_vehicleService.GetAndObserveAvailableVehiclesWhenVehicleTypeChanges(), ZoomOnNearbyVehiclesIfPossible);
            Observe(networkRoamingService.GetAndObserveMarketSettings(), MarketChanged);
        }
 protected CommonDeviceOrientationService(CoordinateSystemOrientation coordinateSystemOrientation, IMvxLifetime mvxLifetime, ILogger logger)
 {
     _coordinateSystemOrientation = coordinateSystemOrientation;
     _mvxLifetime = mvxLifetime;
     Logger       = logger;
 }