Ejemplo n.º 1
0
        /// <summary>
        /// Adds a new marker timing rule to the rule list box, when the rule user controls fires the DataVaild event
        /// </summary>
        private void MarkerTimingRuleControl_DataValid()
        {
            MarkerTimingRule markerTimingRule = (plRuleControl.Controls["ruleControl"] as MarkerTimingRuleControl).MarkerTimingRule;

            if (!lbRules.Items.Contains(markerTimingRule))
            {
                lbRules.Items.Add(markerTimingRule);
            }
            Log(LogSeverityType.Info, $"{markerTimingRule} created/modified");
        }
 /// <summary>
 /// Constructor which pre-fills control from existing rule
 /// </summary>
 /// <param name="markerTimingRule">the existing marker timing rule</param>
 public MarkerTimingRuleControl(MarkerTimingRule markerTimingRule)
 {
     MarkerTimingRule = markerTimingRule;
     InitializeComponent();
     Prefill();
 }