删除DeviceManager和V8类中未使用的字段,消除CS0414警告

This commit is contained in:
zqm
2025-10-29 16:57:35 +08:00
parent 5772b499d5
commit 80ae0c4023
2 changed files with 5 additions and 8 deletions

View File

@@ -191,7 +191,7 @@ namespace JoyD.Windows.CS.Toprie
// 重连间隔(毫秒)
private int _reconnectInterval = 2000;
// 重连尝试次数
private int _reconnectAttempts = 0;
// 最大重连尝试次数
public static int MaxReconnectAttempts = 5;
// 连接检查定时器
@@ -3188,7 +3188,6 @@ namespace JoyD.Windows.CS.Toprie
if (result)
{
_isConnected = true;
_reconnectAttempts = 0;
// 启动心跳检测和连接检查
StartHeartbeat();

View File

@@ -129,8 +129,7 @@ namespace JoyD.Windows.CS.Toprie
// 私有字段
private string deviceIp;
private Socket socket;
private bool isConnected = false;
private Socket socket = null;
private static bool isSdkInitialized = false;
private static Dictionary<string, V8> deviceInstances = new Dictionary<string, V8>();
@@ -157,10 +156,9 @@ namespace JoyD.Windows.CS.Toprie
if (socket != null)
{
socket.Close();
socket = null;
}
isConnected = false;
Console.WriteLine("UDP通信状态已重置");
socket = null;
}
Console.WriteLine("UDP通信状态已重置");
}
catch (Exception ex)
{