From 48527dff9c5adda9881cad10fa9dbeecf6f07bed Mon Sep 17 00:00:00 2001
From: ningshuxia <ningshuxia0927@outlook.com>
Date: 星期三, 19 三月 2025 11:58:52 +0800
Subject: [PATCH] 模型模板修改

---
 WinFrmUI/IBox.WinFrmUI/BluetoothHelper.cs |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/WinFrmUI/IBox.WinFrmUI/BluetoothHelper.cs b/WinFrmUI/IBox.WinFrmUI/BluetoothHelper.cs
index aafc115..4154716 100644
--- a/WinFrmUI/IBox.WinFrmUI/BluetoothHelper.cs
+++ b/WinFrmUI/IBox.WinFrmUI/BluetoothHelper.cs
@@ -27,7 +27,9 @@
             }
             return _Instance;
         }
-        int _length = 1;
+
+        private int _length = 1;
+
         #endregion 鍗曚緥
 
         #region 淇℃伅鐘舵��
@@ -66,8 +68,14 @@
 
         public BluetoothHelper()
         {
-            var radio = BluetoothRadio.Default;//鑾峰彇褰撳墠PC鐨勮摑鐗欓�傞厤鍣�
-            IsRun = (null != radio);
+            try
+            {
+                var radio = BluetoothRadio.Default;//鑾峰彇褰撳墠PC鐨勮摑鐗欓�傞厤鍣�
+                IsRun = (null != radio);
+            }
+            catch
+            {
+            }
             if (!IsRun) OnSysMessage("鏃犲彲鐢ㄨ摑鐗�");
         }
 

--
Gitblit v1.9.3