配置文件添加是否有冰箱抽屉,home页面根据该值显示与隐藏 查看冰箱温度按钮
This commit is contained in:
parent
07db386649
commit
ad5f4d86bb
|
@ -57,6 +57,10 @@
|
||||||
<add key="CanBusPortPath" value="COM3" />
|
<add key="CanBusPortPath" value="COM3" />
|
||||||
<!-- 条码枪串口的串口号 -->
|
<!-- 条码枪串口的串口号 -->
|
||||||
<add key="ScanCodePortPath" value="COM8" />
|
<add key="ScanCodePortPath" value="COM8" />
|
||||||
|
|
||||||
|
|
||||||
|
<!--是否有冰箱抽屉0无1有-->
|
||||||
|
<add key="hasFridge" value="1"/>
|
||||||
<!-- 冰箱的串口号 -->
|
<!-- 冰箱的串口号 -->
|
||||||
<add key="FridgePortPath" value="COM7" />
|
<add key="FridgePortPath" value="COM7" />
|
||||||
|
|
||||||
|
@ -80,7 +84,6 @@
|
||||||
<add key="AlarmState2" value="0"/>
|
<add key="AlarmState2" value="0"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- 抽屉串口的串口号 --><!--
|
<!-- 抽屉串口的串口号 --><!--
|
||||||
<add key="DrawerPortPath" value="COM11" />
|
<add key="DrawerPortPath" value="COM11" />
|
||||||
--><!-- can总线串口的串口号 --><!--
|
--><!-- can总线串口的串口号 --><!--
|
||||||
|
|
|
@ -94,19 +94,6 @@ namespace DM_Weight.Converter
|
||||||
{
|
{
|
||||||
return "计数回收(外置)";
|
return "计数回收(外置)";
|
||||||
}
|
}
|
||||||
case 35:
|
|
||||||
if (DrawerType == 1)
|
|
||||||
{
|
|
||||||
return "药盒智能显示";
|
|
||||||
}
|
|
||||||
else if (DrawerType == 2)
|
|
||||||
{
|
|
||||||
return "药盒智能显示回收(内置)";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return "药盒智能显示回收(外置)";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,6 +43,11 @@ namespace DM_Weight.ViewModels
|
||||||
public string WD { get => _wd; set => SetProperty(ref _wd, value); }
|
public string WD { get => _wd; set => SetProperty(ref _wd, value); }
|
||||||
System.Timers.Timer WDTimer;
|
System.Timers.Timer WDTimer;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否有冰箱抽屉
|
||||||
|
/// </summary>
|
||||||
|
private string hasFridge= ConfigurationManager.AppSettings["hasFridge"].ToString().Equals("1")? "Visible" : "Collapsed";
|
||||||
|
public string HasFridge { get => hasFridge; set => SetProperty(ref hasFridge,value); }
|
||||||
|
|
||||||
private int loginMode = Convert.ToInt32(ConfigurationManager.AppSettings["loginMode"]?.ToString() ?? "1");
|
private int loginMode = Convert.ToInt32(ConfigurationManager.AppSettings["loginMode"]?.ToString() ?? "1");
|
||||||
public bool MultiLogin
|
public bool MultiLogin
|
||||||
|
|
|
@ -452,9 +452,8 @@ namespace DM_Weight.ViewModels
|
||||||
if (f.Data)
|
if (f.Data)
|
||||||
{
|
{
|
||||||
// 更新屏显库存
|
// 更新屏显库存
|
||||||
List<ChannelStock> singleChannels = record.FindAll(it => it.BoardType != 1);
|
List<ChannelStock> singleChannels = record.FindAll(it => it.BoardType == 5);
|
||||||
//if ((singleChannels.Count > 0 ? singleChannels[0].BoardType : 1) == 5)
|
if ((singleChannels.Count > 0 ? singleChannels[0].BoardType : 1) == 5)
|
||||||
if ((singleChannels.Count > 0 ? singleChannels[0].BoardType : 1).ToString().Contains("5"))
|
|
||||||
{
|
{
|
||||||
singleChannels.ForEach(it =>
|
singleChannels.ForEach(it =>
|
||||||
{
|
{
|
||||||
|
|
|
@ -119,7 +119,7 @@
|
||||||
<StackPanel Margin="6" Orientation="Horizontal" HorizontalAlignment="Right">
|
<StackPanel Margin="6" Orientation="Horizontal" HorizontalAlignment="Right">
|
||||||
<Button Content="储物箱" Command="{Binding OpenRecoverCommand}" Visibility="{Binding Is16Drawer, Converter={StaticResource BooleanToVisibilityConverter}}" Style="{StaticResource MaterialDesignFlatSecondaryLightButton}" />
|
<Button Content="储物箱" Command="{Binding OpenRecoverCommand}" Visibility="{Binding Is16Drawer, Converter={StaticResource BooleanToVisibilityConverter}}" Style="{StaticResource MaterialDesignFlatSecondaryLightButton}" />
|
||||||
<!--<TextBlock Margin="0,10,10,0" Text="{Binding WD}" Foreground="White" FontWeight="Bold" FontSize="14"/>-->
|
<!--<TextBlock Margin="0,10,10,0" Text="{Binding WD}" Foreground="White" FontWeight="Bold" FontSize="14"/>-->
|
||||||
<Button Content="查看冰箱温度" Command="{Binding CheckWDCommand}" Style="{StaticResource MaterialDesignFlatSecondaryLightButton}"/>
|
<Button Content="查看冰箱温度" Visibility="{Binding HasFridge}" Command="{Binding CheckWDCommand}" Style="{StaticResource MaterialDesignFlatSecondaryLightButton}"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue