private void cboSelectAttribute_Closed(object sender, EventArgs e) { btnAttribute.Visible = true; cboSelectAttribute.Visible = false; _objAttributeActive.PropertyChanged -= Attribute_PropertyChanged; _objAttributeActive = _objSkill.CharacterObject.GetAttribute((string)cboSelectAttribute.SelectedValue); _objAttributeActive.PropertyChanged += Attribute_PropertyChanged; btnAttribute.Font = _objAttributeActive == _objSkill.AttributeObject ? _fntNormal : _fntItalic; btnAttribute.Text = cboSelectAttribute.Text; Attribute_PropertyChanged(sender, new PropertyChangedEventArgs(nameof(CharacterAttrib.Abbrev))); CustomAttributeChanged?.Invoke(sender, e); }
private void cboSelectAttribute_Closed(object sender, EventArgs e) { btnAttribute.Visible = true; cboSelectAttribute.Visible = false; _attributeActive.PropertyChanged -= Attribute_PropertyChanged; _attributeActive = _skill.CharacterObject.GetAttribute((string)cboSelectAttribute.SelectedValue); _attributeActive.PropertyChanged += Attribute_PropertyChanged; btnAttribute.Font = _attributeActive == _skill.AttributeObject ? _normal : _italic; btnAttribute.Text = cboSelectAttribute.Text; Attribute_PropertyChanged(this, null); CustomAttributeChanged?.Invoke(this, EventArgs.Empty); }