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;
|
StepUI.PropertyChanged += StepUI_PropertyChanged;
|
|
Step = stepUI?.step;
|
PropertyObject = Step?.AsPropertyObject();
|
}
|
|
private void StepUI_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
|
{
|
if (e.PropertyName == "Low" || e.PropertyName == "High")
|
{
|
OnPropertyChanged(e.PropertyName);
|
}
|
}
|
|
~NumValTestEPO()
|
{
|
if (StepUI != null)
|
{
|
StepUI.PropertyChanged -= StepUI_PropertyChanged;
|
}
|
}
|
|
public string ComparisonType
|
{
|
get => PropertyObject?.GetValString("Comp", 0);
|
set
|
{
|
if (PropertyObject != null)
|
{
|
PropertyObject.SetValString("Comp", 0, value);
|
CustomPropertyChanged(nameof(ComparisonType));
|
}
|
}
|
}
|
|
public string Low
|
{
|
get => StepUI?.Low?.ToString();
|
set
|
{
|
double.TryParse(value, out var dob);
|
StepUI.Low = value;
|
}
|
}
|
|
public string High
|
{
|
get => StepUI?.High?.ToString();
|
set
|
{
|
double.TryParse(value, out var dob);
|
StepUI.High = dob;
|
}
|
}
|
}
|
}
|