From 2b0d3b1a9f62e5ec48e4b559f95b3d4bdc3bee09 Mon Sep 17 00:00:00 2001 From: schangxiang@126.com <schangxiang@126.com> Date: 周二, 01 4月 2025 10:45:22 +0800 Subject: [PATCH] 打印支持 10张 --- 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