Commit 57a29c0d authored by 潘栩锋's avatar 潘栩锋 🚴

Merge remote-tracking branch 'origin/dev6.0' into dev6.0_360

parents 4b688551 21ae28ec
...@@ -108,9 +108,8 @@ namespace FLY.OBJComponents.Common ...@@ -108,9 +108,8 @@ namespace FLY.OBJComponents.Common
/// </summary> /// </summary>
public struct ERRNO public struct ERRNO
{ {
public byte Code; public UInt16 Code;
public string Descrption; public string Descrption;
public bool OffIsError;
} }
public static class PlcErrNos public static class PlcErrNos
...@@ -118,6 +117,6 @@ namespace FLY.OBJComponents.Common ...@@ -118,6 +117,6 @@ namespace FLY.OBJComponents.Common
/// <summary> /// <summary>
/// PLC连接断开 /// PLC连接断开
/// </summary> /// </summary>
public static ERRNO ERRNO_PLC_DISCONNECTED = new ERRNO() { Code = 255, Descrption = "PLC连接断开" }; public static ERRNO ERRNO_PLC_DISCONNECTED = new ERRNO() { Code = 65535, Descrption = "PLC连接断开" };
} }
} }
...@@ -108,10 +108,10 @@ namespace FLY.OBJComponents.Server ...@@ -108,10 +108,10 @@ namespace FLY.OBJComponents.Server
ERR_STATE state = b ? ERR_STATE.ON : ERR_STATE.OFF; ERR_STATE state = b ? ERR_STATE.ON : ERR_STATE.OFF;
ERRNO errno = PlcErrNos.ERRNO_PLC_DISCONNECTED; ERRNO errno = PlcErrNos.ERRNO_PLC_DISCONNECTED;
byte errcode = (byte)(errno.Code - i); UInt16 errcode = (UInt16)(errno.Code - i);
string description; string description;
if (PLCos.PLCs.Count() > 1) if (PLCos.PLCs.Count() > 1)
description = $"{plcName} No.{i} " + errno.Descrption; description = $"{plcName} No.{i+1} " + errno.Descrption;
else else
description = $"{plcName} " + errno.Descrption; description = $"{plcName} " + errno.Descrption;
...@@ -154,7 +154,7 @@ namespace FLY.OBJComponents.Server ...@@ -154,7 +154,7 @@ namespace FLY.OBJComponents.Server
public void ResetError(INotifyPropertyChanged sender) public void ResetError(INotifyPropertyChanged sender)
{ {
var type = sender.GetType(); var type = sender.GetType();
foreach (var ei in obj_error[sender as INotifyPropertyChanged].error_property) foreach (var ei in obj_error[sender].error_property)
{ {
var property = type.GetProperty(ei.property); var property = type.GetProperty(ei.property);
property.SetValue(sender, false); property.SetValue(sender, false);
......
...@@ -75,17 +75,7 @@ ...@@ -75,17 +75,7 @@
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
<StackPanel Grid.Column="1" Orientation="Horizontal" VerticalAlignment="Center" >
<Button Style="{StaticResource buttonStyle}" Click="button_silence_click" Foreground="#FFEE3232">
<StackPanel >
<Grid Style="{StaticResource GridStyle_ButtonShadow}">
<Ellipse Style="{StaticResource backPackStyle}" Fill="White"/>
<iconPacks:PackIconMaterial Kind="VolumeMute" Style="{StaticResource iconPackStyle}" />
</Grid>
<TextBlock Text="消音" Style="{StaticResource titlePackStyle}"/>
</StackPanel>
</Button>
</StackPanel>
</Grid> </Grid>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment