예제 #1
0
        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;
        }
예제 #2
0
        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;
        }
예제 #3
0
 public void SetSpecificConfiguration(ISpecificConfiguration specificConfiguration)
 {
     Check.OfType <FragmentPresenceRuleConfig>(specificConfiguration, nameof(specificConfiguration));
     SpecificConfiguration = (FragmentPresenceRuleConfig)specificConfiguration;
 }