From 0940f31b7eba1cf6b6a8c1fca72d97cf686e79f2 Mon Sep 17 00:00:00 2001
From: alielie <alielie@git.com>
Date: 星期五, 04 七月 2025 10:43:00 +0800
Subject: [PATCH] 优化插件,完善TreeListView
---
HMI.UnitTest/MainWindow.xaml.cs | 42 ++++++++++++++++++++++++++++--------------
1 files changed, 28 insertions(+), 14 deletions(-)
diff --git a/HMI.UnitTest/MainWindow.xaml.cs b/HMI.UnitTest/MainWindow.xaml.cs
index daa000d..d367685 100644
--- a/HMI.UnitTest/MainWindow.xaml.cs
+++ b/HMI.UnitTest/MainWindow.xaml.cs
@@ -33,18 +33,32 @@
private void Button_Click(object sender, RoutedEventArgs e)
{
- CountdownEvent c = new CountdownEvent(4);
- while (c.CurrentCount > 0) {
- Task.Run(() =>
- {
- int i = c.CurrentCount;
- c.Signal();
- for (int j = 0; j < 1000; j++)
- {
- tsExecution.AddTestData(i, $"{j},2,3,4,5,6,7");
- }
- });
- }
+ //Task.Run(() =>
+ //{
+ // for (int j = 0; j < 1000; j++)
+ // {
+ // string status = (j % 2 == 0) ? "Passed" : "Failed";
+ // string d = (j % 2 == 0) ? "9" : "9999999999999999999999999999999999999999999999999999999999999999995";
+ // tsExecution.AddTestData(0, $"ConnectivityCANRec,2,3,4,{d},6,{status}");
+ // }
+ //});
+
+ //tsExecution.UpdatePositionStatus(0, "Passed");
+ tsExecution.UpdatePositionStatus(0, "Failed");
+ //tsExecution.UpdatePositionProcessValue(0, 12);
+ //tsExecution.PausePosition(0);
+ //tsExecution.SetPositionBarcode(0, "123456789");
+ //tsExecution.SavePositionCSV(0);
+
+
+ //tsExecution.UpdatePositionStatus(1, "Failed");
+ //tsExecution.UpdatePositionStatus(2, "Ready");
+ //tsExecution.UpdatePositionStatus(3, "Testing");
+ //tsExecution.UpdatePositionProcessValue(1, 50);
+ //tsExecution.UpdatePositionProcessValue(2, 100);
+ //tsExecution.UpdatePositionProcessValue(3, 99);
+
+
//client = new PipeClient2("DAService");
////client.OnData += Client_OnData1;
//client.Connect();
@@ -151,10 +165,10 @@
private void Window_Loaded(object sender, RoutedEventArgs e)
{
- var plugin = new DataBoard();
+ var plugin = new TsExecution();
HandlePlugin(plugin);
border.Child = plugin;
- dataBoard = plugin;
+ tsExecution = plugin;
this.Loaded -= Window_Loaded;
}
}
--
Gitblit v1.9.1