优化
This commit is contained in:
@@ -68,7 +68,7 @@ namespace 头罩视野.Services
|
||||
break;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
catch (Exception )
|
||||
{
|
||||
|
||||
}
|
||||
@@ -107,7 +107,11 @@ namespace 头罩视野.Services
|
||||
break;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
//catch (Exception ex)
|
||||
//{
|
||||
|
||||
//}
|
||||
catch (Exception )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -87,7 +87,6 @@ namespace 头罩视野.Views
|
||||
private void Button_Click_ResUp(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
((Button)sender).ReleaseMouseCapture();
|
||||
_isPressing = false;
|
||||
System.Diagnostics.Debug.WriteLine("end1111");
|
||||
|
||||
}
|
||||
@@ -252,7 +251,7 @@ namespace 头罩视野.Views
|
||||
try
|
||||
{
|
||||
ushort[] registers = await Task.Run(async () =>
|
||||
await _modbusMaster?.ReadHoldingRegistersAsync(1, (ushort)address, (ushort)length)
|
||||
await _modbusMaster!.ReadHoldingRegistersAsync(1, (ushort)address, (ushort)length)
|
||||
);
|
||||
|
||||
if (registers != null && registers.Length >= 2)
|
||||
@@ -278,7 +277,7 @@ namespace 头罩视野.Views
|
||||
try
|
||||
{
|
||||
ushort[] registers = await Task.Run(async () =>
|
||||
await _modbusMaster?.ReadHoldingRegistersAsync(1, (ushort)address, (ushort)length)
|
||||
await _modbusMaster!.ReadHoldingRegistersAsync(1, (ushort)address, (ushort)length)
|
||||
);
|
||||
|
||||
if (registers != null && registers.Length >= 2)
|
||||
@@ -324,7 +323,7 @@ namespace 头罩视野.Views
|
||||
try
|
||||
{
|
||||
ushort[] registers = await Task.Run(async () =>
|
||||
await _modbusMaster?.ReadHoldingRegistersAsync(1, (ushort)address, (ushort)length)
|
||||
await _modbusMaster!.ReadHoldingRegistersAsync(1, (ushort)address, (ushort)length)
|
||||
);
|
||||
|
||||
if (registers != null && registers.Length >= 2)
|
||||
|
||||
Reference in New Issue
Block a user