public ProfilePictureScreenViewModel(MainPageViewModel mainPageViewModel) { this.mainPageViewModel = mainPageViewModel; KeepAvatarCommand = new Command(KeepAvatar); SaveNewAvatarCommand = new Command(SaveNewAvatar); ImagePickerCommand = new Command(PickImageAsync); ImageTappedCommand = new Command <int>(ImageTapped); //For access to the Userstore client = new ProfilePictureApiAccess(new UserApiClient(ServerEndpoints.RegisterUrl)); manager = new ProfilePictureManager(client); PickImageEnabled = true; Avatar = Settings.AdventurerMode ? ImageSource.FromFile(AdventurerImage) : ImageSource.FromFile(ProfessorImage); PredAvatarGridBuilt = true; }
public ProfileScreenViewModel(MainPageViewModel mainPageVm) { mainPageViewModel = mainPageVm; Tabs = new ObservableCollection <string> { Strings.MainPageViewModel_OverviewPage, Strings.ProfileView_Statistic }; AppModeVisible = !Settings.DisableAdventurerMode; ChangeAppModeCommand = new Command(OnChangeAppModeTapped); Logout = new Command(LogoutDummy); GoToAchievementsCommand = new Command(GoToAchievements); OnImageTappedCommand = new Command(OnImageTapped); //Add maximum number of achievements here maxAchievementsCount = 120; SetCompletenessBarLength(Settings.Achievements); client = new ProfilePictureApiAccess(new UserApiClient(ServerEndpoints.RegisterUrl)); manager = new ProfilePictureManager(client); }