Exemplo n.º 1
0
        public TaskDetailsViewModel(ICurrentPlatformService getCurrentPlatformService, IMvxNavigationService navigationService,
                                    ITaskService taskService, IMapMarkerService mapMarkerService, IFileNameService fileNameService,
                                    IUserDialogs userDialogs, IMvxMessenger mvxMessenger) : base(navigationService, userDialogs)
        {
            _mvxMessenger              = mvxMessenger;
            _mapMarkerService          = mapMarkerService;
            _taskService               = taskService;
            _fileNameService           = fileNameService;
            _getCurrentPlatformService = getCurrentPlatformService;

            _userId = int.Parse(CrossSecureStorage.Current.GetValue(Constants.SequreKeyForUserIdInDB));

            _dataForMap = new MarkersData();

            _thisTaskEntity = new TaskEntity();

            _thisTaskEntity.UserId = _userId;

            _mapMarkerList = new MvxObservableCollection <MapMarkerEntity>();

            DeleteFileItemCommand = new MvxCommand <int>(RemoveFileCollectionItem);

            _dataForMap.TaskId = _taskId;

            SaveButton = true;
            HaveGone   = false;
        }
Exemplo n.º 2
0
        public MainViewModel(IMvxNavigationService navigationService, IUserDialogs userDialogs,
                             ICurrentPlatformService currentPlatformService) : base(navigationService, userDialogs)
        {
            _currentPlatformService = currentPlatformService;

            ShowMainViewCommand             = new MvxAsyncCommand(async() => await _navigationService.Navigate <TaskListViewModel>());
            ShowUserProfileViewModelCommand = new MvxAsyncCommand(async() => await _navigationService.Navigate <UserDataViewModel>());
        }
Exemplo n.º 3
0
        public UserDataViewModel(ICurrentPlatformService currentPlatformService, IUserService dBUserService,
                                 IMvxPictureChooserTask pictureChooserTask, IMvxNavigationService navigationService,
                                 IUserDialogs userDialogs) : base(navigationService, userDialogs)
        {
            _currentPlatformService = currentPlatformService;
            _pictureChooserTask     = pictureChooserTask;
            _userService            = dBUserService;

            _userId   = int.Parse(CrossSecureStorage.Current.GetValue(Constants.SequreKeyForUserIdInDB));
            _userData = dBUserService.GetItem(_userId);

            GetUserData();
        }