From 4d0e6429436835ab65ffe70c73afe47dc1a531f7 Mon Sep 17 00:00:00 2001
From: C3204 <zhengyabo@lanpucloud.cn>
Date: 星期一, 19 一月 2026 08:39:47 +0800
Subject: [PATCH] 在运动控制界面添加可配置的PLC相关参数修复工具图像输入bug添加项目文件。在运动控制界面添加可配置的PLC相关参数。
---
LB_SmartVisionCommon/ConfigManager.cs | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/LB_SmartVisionCommon/ConfigManager.cs b/LB_SmartVisionCommon/ConfigManager.cs
index 9815212..84d88e0 100644
--- a/LB_SmartVisionCommon/ConfigManager.cs
+++ b/LB_SmartVisionCommon/ConfigManager.cs
@@ -21,6 +21,16 @@
/// <param name="filePath">鏂囦欢瀛樺偍璺緞浠ュ強鍚嶇О</param>
public static void SaveConfig<T>(T config, string filePath)
{
+ if (config == null)
+ {
+ AsyncLogHelper.Error(nameof(config));
+ throw new ArgumentNullException(nameof(config));
+ }
+ if (filePath == null)
+ {
+ AsyncLogHelper.Error(nameof(filePath));
+ AsyncLogHelper.Error(nameof(filePath));
+ }
var json = JsonConvert.SerializeObject(config, Newtonsoft.Json.Formatting.Indented);
File.WriteAllText(filePath, json);
}
--
Gitblit v1.9.3