private void InitialiseVisual() { if (_profile.CurrentProfile.Picture != EnumsModel.PrincessAvatar.Default) { PrincessImageCarrousel.SelectedIndex = (int)_profile.CurrentProfile.Picture - 1; AchievementManager.AchieveAvatarChange(); } Description.Text = _profile.CurrentProfile.Description; PrivateSlider.Value = _profile.CurrentProfile.IsPrivate ? PrivateSlider.Minimum : PrivateSlider.Maximum; }
private void SaveButton_OnClick(object sender, RoutedEventArgs e) { if (PrincessImageCarrousel.SelectedIndex >= 0) { _profile.CurrentProfile.Picture = (EnumsModel.PrincessAvatar)PrincessImageCarrousel.SelectedIndex + 1; AchievementManager.AchieveAvatarChange(); } _profile.CurrentProfile.Description = Description.Text; _profile.CurrentProfile.IsPrivate = !(PrivateSlider.Value > 5);; // UpdateWindow profile var thread = new Thread(() => { _profileAccess.UpdateUserProfile(_profile.CurrentProfile); }); thread.Start(); _eventManager.Notice(new ChangeStateEvent() { NextState = Enums.States.Profile }); }