alielie
2025-07-04 0940f31b7eba1cf6b6a8c1fca72d97cf686e79f2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
using CommunityToolkit.Mvvm.ComponentModel;
using NationalInstruments.TestStand.Interop.API;
 
namespace Plugin.SeqEditor.Entity.EditablePO
{
    public class NumValTestEPO : BaseEPO
    {
        public Step Step { get; private set; }
        public PropertyObject PropertyObject { get; private set; }
 
        public NumValTestEPO(StepUI stepUI)
        {
            StepUI = stepUI;
            Step = stepUI?.step;
            PropertyObject = Step?.AsPropertyObject();
        }
 
        public string ComparisonType
        {
            get => PropertyObject?.GetValString("Comp", 0);
            set
            {
                if (PropertyObject != null)
                {
                    PropertyObject.SetValString("Comp", 0, value);
                    CustomPropertyChanged(nameof(ComparisonType));
                }
            }
        }
 
        public double? Low
        {
            get => PropertyObject?.GetValNumber("Limits.Low", 0);
            set
            {
                if (PropertyObject != null)
                {
                    PropertyObject.SetValNumber("Limits.Low", 0, value ?? 0);
                    CustomPropertyChanged(nameof(Low));
                }
            }
        }
 
        public double? High
        {
            get => PropertyObject?.GetValNumber("Limits.High", 0);
            set
            {
                if (PropertyObject != null)
                {
                    PropertyObject.SetValNumber("Limits.High", 0, value ?? 0);
                    CustomPropertyChanged(nameof(Low));
                }
            }
        }
    }
}