Shun 2 gadi atpakaļ
vecāks
revīzija
d3b9e21c08

+ 2 - 2
src/YSAI.Mewtocol/MewtocolOperate.cs

@@ -665,7 +665,7 @@ namespace YSAI.Mewtocol
                 switch (basics.PType)
                 {
                     case MewtocolData.ProtocolType.Tcp:
-                        if (MTcp != null)
+                        if (GetStatus().State)
                         {
                             return Break(SN, false, "已连接");
                         }
@@ -686,7 +686,7 @@ namespace YSAI.Mewtocol
                         }
                         break;
                     case MewtocolData.ProtocolType.Serial:
-                        if (MSerial != null)
+                        if (GetStatus().State)
                         {
                             return Break(SN, false, "已连接");
                         }

+ 1 - 1
src/YSAI.Mewtocol/YSAI.Mewtocol.csproj

@@ -3,7 +3,7 @@
     <TargetFrameworks>net6.0;net8.0</TargetFrameworks>
     <ImplicitUsings>enable</ImplicitUsings>
     <Nullable>enable</Nullable>
-    <Version>23.360.36511</Version>
+    <Version>23.360.37135</Version>
     <PackageOutputPath Condition="'$(Configuration)' == 'Release'">../YSAI.Publish/Release</PackageOutputPath>
     <PackageOutputPath Condition="'$(Configuration)' == 'Debug'">../YSAI.Publish/Debug</PackageOutputPath>
     <Authors>Shun</Authors>

+ 1 - 1
src/YSAI.Tool.Wpf/App.xaml.cs

@@ -18,7 +18,7 @@ namespace YSAI.Tool.Wpf
         private void RegisterEvents()
         {
             //Task线程内未捕获异常处理事件
-            TaskScheduler.UnobservedTaskException += TaskScheduler_UnobservedTaskException;
+            //TaskScheduler.UnobservedTaskException += TaskScheduler_UnobservedTaskException;
 
             //UI线程未捕获异常处理事件(UI主线程)
             this.DispatcherUnhandledException += App_DispatcherUnhandledException;

+ 1 - 1
src/YSAI.Tool.Wpf/YSAI.Tool.Wpf.csproj

@@ -22,7 +22,7 @@
 		<PackageReference Include="YSAI.Beckhoff" Version="23.360.5691" />
 		<PackageReference Include="YSAI.DB" Version="23.360.5691" />
 		<PackageReference Include="YSAI.Kafka" Version="23.352.38022" />
-		<PackageReference Include="YSAI.Mewtocol" Version="23.360.5691" />
+		<PackageReference Include="YSAI.Mewtocol" Version="23.360.36511" />
 		<PackageReference Include="YSAI.Mitsubishi" Version="23.360.5691" />
 		<PackageReference Include="YSAI.Modbus" Version="23.360.5691" />
 		<PackageReference Include="YSAI.Mqtt" Version="23.360.30183" />