/// <summary>
        /// Adds a new marker to other markers distance rule to the rule list box, when the rule user controls fires the DataVaild event
        /// </summary>
        private void MarkerToOtherMarkersDistanceRuleControl_DataValid()
        {
            MarkerToOtherMarkersDistanceRule markerToOtherMarkersDistanceRule = (plRuleControl.Controls["ruleControl"] as MarkerToOtherMarkersDistanceRuleControl).MarkerToOtherMarkersDistanceRule;

            if (!lbRules.Items.Contains(markerToOtherMarkersDistanceRule))
            {
                lbRules.Items.Add(markerToOtherMarkersDistanceRule);
            }
            Log(LogSeverityType.Info, $"{markerToOtherMarkersDistanceRule} created/modified");
        }
Пример #2
0
 /// <summary>
 /// Constructor which pre-fills control from existing rule
 /// </summary>
 /// <param name="markerToOtherMarkersDistanceRule">the existing marker to other markers distance rule</param>
 public MarkerToOtherMarkersDistanceRuleControl(MarkerToOtherMarkersDistanceRule markerToOtherMarkersDistanceRule)
 {
     MarkerToOtherMarkersDistanceRule = markerToOtherMarkersDistanceRule;
     InitializeComponent();
     Prefill();
 }