Exemple #1
0
        public ProfileViewModel(IConstantUserInstance constantUserInstance = null, INavigationService navigationService = null)
        {
            _constantUserInstance = constantUserInstance ?? (IConstantUserInstance)Splat.Locator.Current.GetService(typeof(IConstantUserInstance));
            _navigationService    = navigationService ?? (INavigationService)Splat.Locator.Current.GetService(typeof(INavigationService));

            Init();

            SettingsCommand = new RelayCommand(OnSettings);
        }
Exemple #2
0
        public NewUserInfoViewModel(INavigationService navigation = null, IUserController userController = null, IConstantUserInstance constantUserInstance = null)
        {
            _navigation           = navigation ?? (INavigationService)Splat.Locator.Current.GetService(typeof(INavigationService));
            _userController       = userController ?? (IUserController)Splat.Locator.Current.GetService(typeof(IUserController));
            _constantUserInstance = constantUserInstance ?? (IConstantUserInstance)Splat.Locator.Current.GetService(typeof(IConstantUserInstance));

            InitUser();

            SkipCommand   = new RelayCommand(OnSkip);
            SubmitCommand = new RelayCommand(OnSubmit);
        }
Exemple #3
0
        public ProfileSettingsViewModel(IUserController userController         = null, IConstantUserInstance constantUserInstance = null,
                                        IPhotoPickerService photoPickerService = null, INavigationService navigationService       = null)
        {
            _userController       = userController ?? (IUserController)Locator.Current.GetService(typeof(IUserController));
            _constantUserInstance = constantUserInstance ?? (IConstantUserInstance)Locator.Current.GetService(typeof(IConstantUserInstance));
            _photoPickerService   = photoPickerService ?? DependencyService.Get <IPhotoPickerService>();
            _navigationService    = navigationService ?? (INavigationService)Locator.Current.GetService(typeof(INavigationService));

            ChangeProfilePicture = new RelayCommand(OnChangeProfilePic);
            CancelCommand        = new RelayCommand(OnCancel);
            SubmitCommand        = new RelayCommand(OnSubmit);

            Init();
        }
Exemple #4
0
 public UserController(IUserManager userManager = null, IConstantUserInstance constantUserInstance = null)
 {
     _userManager          = userManager ?? (IUserManager)Splat.Locator.Current.GetService(typeof(IUserManager));
     _constantUserInstance = constantUserInstance ?? (IConstantUserInstance)Splat.Locator.Current.GetService(typeof(IConstantUserInstance));
 }