<UserControl x:Class="BPASmartClient.MorkT.View.Monitor"
             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:BPASmartClient.MorkT.View"
             xmlns:vm="clr-namespace:BPASmartClient.MorkT.ViewModel"
             mc:Ignorable="d" 
             Name="监控画面"
             d:DesignHeight="450" d:DesignWidth="800" Unloaded="Monitor_Unloaded">
    <UserControl.DataContext>
        <vm:MonitorViewModel/>
    </UserControl.DataContext>
    <UserControl.Resources>
        <ResourceDictionary >
            <vm:BoolToColorConvert x:Key="BoolToColorConvert"/>
            <Style x:Key="tx_Status" TargetType="TextBlock">
                <Setter Property="FontFamily" Value="/BPASmartClient.CustomResource;component/Fonts/Debug/#iconfont"/>
                <Setter Property="FontSize" Value="26"/>
                <Setter Property="Text" Value="&#xea6b;"/>
                <Setter Property="VerticalAlignment" Value="Center"/>
                <Setter Property="HorizontalAlignment" Value="Left"/>
            </Style>
        </ResourceDictionary>
        
        
    </UserControl.Resources>
    <Grid Margin="10,0">
        <Grid.ColumnDefinitions>

        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <GroupBox Header="传感器状态"
                  FontSize="20" Foreground="#40e8ff"
                  BorderThickness="0">
            <Grid Margin="20,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="3*"/>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="3*"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <TextBlock Text="机器人夹爪处检测传感器" 
                           FontSize="18"
                           VerticalAlignment="Center"/>
                <TextBlock Text="冰淇淋出料口传感器" 
                           Grid.Row="1"
                           FontSize="18"
                           VerticalAlignment="Center"/>
                <TextBlock Text="取餐口传感器" 
                           Grid.Row="2"
                           FontSize="18"
                           VerticalAlignment="Center"/>
                <TextBlock Grid.Row="0" Grid.Column="1"
                    Style="{StaticResource tx_Status}" 
                           Foreground="{Binding RobotSenser,Converter={StaticResource BoolToColorConvert }}"/>
                <TextBlock Grid.Row="1" Grid.Column="1"
                    Style="{StaticResource tx_Status}"
                           Foreground="{Binding IceCreamSenser,Converter={StaticResource BoolToColorConvert }}"/>
                <TextBlock Grid.Row="2" Grid.Column="1"
                    Style="{StaticResource tx_Status}"
                           Foreground="{Binding TakeMealSenser,Converter={StaticResource BoolToColorConvert}}"/>
            </Grid>
        </GroupBox>
    </Grid>
</UserControl>
