コード例 #1
0
        public SplitDetailViewModel(IActivityService activityService, ITwilioService twilioService, IDialogService dialogService, IMvxPhoneCallTask phoneCallTask, IMvxMessenger messenger, IProspectService prospectService, IMvxNavigationService navigationService)
        {
            Messenger          = messenger;
            _prospectService   = prospectService;
            _navigationService = navigationService;
            _phoneCallTask     = phoneCallTask;
            _dialogService     = dialogService;
            _twilioService     = twilioService;
            _activityService   = activityService;
            Phones             = new ObservableCollection <KeyValuePair <string, string> >();

            Messenger.Subscribe <RefreshMessage>(message => _clearDetailsInteraction.Raise(), MvxReference.Strong);
            Messenger.Subscribe <ProspectChangedMessage>(message => Prepare(new KeyValuePair <Prospect, User>(message.UpdatedProspect, User)), MvxReference.Strong);
            Messenger.Subscribe <UserLogoutMessage>(message => UserLogout(), MvxReference.Strong);
            Messenger.Subscribe <ActivityAddedMessage>(message => ActivityAdded(message.AddedActivity), MvxReference.Strong);
            Messenger.Subscribe <ProspectChangedMessage>(message =>
            {
                RaisePropertyChanged(() => EmailEntered);
                RaisePropertyChanged(() => StreetAddressEntered);
                RaisePropertyChanged(() => MobilePhoneEntered);
                RaisePropertyChanged(() => HomePhoneEntered);
                RaisePropertyChanged(() => WorkPhoneEntered);
                RaisePropertyChanged(() => AllowCalling);
                RaisePropertyChanged(() => AllowEmailing);
                RaisePropertyChanged(() => AllowTexting);
            },
                                                         MvxReference.Strong);
        }
コード例 #2
0
 public VehicleDetailViewModel(IMyShuttleClient myShuttleClient,
     IMvxPhoneCallTask phoneCallTask,
     IUserInteraction userInteraction,
     ILocationServiceSingleton locationService,
     IApplicationSettingServiceSingleton applicationSettingService) : base(myShuttleClient,
         phoneCallTask, userInteraction, locationService, applicationSettingService)
 {
     this.InitializeCommands();
 }
コード例 #3
0
 public EnvironmentService(
     IMvxPhoneCallTask phoneCallTask,
     IMvxComposeEmailTask composeEmailTask,
     IReachabilityService reachabilityService)
 {
     _phoneCallTask       = phoneCallTask;
     _composeEmailTask    = composeEmailTask;
     _reachabilityService = reachabilityService;
 }
コード例 #4
0
 public VehicleDetailViewModel(IMyShuttleClient myShuttleClient,
                               IMvxPhoneCallTask phoneCallTask,
                               IUserInteraction userInteraction,
                               ILocationServiceSingleton locationService,
                               IApplicationSettingServiceSingleton applicationSettingService) : base(myShuttleClient,
                                                                                                     phoneCallTask, userInteraction, locationService, applicationSettingService)
 {
     this.InitializeCommands();
 }
コード例 #5
0
        public SalepointOrderListItemViewModel(IMvxPhoneCallTask phoneCallService, ISalepointOrdersService salepointOrdersService, IUserDialogs dialogsService)
        {
            this.phoneCallService       = phoneCallService;
            this.salepointOrdersService = salepointOrdersService;
            this.dialogsService         = dialogsService;

            this.cancelationDialogConfig            = new ConfirmConfig();
            this.cancelationDialogConfig.OkText     = "Tak";
            this.cancelationDialogConfig.CancelText = "Nie";
            this.cancelationDialogConfig.Title      = "Anulowanie zamówienia";
            this.cancelationDialogConfig.Message    = "Czy na pewno chcesz anulować zamówienie?";
            this.cancelationDialogConfig.OnAction  += OrderCancellation;
        }
 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",
         };
     }
 }
コード例 #7
0
ファイル: ItemViewModel.cs プロジェクト: EnaEd/Tasky
        public ItemViewModel(IMvxPhoneCallTask phoneCallTask, IMvxPictureChooserTask pictureChooserTask, IItemRepository itemRepository, IUserRepository userRepository)
        {
            //for photo on drawerLayout
            UserImage = SignViewModel.UserCurrent.UserImage;
            UserLogin = SignViewModel.UserCurrent.UserLogin;

            _phoneCallTask      = phoneCallTask;
            _pictureChooserTask = pictureChooserTask;
            _itemRepository     = itemRepository;
            _userRepository     = userRepository;

            Error = string.Empty;

            _maxPixel       = 400;
            _qualityPercent = 90;
        }
コード例 #8
0
        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",
                };
            }

        }
コード例 #9
0
        public BottomBarViewModel(IOrderWorkflowService orderWorkflowService,
                                  IMvxPhoneCallTask phone,
                                  IAccountService accountService,
                                  IPaymentService paymentService,
                                  INetworkRoamingService networkRoamingService,
                                  IBookingService bookingService)
        {
            _bookingService        = bookingService;
            _phone                 = phone;
            _orderWorkflowService  = orderWorkflowService;
            _accountService        = accountService;
            _paymentService        = paymentService;
            _networkRoamingService = networkRoamingService;

            if (!Settings.HideDestination)
            {
                Observe(_orderWorkflowService.GetAndObserveIsDestinationModeOpened(),
                        isDestinationModeOpened => EstimateSelected = isDestinationModeOpened);
            }

            if (Settings.PromotionEnabled)
            {
                Observe(ObserveIsPromoCodeApplied(), isPromoCodeApplied => IsPromoCodeActive = isPromoCodeApplied);
            }

            RefreshAppBarViewState(HomeViewModelState.Initial);

            // We ensure that we correctly update IsFutureBookingDisabled.
            var observeValidationResultAndMarkertSettings = Observable.CombineLatest(
                _orderWorkflowService.GetAndObserveOrderValidationResult(),
                _networkRoamingService.GetAndObserveMarketSettings(),
                (orderValidationResult, marketSettings) => new
            {
                OrderValidationResult = orderValidationResult,
                MarketSettings        = marketSettings
            });

            Observe(observeValidationResultAndMarkertSettings, mergedResult => HandleOrderValidatedtAndMarketSettingsChanged(mergedResult.OrderValidationResult, mergedResult.MarketSettings));
            Observe(_orderWorkflowService.GetAndObserveCanExecuteBookingOperation(), canExecuteBookOperation => CanExecuteBookOperation = canExecuteBookOperation);
        }
コード例 #10
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();
        }
コード例 #11
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();
        }
コード例 #12
0
 public HomeViewModel(IMvxPhoneCallTask phoneCall, ICallService callService)
 {
     _phoneCall = phoneCall;
     _callService = callService;
 }
コード例 #13
0
        public RoutePointActiveListViewModel(IRoutesService routesService, ICarrierOrdersService ordersService, IMvxNavigationService navigationService, IUserDialogs dialogsService, IMvxPhoneCallTask phoneCallService)
        {
            this.routesService     = routesService;
            this.navigationService = navigationService;
            this.ordersService     = ordersService;
            this.phoneCallService  = phoneCallService;
            this.dialogsService    = dialogsService;

            this.passPointDialogConfig            = new ConfirmConfig();
            this.passPointDialogConfig.OkText     = "Tak";
            this.passPointDialogConfig.CancelText = "Nie";
            this.passPointDialogConfig.Title      = "Zakończ punkt";
            this.passPointDialogConfig.Message    = "Czy na pewno chcesz zakończyć ten punkt?";
            this.passPointDialogConfig.OnAction  += x => PassPoint(x);
        }
 public InitializeOrderForAccountPaymentViewModel(IOrderWorkflowService orderWorkflowService, IMvxPhoneCallTask phone)
 {
     _orderWorkflowService = orderWorkflowService;
     _phone = phone;
 }
コード例 #15
0
 public PhoneCallService(IMvxPhoneCallTask phoneCall)
 {
     _phoneCall = phoneCall;
 }