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 作为历史根节点
---
StationGlobalsReader/MainWindow.xaml.cs | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 50 insertions(+), 0 deletions(-)
diff --git a/StationGlobalsReader/MainWindow.xaml.cs b/StationGlobalsReader/MainWindow.xaml.cs
new file mode 100644
index 0000000..d3fe27f
--- /dev/null
+++ b/StationGlobalsReader/MainWindow.xaml.cs
@@ -0,0 +1,50 @@
+锘縰sing CommunityToolkit.Mvvm.ComponentModel;
+using NationalInstruments.TestStand.Interop.API;
+using NationalInstruments.TestStand.Interop.UI.Ax;
+using System.Windows;
+using System.Windows.Forms.Integration;
+
+namespace StationGlobalsReader;
+
+/// <summary>
+/// Interaction logic for MainWindow.xaml
+/// </summary>
+[ObservableObject]
+public partial class MainWindow : Window
+{
+ public MainWindow()
+ {
+ axApplicationMgr = new AxApplicationMgr();
+ InitializeComponent();
+
+ this.engine = axApplicationMgr.GetEngine();
+ this.engine.PersistBreakpoints = false;
+ this.axApplicationMgr.IsEditor = true;
+ this.axApplicationMgr.LoginOnStart = false;
+ this.axApplicationMgr.Start();
+ ((System.ComponentModel.ISupportInitialize)(axApplicationMgr)).BeginInit();
+ host.Child = axApplicationMgr;
+ ((System.ComponentModel.ISupportInitialize)(axApplicationMgr)).EndInit();
+ }
+ private AxApplicationMgr axApplicationMgr;
+
+ private Engine engine = null;
+
+ [ObservableProperty]
+ private string propertyName;
+
+ [ObservableProperty]
+ private string target;
+
+ private void Button_Click(object sender, RoutedEventArgs e)
+ {
+ try
+ {
+ Target = engine.Globals.GetValString($"StationGlobals.{PropertyName}", 0);
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show(ex.Message);
+ }
+ }
+}
\ No newline at end of file
--
Gitblit v1.9.1