private async void RedBoxCheck_CheckedChange(object sender, CompoundButton.CheckedChangeEventArgs e) { try { _userSetting.ShowRedBox = e.IsChecked; string userJson = await cardrepo.SerializeObject(_userSetting); xmlDb.SaveUserSetting(userJson); } catch (Exception ex) { Log.Error("GetUserSetting", ex.Message); } }
public async void SaveUserSetting() { _userSetting.IsFirstLaunch = false; _selectedCard = _cards.Find(c => c.IsSelected); _userSetting.UserCard = _selectedCard; string userJson = await cardrepo.SerializeObject(_userSetting); xmlDb.SaveUserSetting(userJson); }