<UserControl x:Class="HBLConsole.Debug.Debug_MORKIC"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:HBLConsole.Debug"
             mc:Ignorable="d" 
             xmlns:s="https://github.com/canton7/Stylet"
             d:DesignHeight="450" d:DesignWidth="800">
    <UserControl.DataContext>
        <local:ViewModel_MORKIC x:Name="vmode" />
    </UserControl.DataContext>

    <Grid>
        <Grid.Resources>
            <Style TargetType="TextBlock">
                <Setter Property="HorizontalAlignment" Value="Left" />
                <Setter Property="VerticalAlignment" Value="Center" />
            </Style>
        </Grid.Resources>
        <Grid.RowDefinitions>
            <RowDefinition></RowDefinition>
            <RowDefinition></RowDefinition>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition></ColumnDefinition>
            <ColumnDefinition></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <GroupBox Header="乐白" Grid.ColumnSpan="2"></GroupBox>
        <GroupBox Header="冰淇淋机" Grid.Row="1" Grid.Column="0">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition></RowDefinition>
                    <RowDefinition></RowDefinition>
                </Grid.RowDefinitions>
                <Grid >
                    <Grid.RowDefinitions>
                        <RowDefinition></RowDefinition>
                        <RowDefinition></RowDefinition>
                        <RowDefinition></RowDefinition>
                        <RowDefinition></RowDefinition>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="120"></ColumnDefinition>
                        <ColumnDefinition Width="100"></ColumnDefinition>
                        <ColumnDefinition Width="120"></ColumnDefinition>
                        <ColumnDefinition Width="100"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Row="0" Grid.Column="0">预冷温度</TextBlock>
                    <TextBlock Grid.Row="0" Grid.Column="1" Text="{Binding YLWD}"></TextBlock>
                    <TextBlock Grid.Row="0" Grid.Column="2">回气温度</TextBlock>
                    <TextBlock Grid.Row="0" Grid.Column="3" Text="{Binding HQWD}"></TextBlock>

                    <TextBlock Grid.Row="1" Grid.Column="0">环境温度</TextBlock>
                    <TextBlock Grid.Row="1" Grid.Column="1" Text="{Binding HJWD}"></TextBlock>
                    <TextBlock Grid.Row="1" Grid.Column="2">当前模式</TextBlock>
                    <TextBlock Grid.Row="1" Grid.Column="3" Text="{Binding CurrentMode}"></TextBlock>

                    <TextBlock Grid.Row="2" Grid.Column="0">电流</TextBlock>
                    <TextBlock Grid.Row="2" Grid.Column="1" Text="{Binding DL}"></TextBlock>
                    <TextBlock Grid.Row="2" Grid.Column="2">电压</TextBlock>
                    <TextBlock Grid.Row="2" Grid.Column="3" Text="{Binding DY}"></TextBlock>

                    <TextBlock Grid.Row="3" Grid.Column="0">成型比</TextBlock>
                    <TextBlock Grid.Row="3" Grid.Column="1" Text="{Binding CXB}"></TextBlock>
                    <TextBlock Grid.Row="3" Grid.Column="2">故障</TextBlock>
                    <TextBlock Grid.Row="3" Grid.Column="3" Text="{Binding IceCreamFault}"></TextBlock>
                </Grid>
                <StackPanel Grid.Row="1" Orientation="Vertical">
                    <StackPanel Orientation="Horizontal" Margin="0,10,0,0">
                        <TextBlock>饮品</TextBlock>
                        <Button Content="制作" s:View.ActionTarget="{Binding}"  Command="{s:Action MakeIceCream}" ></Button>
                    </StackPanel>
                    <StackPanel Orientation="Horizontal" Margin="0,10,0,0">
                        <TextBlock>模式</TextBlock>
                        <ComboBox Width="100" ItemsSource="{Binding IceCreamModes}" SelectedItem="{Binding SelecteIceCreamdMode}"></ComboBox>
                        <Button Content="设置" s:View.ActionTarget="{Binding}"  Command="{s:Action SetIceCreamModel}" ></Button>
                    </StackPanel>
                </StackPanel>
            </Grid>
        </GroupBox>
        <GroupBox Header="咖啡机" Grid.Row="1" Grid.Column="1">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition></RowDefinition>
                    <RowDefinition></RowDefinition>
                </Grid.RowDefinitions>
                <Grid >
                    <Grid.Resources>
                        <Style TargetType="TextBlock">
                            <Setter Property="HorizontalAlignment" Value="Left" />
                            <Setter Property="VerticalAlignment" Value="Center" />
                        </Style>
                    </Grid.Resources>
                    <Grid.RowDefinitions>
                        <RowDefinition></RowDefinition>
                        <RowDefinition></RowDefinition>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="120"></ColumnDefinition>
                        <ColumnDefinition Width="100"></ColumnDefinition>
                        <ColumnDefinition Width="120"></ColumnDefinition>
                        <ColumnDefinition Width="150"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Row="0" Grid.Column="0">咖啡机状态</TextBlock>
                    <TextBlock Grid.Row="0" Grid.Column="1" Text="{Binding CoffeeStatus}"></TextBlock>
                    <TextBlock Grid.Row="0" Grid.Column="2">应用状态</TextBlock>
                    <TextBlock Grid.Row="0" Grid.Column="3" Text="{Binding AppStatus}"></TextBlock>
                    <TextBlock Grid.Row="1" Grid.Column="0">告警信息</TextBlock>
                    <TextBlock Grid.Row="1" Grid.Column="1" Text="{Binding Warning}"></TextBlock>
                    <TextBlock Grid.Row="1" Grid.Column="2">故障信息</TextBlock>
                    <TextBlock Grid.Row="1" Grid.Column="3" Text="{Binding CaffeeFault}"></TextBlock>
                </Grid>
                <StackPanel Grid.Row="1" Orientation="Vertical">
                    <StackPanel Orientation="Horizontal" Margin="0,10,0,0">
                        <TextBlock>饮品</TextBlock>
                        <ComboBox Width="100" ItemsSource="{Binding Coffees}" SelectedItem="{Binding SelectedCoffee}"></ComboBox>
                        <Button Content="制作"  s:View.ActionTarget="{Binding}"  Command="{s:Action MakeCoffee}" ></Button>
                        <Button Content="停止制作" s:View.ActionTarget="{Binding}"  Command="{s:Action StopMakeCoffee}"></Button>
                    </StackPanel>
                    <StackPanel Orientation="Horizontal" Margin="0,10,0,0">
                        <TextBlock>模式</TextBlock>
                        <ComboBox Width="100" ItemsSource="{Binding CoffeeCmds}" SelectedItem="{Binding SelectedCoffeeCmd}"></ComboBox>
                        <Button Content="设置"  s:View.ActionTarget="{Binding}"  Command="{s:Action SetCoffeeModel}"></Button>
                    </StackPanel>
                </StackPanel>
            </Grid>

        </GroupBox>
    </Grid>
</UserControl>
