@@ -65,12 +65,6 @@ namespace BPASmartClient.IoT | |||
/// 大屏上报Model | |||
/// </summary> | |||
public DataVAPI.Tool.IOT.IOTDevSXModel iOTDevSXModel = new DataVAPI.Tool.IOT.IOTDevSXModel() { }; | |||
/// <summary> | |||
/// 广播 | |||
/// </summary> | |||
//public string PubTopic = "/broadcast/" + "grgpECHSL7q" + "/" + "Transit_SetDevice"; | |||
//public string PubTopic = "/broadcast/" + "grgpECHSL7q" + "/" + "Transit_Test_SetDevice"; | |||
/// <summary> | |||
/// key值 | |||
/// </summary> | |||
@@ -369,6 +369,10 @@ namespace BPASmartDatavDeviceClient.IoT | |||
/// </summary> | |||
public string BroadcastTopic = "/broadcast/" + "grgpECHSL7q" + "/" + DeviceName + "_SetDevice"; | |||
/// <summary> | |||
/// 文件上床Topic | |||
/// </summary> | |||
public string FileUpLoadTopic = $"/sys/{ProductKey}/{DeviceName}/thing/file/upload/mqtt/init"; | |||
/// <summary> | |||
/// 订阅主题集合 | |||
/// </summary> | |||
public static List<string> SubTopicList = new List<string>(); | |||
@@ -66,30 +66,30 @@ namespace DataVAPI.Tool.IOT | |||
/// </summary> | |||
public class IOTDevSXModel | |||
{ | |||
/// <summary> | |||
/// 硬件状态 | |||
/// </summary> | |||
public string HardwareStatus { get; set; } | |||
/// <summary> | |||
/// 扩展属性 | |||
/// </summary> | |||
public string KZSX { get; set; } | |||
/// <summary> | |||
/// 基本属性 | |||
/// </summary> | |||
public string JBSX { get; set; } | |||
///// <summary> | |||
///// 硬件状态 | |||
///// </summary> | |||
//public string HardwareStatus { get; set; } | |||
///// <summary> | |||
///// 扩展属性 | |||
///// </summary> | |||
//public string KZSX { get; set; } | |||
///// <summary> | |||
///// 基本属性 | |||
///// </summary> | |||
//public string JBSX { get; set; } | |||
/// <summary> | |||
/// 节点状态 | |||
/// </summary> | |||
public string NodeStatus { get; set; } | |||
/// <summary> | |||
/// 运行日志 | |||
/// </summary> | |||
public string SZXX { get; set; } | |||
/// <summary> | |||
/// 运行告警 | |||
/// </summary> | |||
public string GJXX { get; set; } | |||
///// <summary> | |||
///// 运行日志 | |||
///// </summary> | |||
//public string SZXX { get; set; } | |||
///// <summary> | |||
///// 运行告警 | |||
///// </summary> | |||
//public string GJXX { get; set; } | |||
/// <summary> | |||
/// Model | |||
/// </summary> | |||
@@ -114,87 +114,87 @@ namespace DataVAPI.Tool.IOT | |||
return string.Empty; | |||
} | |||
} | |||
/// <summary> | |||
/// 设置基本属性 | |||
/// </summary> | |||
/// <param name="devSX"></param> | |||
/// <returns></returns> | |||
public void SetJBSX(DevSX devSX) | |||
{ | |||
try | |||
{ | |||
JBSX = Tools.JsonConvertTools(devSX); | |||
} | |||
catch (Exception ex) | |||
{ | |||
JBSX = string.Empty; | |||
} | |||
} | |||
/// <summary> | |||
/// 设置基本属性状态 | |||
/// </summary> | |||
/// <param name="devSX"></param> | |||
/// <returns></returns> | |||
public void SetJBSXStatus(DevSXBase sXBase, bool Status) | |||
{ | |||
try | |||
{ | |||
if (sXBase == null) return; | |||
DevSX dev = Tools.JsonToObjectTools<DevSX>(JBSX); | |||
dev.data?.ForEach(x => | |||
{ | |||
if (x.SXMC == sXBase.SXMC && x.SXLX == sXBase.SXLX) | |||
{ | |||
x.SXStatus = Status; | |||
} | |||
}); | |||
JBSX = Tools.JsonConvertTools(dev); | |||
} | |||
catch (Exception ex) | |||
{ | |||
JBSX = string.Empty; | |||
} | |||
} | |||
/// <summary> | |||
/// 设置扩展属性 | |||
/// </summary> | |||
/// <param name="devSX"></param> | |||
public void SetKZSX(DevSX devSX) | |||
{ | |||
try | |||
{ | |||
KZSX = Tools.JsonConvertTools(devSX); | |||
} | |||
catch (Exception ex) | |||
{ | |||
KZSX = string.Empty; | |||
} | |||
} | |||
/// <summary> | |||
/// 设置扩展属性状态 | |||
/// </summary> | |||
/// <param name="devSX"></param> | |||
/// <returns></returns> | |||
public void SetKZSXStatus(DevSXBase sXBase, bool Status) | |||
{ | |||
try | |||
{ | |||
if (sXBase == null) return; | |||
DevSX dev = Tools.JsonToObjectTools<DevSX>(KZSX); | |||
dev.data?.ForEach(x => | |||
{ | |||
if (x.SXMC == sXBase.SXMC && x.SXLX == sXBase.SXLX) | |||
{ | |||
x.SXStatus = Status; | |||
} | |||
}); | |||
KZSX = Tools.JsonConvertTools(dev); | |||
} | |||
catch (Exception ex) | |||
{ | |||
KZSX = string.Empty; | |||
} | |||
} | |||
///// <summary> | |||
///// 设置基本属性 | |||
///// </summary> | |||
///// <param name="devSX"></param> | |||
///// <returns></returns> | |||
//public void SetJBSX(DevSX devSX) | |||
//{ | |||
// try | |||
// { | |||
// JBSX = Tools.JsonConvertTools(devSX); | |||
// } | |||
// catch (Exception ex) | |||
// { | |||
// JBSX = string.Empty; | |||
// } | |||
//} | |||
///// <summary> | |||
///// 设置基本属性状态 | |||
///// </summary> | |||
///// <param name="devSX"></param> | |||
///// <returns></returns> | |||
//public void SetJBSXStatus(DevSXBase sXBase, bool Status) | |||
//{ | |||
// try | |||
// { | |||
// if (sXBase == null) return; | |||
// DevSX dev = Tools.JsonToObjectTools<DevSX>(JBSX); | |||
// dev.data?.ForEach(x => | |||
// { | |||
// if (x.SXMC == sXBase.SXMC && x.SXLX == sXBase.SXLX) | |||
// { | |||
// x.SXStatus = Status; | |||
// } | |||
// }); | |||
// JBSX = Tools.JsonConvertTools(dev); | |||
// } | |||
// catch (Exception ex) | |||
// { | |||
// JBSX = string.Empty; | |||
// } | |||
//} | |||
///// <summary> | |||
///// 设置扩展属性 | |||
///// </summary> | |||
///// <param name="devSX"></param> | |||
//public void SetKZSX(DevSX devSX) | |||
//{ | |||
// try | |||
// { | |||
// KZSX = Tools.JsonConvertTools(devSX); | |||
// } | |||
// catch (Exception ex) | |||
// { | |||
// KZSX = string.Empty; | |||
// } | |||
//} | |||
///// <summary> | |||
///// 设置扩展属性状态 | |||
///// </summary> | |||
///// <param name="devSX"></param> | |||
///// <returns></returns> | |||
//public void SetKZSXStatus(DevSXBase sXBase, bool Status) | |||
//{ | |||
// try | |||
// { | |||
// if (sXBase == null) return; | |||
// DevSX dev = Tools.JsonToObjectTools<DevSX>(KZSX); | |||
// dev.data?.ForEach(x => | |||
// { | |||
// if (x.SXMC == sXBase.SXMC && x.SXLX == sXBase.SXLX) | |||
// { | |||
// x.SXStatus = Status; | |||
// } | |||
// }); | |||
// KZSX = Tools.JsonConvertTools(dev); | |||
// } | |||
// catch (Exception ex) | |||
// { | |||
// KZSX = string.Empty; | |||
// } | |||
//} | |||
} | |||
/// <summary> | |||
/// 告警消息 | |||
@@ -35,79 +35,51 @@ | |||
<RowDefinition Height="8*" /> | |||
<RowDefinition Height="20*" /> | |||
</Grid.RowDefinitions> | |||
<TextBlock | |||
Margin="20" | |||
HorizontalAlignment="Right" | |||
VerticalAlignment="Bottom" | |||
Style="{StaticResource TxLogin}" | |||
Text="账号:" /> | |||
<TextBlock | |||
Grid.Row="1" | |||
Margin="20" | |||
HorizontalAlignment="Right" | |||
VerticalAlignment="Top" | |||
Style="{StaticResource TxLogin}" | |||
Text="密码:" /> | |||
<TextBox | |||
x:Name="tbx_admin" | |||
Grid.Row="0" | |||
Grid.Column="1" | |||
Width="180" | |||
Height="28" | |||
Margin="20" | |||
HorizontalAlignment="Left" | |||
VerticalAlignment="Bottom" | |||
HorizontalContentAlignment="Center" | |||
VerticalContentAlignment="Top" | |||
Background="Transparent" | |||
BorderBrush="White" | |||
BorderThickness="0,0,0,1" | |||
FontSize="20" | |||
Foreground="#F8F8FF" | |||
GotFocus="TextBox_GotFocus" | |||
Text="{Binding Admin, Mode=TwoWay}" /> | |||
<PasswordBox | |||
x:Name="password" | |||
Grid.Row="1" | |||
Grid.Column="1" | |||
Width="180" | |||
Margin="20" | |||
HorizontalAlignment="Left" | |||
VerticalAlignment="Top" | |||
HorizontalContentAlignment="Center" | |||
VerticalContentAlignment="Top" | |||
helper:PasswordBoxHelper.PasswordContent="{Binding Password, Mode=TwoWay}" | |||
Background="Transparent" | |||
BorderBrush="White" | |||
BorderThickness="0,0,0,1" | |||
CaretBrush="White" | |||
FontSize="20" | |||
Foreground="#F8F8FF" | |||
GotFocus="Password_GotFocus" /> | |||
<TextBlock | |||
Grid.Row="2" | |||
Grid.ColumnSpan="2" | |||
HorizontalAlignment="Center" | |||
VerticalAlignment="Top" | |||
FontFamily="楷体" | |||
FontSize="16" | |||
Foreground="#FFE2415C" | |||
Text="{Binding ErrorMessage}" | |||
TextWrapping="Wrap" /> | |||
<Button | |||
Grid.Row="3" | |||
Grid.ColumnSpan="2" | |||
Width="120" | |||
Height="40" | |||
VerticalAlignment="Top" | |||
Background="Transparent" | |||
BorderBrush="#ff19b7ec" | |||
BorderThickness="2" | |||
Command="{Binding AdminLoginCommand}" | |||
Content="登 录" | |||
FontSize="28" | |||
Foreground="#9934F7F7" | |||
IsDefault="True" /> | |||
<TextBlock Text="账号:" | |||
VerticalAlignment="Bottom" HorizontalAlignment="Right" | |||
Margin="20" | |||
Style="{StaticResource TxLogin}" | |||
/> | |||
<TextBlock Text="密码:" Grid.Row="1" | |||
VerticalAlignment="Top" HorizontalAlignment="Right" | |||
Margin="20" | |||
Style="{StaticResource TxLogin}"/> | |||
<TextBox x:Name="tbx_admin" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" | |||
Text="{Binding Admin, Mode=TwoWay}" | |||
Foreground="#F8F8FF" FontSize="20" | |||
Width="180" Height="28" | |||
VerticalAlignment="Bottom" HorizontalAlignment="Center" | |||
VerticalContentAlignment="Top" HorizontalContentAlignment="Center" | |||
Margin="20" | |||
Background="Transparent" | |||
BorderBrush="White" BorderThickness="0,0,0,1" | |||
GotFocus="TextBox_GotFocus"> | |||
</TextBox> | |||
<PasswordBox x:Name="password" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" | |||
FontSize="20" Foreground="#F8F8FF" | |||
Width="180" Margin="20" | |||
Background="Transparent" | |||
VerticalAlignment="Top" HorizontalAlignment="Center" | |||
VerticalContentAlignment="Top" HorizontalContentAlignment="Center" | |||
BorderBrush="White" BorderThickness="0,0,0,1" CaretBrush="White" | |||
helper:PasswordBoxHelper.PasswordContent="{Binding Password ,Mode=TwoWay}" | |||
GotFocus="Password_GotFocus"/> | |||
<TextBlock Text="{Binding ErrorMessage}" | |||
Grid.Row="2" Grid.ColumnSpan="2" | |||
VerticalAlignment="Top" HorizontalAlignment="Center" | |||
FontFamily="楷体" | |||
FontSize="16" | |||
Foreground="#FFE2415C" | |||
TextWrapping="Wrap" /> | |||
<Button Grid.Row="3" Grid.ColumnSpan="2" | |||
FontSize="28" Foreground="#9934F7F7" | |||
Width="120" Height="40" | |||
Background="Transparent" | |||
VerticalAlignment="Top" | |||
BorderBrush="#ff19b7ec" BorderThickness="2" | |||
Content="登 录" | |||
Command="{Binding AdminLoginCommand}" IsDefault="True"/> | |||
<uc:UserKeyBoard | |||
x:Name="myKeyboard" | |||