From a3ba25607612818c28d421bfa8eb2f92339d71ac Mon Sep 17 00:00:00 2001
From: alielie <alielie@git.com>
Date: 星期四, 13 三月 2025 20:30:48 +0800
Subject: [PATCH] 优化项目;
---
Plugin.TestResult/TestResultView.xaml.cs | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/Plugin.TestResult/TestResultView.xaml.cs b/Plugin.TestResult/TestResultView.xaml.cs
index b5877c6..8c6cd63 100644
--- a/Plugin.TestResult/TestResultView.xaml.cs
+++ b/Plugin.TestResult/TestResultView.xaml.cs
@@ -1,4 +1,6 @@
-锘縰sing NationalInstruments.TestStand.Interop.API;
+锘縰sing HMI.Core.Util;
+using HMI.UI.Util;
+using NationalInstruments.TestStand.Interop.API;
using NationalInstruments.TestStand.Interop.UI.Ax;
using NationalInstruments.TestStand.Utility;
using Plugin.TestResult_WPF.Constant;
@@ -164,7 +166,8 @@
}
catch (Exception ex)
{
- throw new Exception("鍒濆鍖朤S寮曟搸澶辫触:" + ex.Message);
+ ViewControl.Logger.Error("InitTestStandEngine Failed.", ex);
+ throw new Exception($"{this.lang("Ts.InitTestStandEngineFail")}: {ex.Message}");
}
}
@@ -179,7 +182,8 @@
}
catch (Exception ex)
{
- throw new Exception("鍚姩娴嬭瘯搴忓垪澶辫触:" + ex.Message);
+ ViewControl.Logger.Error("StartTestSequence Failed.", ex);
+ throw new Exception($"{this.lang("Ts.StartTestSequenceFailed")}: {ex.Message}");
}
}
@@ -198,7 +202,8 @@
}
catch (Exception ex)
{
- throw new Exception(ex.Message);
+ ViewControl.Logger.Error("StopTest Failed.", ex);
+ throw new Exception($"{this.lang("Ts.StopTestSequenceFailed")}: {ex.Message}");
}
}
@@ -216,7 +221,8 @@
}
catch (Exception ex)
{
- MessageBox.Show("閲婃斁娴嬭瘯搴忓垪澶辫触:" + ex.Message);
+ MsgBoxHelper.Error(Window.GetWindow(this),
+ $"{this.lang("Ts.ReleaseSequenceFileFail")}: {ex.Message}");
}
}
@@ -360,7 +366,7 @@
}
catch (Exception ex)
{
-
+ ViewControl.Logger.Warn("TestStand Event Error.", ex);
}
}
--
Gitblit v1.9.1