@@ -80,6 +80,7 @@ | |||||
<RowDefinition Height="50" /> | <RowDefinition Height="50" /> | ||||
<RowDefinition /> | <RowDefinition /> | ||||
</Grid.RowDefinitions> | </Grid.RowDefinitions> | ||||
<StackPanel Margin="0,10,0,0" Orientation="Horizontal"> | <StackPanel Margin="0,10,0,0" Orientation="Horizontal"> | ||||
<Button | <Button | ||||
Width="130" | Width="130" | ||||
@@ -95,8 +96,26 @@ | |||||
Content="冰淇淋模拟" | Content="冰淇淋模拟" | ||||
Style="{StaticResource ButtonStyle}" /> | Style="{StaticResource ButtonStyle}" /> | ||||
</StackPanel> | </StackPanel> | ||||
<StackPanel Grid.Row="1" Margin="0,10,0,0" Orientation="Vertical"> | |||||
<Grid HorizontalAlignment="Left"> | |||||
<Grid.ColumnDefinitions> | |||||
<ColumnDefinition></ColumnDefinition> | |||||
<ColumnDefinition Width="80"></ColumnDefinition> | |||||
<ColumnDefinition></ColumnDefinition> | |||||
<ColumnDefinition Width="80"></ColumnDefinition> | |||||
<ColumnDefinition></ColumnDefinition> | |||||
<ColumnDefinition Width="80"></ColumnDefinition> | |||||
</Grid.ColumnDefinitions> | |||||
<TextBlock>机器人连接状态</TextBlock> | |||||
<TextBlock Grid.Column="1" Text="{Binding RobotConnected}"></TextBlock> | |||||
<TextBlock Grid.Column="2">冰淇淋机连接状态</TextBlock> | |||||
<TextBlock Grid.Column="3" Text="{Binding IceCreamConnected}"></TextBlock> | |||||
<TextBlock Grid.Column="4">咖啡机连接状态</TextBlock> | |||||
<TextBlock Grid.Column="5" Text="{Binding CoffeeConnected}"></TextBlock> | |||||
</Grid> | |||||
</StackPanel> | |||||
</Grid> | </Grid> | ||||
</GroupBox> | </GroupBox> | ||||
<!--#endregion--> | <!--#endregion--> | ||||
@@ -1,4 +1,5 @@ | |||||
using BPA.Utility; | using BPA.Utility; | ||||
using HBLConsole.Communication; | |||||
using HBLConsole.Service; | using HBLConsole.Service; | ||||
using HBLDevice.Coffee; | using HBLDevice.Coffee; | ||||
using HBLDevice.IceCream; | using HBLDevice.IceCream; | ||||
@@ -15,6 +16,10 @@ namespace HBLConsole.Debug | |||||
[AddINotifyPropertyChangedInterface] | [AddINotifyPropertyChangedInterface] | ||||
internal class ViewModel_MORKIC | internal class ViewModel_MORKIC | ||||
{ | { | ||||
public string RobotConnected { get; set; } | |||||
public string IceCreamConnected { get; set; } | |||||
public string CoffeeConnected { get; set; } | |||||
#region 咖啡机 | #region 咖啡机 | ||||
/// <summary> | /// <summary> | ||||
/// 咖啡机状态 | /// 咖啡机状态 | ||||
@@ -102,6 +107,12 @@ namespace HBLConsole.Debug | |||||
ThreadOperate.GetInstance.StartLong(new Action(() => | ThreadOperate.GetInstance.StartLong(new Action(() => | ||||
{ | { | ||||
RobotConnected = LebaiHelper.GetInstance.IsConnected?"已连接":"未连接"; | |||||
IceCreamConnected = MorkIStatus.GetInstance().CanDo?"已连接":"未连接"; | |||||
CoffeeConnected = MorkCStatus.GetInstance().CanDo ? "已连接": "未连接"; | |||||
CoffeeStatus = MorkCStatus.GetInstance().CoffeeStatus; | CoffeeStatus = MorkCStatus.GetInstance().CoffeeStatus; | ||||
AppStatus = MorkCStatus.GetInstance().AppStatus; | AppStatus = MorkCStatus.GetInstance().AppStatus; | ||||
Warning = MorkCStatus.GetInstance().Warning; | Warning = MorkCStatus.GetInstance().Warning; | ||||