Ejemplo n.º 1
0
        public SideMenuViewModel()
        {
            _navigationService      = SimpleIoc.Default.GetInstance <IStackNavigationService>();
            _userPreferencesService = SimpleIoc.Default.GetInstance <IUserPreferencesService>();
            _vstsRespository        = SimpleIoc.Default.GetInstance <IVSTSRepository>();
            _authenticationService  = SimpleIoc.Default.GetInstance <IAuthenticationService>();

            UserProfile = new TaskNotifier <UserProfile>(_vstsRespository.GetUserProfile());
            Logout      = new AsyncCommand(async() => await LogoutPrompt());
            Account     = _userPreferencesService.GetPreferredAccount();

            ToProfilePage          = new RelayCommand(() => _navigationService.ToProfilePage());
            ToAboutPage            = new RelayCommand(() => _navigationService.ToAboutPage());
            ToOrganizationListPage = new RelayCommand(() => _navigationService.NavigateToAndClearStack(nameof(OrganizationListPage)));
            ToProjectListPage      = new RelayCommand(() => _navigationService.NavigateToAndClearStack(nameof(ProjectListPage), Account));

            AppVersion = VersionHelper.GetAppVersionWithBuildNumber;
        }
Ejemplo n.º 2
0
        public ProjectListPageViewModel()
        {
            _navigationService      = SimpleIoc.Default.GetInstance <IStackNavigationService>();
            _vstsRepository         = SimpleIoc.Default.GetInstance <IVSTSRepository>();
            _userPreferencesService = SimpleIoc.Default.GetInstance <IUserPreferencesService>();

            ToProjectPage = new RelayCommand <TeamProjectReference>(project => _navigationService.NavigateToAndClearStack(nameof(ProjectPage), project));

            ReloadPage = new RelayCommand(() => Projects = new TaskNotifier <List <TeamProjectReference> >(GetProjects()));

            ToProfilePage = new RelayCommand(() => _navigationService.ToProfilePage());
        }
Ejemplo n.º 3
0
        public OrganizationListPageViewModel()
        {
            _navigationService      = SimpleIoc.Default.GetInstance <IStackNavigationService>();
            _vstsRepository         = SimpleIoc.Default.GetInstance <IVSTSRepository>();
            _userPreferencesService = SimpleIoc.Default.GetInstance <IUserPreferencesService>();

            ToProjectListPage = new RelayCommand <AccountData>(account => _navigationService.NavigateToAndClearStack(nameof(ProjectListPage), account));

            ToProfilePage = new RelayCommand(() => _navigationService.ToProfilePage());

            ToAboutPage = new RelayCommand(() => _navigationService.ToAboutPage());

            ReloadPage = new RelayCommand(() => Organizations = new TaskNotifier <List <AccountData> >(GetOrganizations()));
        }