public void FillModel(ISpecificConfiguration configuration) { var selectProhibitedFragmentTypesConfig = Check.OfType <FragmentPresenceRuleConfig>(configuration, nameof(configuration)); selectProhibitedFragmentTypesConfig.AffectedFragmentTypes.Clear(); currentlySelectedFragmentTypes.ToList().ForEach(aX => selectProhibitedFragmentTypesConfig.AffectedFragmentTypes.Add(aX)); selectProhibitedFragmentTypesConfig.ViolationMessage = textBoxViolationMessage.Text; }
public void FillControl(ISpecificConfiguration configuration) { var selectProhibitedFragmentTypesConfig = Check.OfType <FragmentPresenceRuleConfig>(configuration, nameof(configuration)); // use a copy (to leave types unchanged in case the user cancels the edit form) currentlySelectedFragmentTypes.Clear(); selectProhibitedFragmentTypesConfig.AffectedFragmentTypes.ToList().ForEach(aX => currentlySelectedFragmentTypes.Add(aX)); UpdateListBox(); textBoxViolationMessage.Text = selectProhibitedFragmentTypesConfig.ViolationMessage; }
public void SetSpecificConfiguration(ISpecificConfiguration specificConfiguration) { Check.OfType <FragmentPresenceRuleConfig>(specificConfiguration, nameof(specificConfiguration)); SpecificConfiguration = (FragmentPresenceRuleConfig)specificConfiguration; }