From 9d1660270272180cd71147d6ddd53d1382643d2e Mon Sep 17 00:00:00 2001
From: wenxiangchao <wenxiangchao@ihengxin.com.cn>
Date: 星期一, 02 十一月 2026 18:00:14 +0800
Subject: [PATCH] merge: 并入远程 Initial commit 作为历史根节点
---
Plugin.SeqEditor/Entity/EditablePO/StringValTestEPO.cs | 75 +++++++++++++++++++++++++++++++++++++
1 files changed, 75 insertions(+), 0 deletions(-)
diff --git a/Plugin.SeqEditor/Entity/EditablePO/StringValTestEPO.cs b/Plugin.SeqEditor/Entity/EditablePO/StringValTestEPO.cs
new file mode 100644
index 0000000..1772d48
--- /dev/null
+++ b/Plugin.SeqEditor/Entity/EditablePO/StringValTestEPO.cs
@@ -0,0 +1,75 @@
+锘縰sing CommunityToolkit.Mvvm.ComponentModel;
+using NationalInstruments.TestStand.Interop.API;
+
+namespace Plugin.SeqEditor.Entity.EditablePO
+{
+
+ public class StringValTestEPO : BaseEPO
+ {
+ public Step Step { get; private set; }
+ public PropertyObject PropertyObject { get; private set; }
+
+ public StringValTestEPO(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")
+ {
+ OnPropertyChanged("StringValue");
+ }
+ }
+
+ public string ComparisonType
+ {
+ get => PropertyObject?.GetValString("Comp", 0);
+ set
+ {
+ if (PropertyObject != null)
+ {
+ PropertyObject.SetValString("Comp", 0, value);
+ CustomPropertyChanged(nameof(ComparisonType));
+ }
+ }
+ }
+
+ public bool IsReadOnly
+ {
+ get
+ {
+ if (PropertyObject == null) return false;
+ bool flag = PropertyObject.GetValBoolean("Limits.UseStringExpr", 0);
+ return flag == true;
+ }
+ }
+
+ public string StringValue
+ {
+ get
+ {
+ if (PropertyObject == null) return null;
+ var value = PropertyObject.GetValString("Limits.String", 0);
+ if (string.IsNullOrEmpty(value))
+ {
+ value = PropertyObject.GetValString("Limits.StringExpr", 0);
+ }
+ return value;
+ }
+ set
+ {
+ if (PropertyObject != null)
+ {
+ PropertyObject.SetValString("Limits.String", 0, value);
+ PropertyObject.SetValString("Limits.StringExpr", 0, null);
+ PropertyObject.SetValBoolean("Limits.UseStringExpr", 0, false);
+ CustomPropertyChanged(nameof(StringValue));
+ }
+ }
+ }
+ }
+}
--
Gitblit v1.9.1