private void RefreshSelectedLifestyle() { if (_blnSkipRefresh) { return; } string strBaseLifestyle = cboBaseLifestyle.SelectedValue?.ToString() ?? string.Empty; _objLifestyle.BaseLifestyle = strBaseLifestyle; XmlNode xmlAspect = _objLifestyle.GetNode(); if (xmlAspect != null) { string strSource = xmlAspect["source"]?.InnerText ?? string.Empty; string strPage = xmlAspect["altpage"]?.InnerText ?? xmlAspect["page"]?.InnerText ?? string.Empty; if (!string.IsNullOrEmpty(strSource) && !string.IsNullOrEmpty(strPage)) { string strSpaceCharacter = LanguageManager.GetString("String_Space", GlobalOptions.Language); lblSource.Text = CommonFunctions.LanguageBookShort(strSource, GlobalOptions.Language) + strSpaceCharacter + strPage; lblSource.SetToolTip(CommonFunctions.LanguageBookLong(strSource, GlobalOptions.Language) + strSpaceCharacter + LanguageManager.GetString("String_Page", GlobalOptions.Language) + strSpaceCharacter + strPage); } 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 = 1 + GlobalOptions.RandomGenerator.NextD6ModuloBiasRemoved(); _blnSkipRefresh = false; } else { nudBonusLP.Enabled = true; } } else { lblBonusLP.Visible = false; nudBonusLP.Visible = false; nudBonusLP.Value = 0; chkBonusLPRandomize.Visible = false; } CalculateValues(); }