修复多个未使用字段和变量的编译器警告
This commit is contained in:
@@ -190,8 +190,6 @@ namespace JoyD.Windows.CS.Toprie
|
|||||||
private System.Threading.Timer _reconnectTimer;
|
private System.Threading.Timer _reconnectTimer;
|
||||||
// 重连间隔(毫秒)
|
// 重连间隔(毫秒)
|
||||||
private int _reconnectInterval = 2000;
|
private int _reconnectInterval = 2000;
|
||||||
// 重连尝试次数
|
|
||||||
private int _reconnectAttempts = 0;
|
|
||||||
// 最大重连尝试次数
|
// 最大重连尝试次数
|
||||||
public static int MaxReconnectAttempts = 5;
|
public static int MaxReconnectAttempts = 5;
|
||||||
// 连接检查定时器
|
// 连接检查定时器
|
||||||
@@ -210,12 +208,7 @@ namespace JoyD.Windows.CS.Toprie
|
|||||||
private const int DataReceivedTimeout = 15000; // 15秒内未收到数据则认为连接可能断开
|
private const int DataReceivedTimeout = 15000; // 15秒内未收到数据则认为连接可能断开
|
||||||
// TCP客户端
|
// TCP客户端
|
||||||
// 该变量已在文件上方定义,删除重复实现
|
// 该变量已在文件上方定义,删除重复实现
|
||||||
// 网络流
|
|
||||||
private NetworkStream _imageNetworkStream;
|
|
||||||
// 图像接收任务
|
|
||||||
private Task _imageReceivingTask;
|
|
||||||
// 取消令牌源
|
|
||||||
private CancellationTokenSource _imageReceivingCts;
|
|
||||||
// 停止请求事件
|
// 停止请求事件
|
||||||
private ManualResetEvent _stopRequested = new ManualResetEvent(false);
|
private ManualResetEvent _stopRequested = new ManualResetEvent(false);
|
||||||
// 缓冲区
|
// 缓冲区
|
||||||
@@ -1597,7 +1590,6 @@ namespace JoyD.Windows.CS.Toprie
|
|||||||
}
|
}
|
||||||
|
|
||||||
Log("开始使用HTTP方式接收图像数据");
|
Log("开始使用HTTP方式接收图像数据");
|
||||||
bool existed = false;
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// 确保之前的连接已关闭
|
// 确保之前的连接已关闭
|
||||||
|
|||||||
@@ -130,14 +130,12 @@ namespace JoyD.Windows.CS.Toprie
|
|||||||
// 私有字段
|
// 私有字段
|
||||||
private string deviceIp;
|
private string deviceIp;
|
||||||
private Socket socket;
|
private Socket socket;
|
||||||
private bool isConnected;
|
|
||||||
private static bool isSdkInitialized = false;
|
private static bool isSdkInitialized = false;
|
||||||
private static Dictionary<string, V8> deviceInstances = new Dictionary<string, V8>();
|
private static Dictionary<string, V8> deviceInstances = new Dictionary<string, V8>();
|
||||||
|
|
||||||
public V8(string ip)
|
public V8(string ip)
|
||||||
{
|
{
|
||||||
deviceIp = ip;
|
deviceIp = ip;
|
||||||
isConnected = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
~V8()
|
~V8()
|
||||||
|
|||||||
Reference in New Issue
Block a user