From ba449717184ae09590aaead8a7240103b26cec5e Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周三, 23 7月 2025 10:18:59 +0800
Subject: [PATCH] 写入(需要验证是否真正写入了)
---
CC/iWareCC_ASRS/FormCC.cs | 32 ++++++++++++++++++--------------
1 files changed, 18 insertions(+), 14 deletions(-)
diff --git a/CC/iWareCC_ASRS/FormCC.cs b/CC/iWareCC_ASRS/FormCC.cs
index 133ea01..8199439 100644
--- a/CC/iWareCC_ASRS/FormCC.cs
+++ b/CC/iWareCC_ASRS/FormCC.cs
@@ -28,6 +28,7 @@
using System.Net;
using System.ServiceModel;
using System.Threading;
+using System.Threading.Tasks;
using System.Windows.Forms;
using XiGang.Core.Model;
using XiGang.Core.Model.ViewModels;
@@ -279,22 +280,25 @@
#region 瀵瑰鍙戝竷WCF褰㈠紡鏁版嵁璁块棶鏈嶅姟
- try
+ Task.Run(() =>
{
- #region 瀵瑰鍙戝竷WCF褰㈠紡鏁版嵁璁块棶鏈嶅姟
- var lineServiceHost = new ServiceHost(typeof(CCWcfService));
- lineServiceHost.Open();
- lbl_WCFMsg.Text = "鍙戝竷WCF鎴愬姛," + lineServiceHost.BaseAddresses[0].AbsoluteUri;
- lbl_WCFMsg.ForeColor = Color.Green;
- #endregion
+ try
+ {
+ #region 瀵瑰鍙戝竷WCF褰㈠紡鏁版嵁璁块棶鏈嶅姟
+ var lineServiceHost = new ServiceHost(typeof(CCWcfService));
+ lineServiceHost.Open();
+ lbl_WCFMsg.Text = "鍙戝竷WCF鎴愬姛," + lineServiceHost.BaseAddresses[0].AbsoluteUri;
+ lbl_WCFMsg.ForeColor = Color.Green;
+ #endregion
- }
- catch (Exception ex)
- {
- Log4NetHelper.WriteErrorLog(iWareCommon.Utils.LogType.CCWCFService, "鍙戝竷WCF澶辫触", ex);
- lbl_WCFMsg.Text = "鍙戝竷WCF澶辫触锛�" + ex.Message;
- lbl_WCFMsg.ForeColor = Color.Red;
- }
+ }
+ catch (Exception ex)
+ {
+ Log4NetHelper.WriteErrorLog(iWareCommon.Utils.LogType.CCWCFService, "鍙戝竷WCF澶辫触", ex);
+ lbl_WCFMsg.Text = "鍙戝竷WCF澶辫触锛�" + ex.Message;
+ lbl_WCFMsg.ForeColor = Color.Red;
+ }
+ });
#endregion
--
Gitblit v1.9.3