private void RefreshSelectedLifestyle() { if (_blnSkipRefresh) { return; } string strBaseLifestyle = cboBaseLifestyle.SelectedValue?.ToString() ?? string.Empty; _objLifestyle.BaseLifestyle = strBaseLifestyle; XPathNavigator xmlAspect = _objLifestyle.GetNodeXPath(); if (xmlAspect != null) { string strSource = xmlAspect.SelectSingleNode("source")?.Value ?? string.Empty; string strPage = xmlAspect.SelectSingleNodeAndCacheExpression("altpage")?.Value ?? xmlAspect.SelectSingleNode("page")?.Value ?? string.Empty; if (!string.IsNullOrEmpty(strSource) && !string.IsNullOrEmpty(strPage)) { SourceString objSource = new SourceString(strSource, strPage, GlobalSettings.Language, GlobalSettings.CultureInfo, _objCharacter); lblSource.Text = objSource.ToString(); lblSource.SetToolTip(objSource.LanguageBookTooltip); } else { lblSource.Text = string.Empty; lblSource.SetToolTip(string.Empty); } } else { lblSource.Text = string.Empty; lblSource.SetToolTip(string.Empty); } lblSourceLabel.Visible = !string.IsNullOrEmpty(lblSource.Text); // Characters with the Trust Fund Quality can have the lifestyle discounted. if (_objLifestyle.IsTrustFundEligible) { chkTrustFund.Visible = true; chkTrustFund.Checked = _objLifestyle.TrustFund; } else { chkTrustFund.Checked = false; chkTrustFund.Visible = false; } if (_objLifestyle.AllowBonusLP) { lblBonusLP.Visible = true; nudBonusLP.Visible = true; chkBonusLPRandomize.Visible = true; if (chkBonusLPRandomize.Checked) { nudBonusLP.Enabled = false; _blnSkipRefresh = true; nudBonusLP.Value = GlobalSettings.RandomGenerator.NextD6ModuloBiasRemoved(); _blnSkipRefresh = false; } else { nudBonusLP.Enabled = true; } } else { lblBonusLP.Visible = false; nudBonusLP.Visible = false; nudBonusLP.Value = 0; chkBonusLPRandomize.Visible = false; } }