Exemplo n.º 1
0
        protected VehiclesViewModelBase(
            IMyShuttleClient myShuttleClient,
            ILocationServiceSingleton locationService,
            IApplicationSettingServiceSingleton applicationSettingService)
        {
            if (locationService == null)
            {
                throw new ArgumentNullException("locationService");
            }

            if (myShuttleClient == null)
            {
                throw new ArgumentNullException("myShuttleClient");
            }

            if (applicationSettingService == null)
            {
                throw new ArgumentNullException("applicationSettingService");
            }


            MyShuttleClient           = myShuttleClient;
            ApplicationSettingService = applicationSettingService;
            _locationService          = locationService;

            InitializeCommands();
            InitializeActions();
        }
Exemplo n.º 2
0
 public VehiclesByPriceViewModel(
     IMyShuttleClient myShuttleClient,
     ILocationServiceSingleton locationService,
     IApplicationSettingServiceSingleton applicationSettingService)
     : base(myShuttleClient, locationService, applicationSettingService)
 {
 }
        public VehicleDetailViewModel(
            IMyShuttleClient myShuttleClient,
            //IUserInteraction userInteraction,
            ILocationServiceSingleton locationService,
            IApplicationSettingServiceSingleton applicationSettingService)
        {
            if (myShuttleClient == null)
            {
                throw new ArgumentNullException("myShuttleClient");
            }

            //if (userInteraction == null)
            //{
            //    throw new ArgumentNullException("userInteraction");
            //}

            if (locationService == null)
            {
                throw new ArgumentNullException("locationService");
            }

            if (applicationSettingService == null)
            {
                throw new ArgumentNullException("applicationSettingService");
            }

            _myShuttleClient = myShuttleClient;
            //_userInteraction = userInteraction;
            _locationService          = locationService;
            ApplicationSettingService = applicationSettingService;

            this.InitializeCommands();
        }
 public VehiclesByPriceViewModel(
     IMyShuttleClient myShuttleClient,
     ILocationServiceSingleton locationService,
     IApplicationSettingServiceSingleton applicationSettingService,
     IMvxMessenger messenger)
     : base(myShuttleClient, locationService, applicationSettingService, messenger)
 {
 }
Exemplo n.º 5
0
 public VehiclesByDistanceViewModel(
     IMyShuttleClient myShuttleClient,
     ILocationServiceSingleton locationService,
     IApplicationSettingServiceSingleton applicationSettingService,
     IMvxMessenger messenger)
     : base(myShuttleClient, locationService, applicationSettingService, messenger)
 {
 }
Exemplo n.º 6
0
 public VehicleDetailViewModel(IMyShuttleClient myShuttleClient,
                               IMvxPhoneCallTask phoneCallTask,
                               IUserInteraction userInteraction,
                               ILocationServiceSingleton locationService,
                               IApplicationSettingServiceSingleton applicationSettingService) : base(myShuttleClient,
                                                                                                     phoneCallTask, userInteraction, locationService, applicationSettingService)
 {
     this.InitializeCommands();
 }
 public VehicleDetailViewModel(IMyShuttleClient myShuttleClient,
     IMvxPhoneCallTask phoneCallTask,
     IUserInteraction userInteraction,
     ILocationServiceSingleton locationService,
     IApplicationSettingServiceSingleton applicationSettingService) : base(myShuttleClient,
         phoneCallTask, userInteraction, locationService, applicationSettingService)
 {
     this.InitializeCommands();
 }
Exemplo n.º 8
0
 public VehiclesInMapViewModel(
     IMyShuttleClient myShuttleClient,
     ILocationServiceSingleton locationService,
     IApplicationSettingServiceSingleton applicationSettingService,
     IMvxMessenger messenger)
     : base(myShuttleClient, locationService, applicationSettingService, messenger)
 {
     _switchSelectedVehicleCommand = new MvxCommand <int>(SwitchSelectedVehicle);
 }
 public VehiclesInMapViewModel(
     IMyShuttleClient myShuttleClient,
     ILocationServiceSingleton locationService,
     IApplicationSettingServiceSingleton applicationSettingService,
     IMvxMessenger messenger)
     : base(myShuttleClient, locationService, applicationSettingService, messenger)
 {
     _switchSelectedVehicleCommand = new MvxCommand<int>(SwitchSelectedVehicle);
 }
Exemplo n.º 10
0
        public MapViewModel(
            ILocationServiceSingleton locationService, 
            IApplicationSettingServiceSingleton applicationSettingService,
            IVehiclesInMapViewModel vehiclesByDistanceViewModel)
        {
            _locationService = locationService;
            _applicationSettingService = applicationSettingService;
            VehiclesByDistanceViewModel = vehiclesByDistanceViewModel;

            InitializeCommands();
        }
        public MapViewModel(
            ILocationServiceSingleton locationService,
            IApplicationSettingServiceSingleton applicationSettingService,
            IVehiclesInMapViewModel vehiclesByDistanceViewModel)
        {
            _locationService            = locationService;
            _applicationSettingService  = applicationSettingService;
            VehiclesByDistanceViewModel = vehiclesByDistanceViewModel;

            InitializeCommands();
        }
        public BaseTabbedViewModel(Page currentPage)
            : base(currentPage)
        {
            Tab1Click();
            SetPdf();
            Tab1Command = new Command(Tab1Click);
            Tab2Command = new Command(Tab2Click);

            _dataRepository = new ApplicationDataRepository();

            _settings = new ApplicationSettingServiceSingleton(_dataRepository);
            _locationService = new LocationServiceSingleton(_settings);
            CoreClient = new CoreClient(_settings,new ApplicationStorageService(_dataRepository));
        }
 public VehicleDetailViewModel(IMyShuttleClient myShuttleClient,
                               IMvxPhoneCallTask phoneCallTask,
                               IUserInteraction userInteraction,
                               ILocationServiceSingleton locationService,
                               IApplicationSettingServiceSingleton applicationSettingService) : base(myShuttleClient,
                                                                                                     phoneCallTask, userInteraction, locationService, applicationSettingService)
 {
     if (DesignMode.DesignModeEnabled)
     {
         CurrentVehicle = new Core.DocumentResponse.Vehicle
         {
             Make  = "A",
             Model = "B",
         };
     }
 }
        public VehicleDetailViewModel(IMyShuttleClient myShuttleClient,
            IMvxPhoneCallTask phoneCallTask,
            IUserInteraction userInteraction,
            ILocationServiceSingleton locationService,
            IApplicationSettingServiceSingleton applicationSettingService) : base(myShuttleClient,
                phoneCallTask, userInteraction, locationService, applicationSettingService)
        {

            if (DesignMode.DesignModeEnabled)
            {
                CurrentVehicle = new Core.DocumentResponse.Vehicle
                {
                    Make = "A",
                    Model = "B",
                };
            }

        }
Exemplo n.º 15
0
        public MainViewModel(
            IVehiclesByDistanceViewModel vehiclesByDistanceViewModel,
            IVehiclesByPriceViewModel vehiclesByPriceViewModel,
            IMyRidesViewModel myRidesViewModel,
            ILocationServiceSingleton locationService,
            IApplicationSettingServiceSingleton applicationSettingService)
        {
            VehiclesByDistanceViewModel = vehiclesByDistanceViewModel;
            VehiclesByPriceViewModel    = vehiclesByPriceViewModel;
            MyRidesViewModel            = myRidesViewModel;
            _locationService            = locationService;
            _applicationSettingService  = applicationSettingService;
            VehiclesByDistanceViewModel.PropertyChanged += VehiclesByDistanceViewModel_PropertyChanged;
            VehiclesByPriceViewModel.PropertyChanged    += VehiclesByPriceViewModel_PropertyChanged;
            MyRidesViewModel.PropertyChanged            += MyRidesViewModel_PropertyChanged;

            InitializeCommands();
        }
Exemplo n.º 16
0
        public MainViewModel(
            IVehiclesByDistanceViewModel vehiclesByDistanceViewModel,
            IVehiclesByPriceViewModel vehiclesByPriceViewModel,
            IMyRidesViewModel myRidesViewModel,
            ILocationServiceSingleton locationService,
            IApplicationSettingServiceSingleton applicationSettingService)
        {
            VehiclesByDistanceViewModel = vehiclesByDistanceViewModel;
            VehiclesByPriceViewModel = vehiclesByPriceViewModel;
            MyRidesViewModel = myRidesViewModel;
            _locationService = locationService;
            _applicationSettingService = applicationSettingService;
            VehiclesByDistanceViewModel.PropertyChanged += VehiclesByDistanceViewModel_PropertyChanged;
            VehiclesByPriceViewModel.PropertyChanged += VehiclesByPriceViewModel_PropertyChanged;
            MyRidesViewModel.PropertyChanged += MyRidesViewModel_PropertyChanged;

            InitializeCommands();
        }
        public ChangePositionPage()
        {
            this.InitializeComponent();

            _locationService = Mvx.GetSingleton<ILocationServiceSingleton>();
            _applicationSettingService = Mvx.GetSingleton<IApplicationSettingServiceSingleton>();

            InitMap();
            InitializeNotifications();

            this.Loaded += (sender, e) =>
            {
                HardwareButtons.BackPressed += HardwareButtons_BackPressed;
            };

            this.Unloaded += (sender, e) =>
            {
                HardwareButtons.BackPressed -= HardwareButtons_BackPressed;
            };
        }
        public ChangePositionPage()
        {
            this.InitializeComponent();

            _locationService           = Mvx.GetSingleton <ILocationServiceSingleton>();
            _applicationSettingService = Mvx.GetSingleton <IApplicationSettingServiceSingleton>();

            InitMap();
            InitializeNotifications();

            this.Loaded += (sender, e) =>
            {
                HardwareButtons.BackPressed += HardwareButtons_BackPressed;
            };

            this.Unloaded += (sender, e) =>
            {
                HardwareButtons.BackPressed -= HardwareButtons_BackPressed;
            };
        }
Exemplo n.º 19
0
        public VehicleDetailViewModel(
            IMyShuttleClient myShuttleClient,
            IMvxPhoneCallTask phoneCallTask,
            IUserInteraction userInteraction,
            ILocationServiceSingleton locationService,
            IApplicationSettingServiceSingleton applicationSettingService)
        {
            if (myShuttleClient == null)
            {
                throw new ArgumentNullException("myShuttleClient");
            }

            if (phoneCallTask == null)
            {
                throw new ArgumentNullException("phoneCallTask");
            }

            if (userInteraction == null)
            {
                throw new ArgumentNullException("userInteraction");
            }

            if (locationService == null)
            {
                throw new ArgumentNullException("locationService");
            }

            if (applicationSettingService == null)
            {
                throw new ArgumentNullException("applicationSettingService");
            }

            _myShuttleClient          = myShuttleClient;
            _phoneCallTask            = phoneCallTask;
            _userInteraction          = userInteraction;
            _locationService          = locationService;
            ApplicationSettingService = applicationSettingService;

            this.InitializeCommands();
        }
        public VehicleDetailViewModel(
            IMyShuttleClient myShuttleClient,
            IMvxPhoneCallTask phoneCallTask,
            IUserInteraction userInteraction,
            ILocationServiceSingleton locationService,
            IApplicationSettingServiceSingleton applicationSettingService)
        {
            if (myShuttleClient == null)
            {
                throw new ArgumentNullException("myShuttleClient");
            }

            if (phoneCallTask == null)
            {
                throw new ArgumentNullException("phoneCallTask");
            }

            if (userInteraction == null)
            {
                throw new ArgumentNullException("userInteraction");
            }

            if (locationService == null)
            {
                throw new ArgumentNullException("locationService");
            }

            if (applicationSettingService == null)
            {
                throw new ArgumentNullException("applicationSettingService");
            }

            _myShuttleClient = myShuttleClient;
            _phoneCallTask = phoneCallTask;
            _userInteraction = userInteraction;
            _locationService = locationService;
            ApplicationSettingService = applicationSettingService;

            this.InitializeCommands();
        }
Exemplo n.º 21
0
        protected VehiclesViewModelBase(
            IMyShuttleClient myShuttleClient,
            ILocationServiceSingleton locationService,
            IApplicationSettingServiceSingleton applicationSettingService,
            IMvxMessenger messenger)
        {
            if (locationService == null)
            {
                throw new ArgumentNullException("locationService");
            }

            if (myShuttleClient == null)
            {
                throw new ArgumentNullException("myShuttleClient");
            }

            if (applicationSettingService == null)
            {
                throw new ArgumentNullException("applicationSettingService");
            }

            if (messenger == null)
            {
                throw new ArgumentNullException("messenger");
            }

            MyShuttleClient = myShuttleClient;
            ApplicationSettingService = applicationSettingService;
            _locationService = locationService;
            _messenger = messenger;

            _token = _messenger.Subscribe<ReloadDataMessage>(_ => InitializeActions());

            InitializeCommands();
            InitializeActions();
        }
Exemplo n.º 22
0
        protected VehiclesViewModelBase(
            IMyShuttleClient myShuttleClient,
            ILocationServiceSingleton locationService,
            IApplicationSettingServiceSingleton applicationSettingService,
            IMvxMessenger messenger)
        {
            if (locationService == null)
            {
                throw new ArgumentNullException("locationService");
            }

            if (myShuttleClient == null)
            {
                throw new ArgumentNullException("myShuttleClient");
            }

            if (applicationSettingService == null)
            {
                throw new ArgumentNullException("applicationSettingService");
            }

            if (messenger == null)
            {
                throw new ArgumentNullException("messenger");
            }

            MyShuttleClient           = myShuttleClient;
            ApplicationSettingService = applicationSettingService;
            _locationService          = locationService;
            _messenger = messenger;

            _token = _messenger.Subscribe <ReloadDataMessage>(_ => InitializeActions());

            InitializeCommands();
            InitializeActions();
        }