|
- <UserControl x:Class="BPASmartClient.MorkT_BarCounter.View.DebugView"
- 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:vm="clr-namespace:BPASmartClient.MorkT_BarCounter.ViewModel"
- mc:Ignorable="d"
- Name="调试界面"
- d:DesignHeight="500" d:DesignWidth="1000" Unloaded="Dubug_Unloaded">
- <UserControl.DataContext>
- <vm:DebugViewModel/>
- </UserControl.DataContext>
- <UserControl.Resources>
- <ResourceDictionary>
- <ResourceDictionary.MergedDictionaries>
- <ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/GenricStyle.xaml" />
- <ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/MyStyle.xaml" />
- </ResourceDictionary.MergedDictionaries>
- </ResourceDictionary>
- </UserControl.Resources>
- <Grid Grid.ColumnSpan="2">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="10*"/>
- <ColumnDefinition Width="10*"/>
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition Height="10*"/>
- <RowDefinition Height="10*"/>
- <RowDefinition Height="15*"/>
- </Grid.RowDefinitions>
- <Border BorderThickness="0,0,1,1" BorderBrush="DodgerBlue" Grid.Row="0" Grid.Column="0"></Border>
- <Border BorderThickness="0,0,1,1" BorderBrush="DodgerBlue" Grid.Row="1" Grid.Column="0"></Border>
- <Border BorderThickness="0,0,1,0" BorderBrush="DodgerBlue" Grid.Row="2" Grid.Column="0"></Border>
- <Border BorderThickness="0,0,0,1" BorderBrush="DodgerBlue" Grid.Row="0" Grid.Column="1"></Border>
- <Border BorderThickness="0,0,0,1" BorderBrush="DodgerBlue" Grid.Row="1" Grid.Column="1"></Border>
- <Border BorderThickness="0,0,0,0" BorderBrush="DodgerBlue" Grid.Row="2" Grid.Column="1"></Border>
- <GroupBox Grid.Row="0" Grid.Column="0"
- FontFamily="楷体"
- FontSize="20"
- Header=" 乐白机器人 ">
-
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition></ColumnDefinition>
- <ColumnDefinition></ColumnDefinition>
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition Height="1*"/>
- <RowDefinition Height="1*"/>
- <RowDefinition Height="1*"/>
- </Grid.RowDefinitions>
- <Grid Grid.Row="0">
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="连接状态:" />
- <TextBlock Text="{Binding RobotConnected}"
- Margin="40,0"/>
- </StackPanel>
- </Grid>
- <Grid Grid.Row="1">
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="当前模式:" Margin="0,1"/>
- <TextBlock Text="{Binding RobotMode}"
- Margin="40,0"/>
- </StackPanel>
- </Grid>
- <Grid Grid.Row="2">
- <DockPanel>
- <Button Content="启动" Width="50" Height="40"
- Command="{Binding Button_RobotControlCommand}"
- CommandParameter="机器人启动">
- </Button>
- <Button Content="暂停" Width="50" Height="40"
- Command="{Binding Button_RobotControlCommand}"
- CommandParameter="暂停"/>
- <Button Content="恢复" Width="50" Height="40"
- Command="{Binding Button_RobotControlCommand}"
- CommandParameter="恢复"/>
- <Button Content="急停" Width="50" Height="40"
- Command="{Binding Button_RobotControlCommand}"
- CommandParameter="机器人急停"/>
- </DockPanel>
- </Grid>
- <Grid Grid.Row="0" Grid.Column="1" >
- <StackPanel Orientation="Horizontal" >
- <TextBlock>TCP DI:</TextBlock>
- <CheckBox IsEnabled="false" IsChecked="{Binding Robot_TCPDI0}" FontSize="14">DI0</CheckBox>
- </StackPanel>
- </Grid>
- <Grid Grid.Row="1" Grid.Column="1" >
- <StackPanel Orientation="Horizontal" >
- <TextBlock>DI:</TextBlock>
- <CheckBox IsEnabled="false" Name="Robot_DI0" FontSize="14" IsChecked="{Binding Robot_DI0}">DI0</CheckBox>
- <CheckBox IsEnabled="false" Name="Robot_DI1" FontSize="14" IsChecked="{Binding Robot_DI1}">DI1</CheckBox>
- <CheckBox IsEnabled="false" Name="Robot_DI2" FontSize="14" IsChecked="{Binding Robot_DI2}">DI2</CheckBox>
- <CheckBox IsEnabled="false" Name="Robot_DI3" FontSize="14" IsChecked="{Binding Robot_DI3}">DI3</CheckBox>
- </StackPanel>
- </Grid>
- <Grid Grid.Row="2" Grid.Column="1">
- <StackPanel Orientation="Horizontal" >
- <TextBlock>DO:</TextBlock>
- <ComboBox SelectedIndex="{Binding Robot_DOutput_Pin}">
- <ComboBoxItem IsSelected="true">DO0</ComboBoxItem>
- <ComboBoxItem>DO1</ComboBoxItem>
- <ComboBoxItem>DO2</ComboBoxItem>
- <ComboBoxItem>DO3</ComboBoxItem>
- </ComboBox>
- <ComboBox SelectedIndex="{Binding Robot_DOutput_Value}">
- <ComboBoxItem IsSelected="true">true</ComboBoxItem>
- <ComboBoxItem>false</ComboBoxItem>
- </ComboBox>
- <Button Content="输出" Command="{Binding Robot_DOutput}"/>
- </StackPanel>
-
- </Grid>
- </Grid>
- </GroupBox>
- <GroupBox Grid.Row="1" Grid.Column="0"
- Header="单片机控制"
- FontSize="18"
- FontFamily="楷体">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition></RowDefinition>
- <RowDefinition></RowDefinition>
- <RowDefinition></RowDefinition>
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition></ColumnDefinition>
- </Grid.ColumnDefinitions>
- <Grid Grid.Row="0">
- <StackPanel Orientation="Horizontal">
- <TextBlock >连接状态:</TextBlock>
- <TextBlock Text="{Binding MCUConnected}" />
- </StackPanel>
- </Grid>
- <Grid Grid.Row="1">
- <StackPanel Orientation="Horizontal">
- <TextBlock FontSize="12">DI:</TextBlock>
- <CheckBox FontSize="12" IsEnabled="false" IsChecked="{Binding CH0}">DI0</CheckBox>
- <CheckBox FontSize="12" IsEnabled="false" Name="CH1">DI1</CheckBox>
- <CheckBox FontSize="12" IsEnabled="false" Name="CH2">DI2</CheckBox>
- <CheckBox FontSize="12" IsEnabled="false" Name="CH3">DI3</CheckBox>
- <CheckBox FontSize="12" IsEnabled="false" Name="CH4">DI4</CheckBox>
- <CheckBox FontSize="12" IsEnabled="false" Name="CH5">DI5</CheckBox>
- <CheckBox FontSize="12" IsEnabled="false" Name="CH6">DI6</CheckBox>
- <CheckBox FontSize="12" IsEnabled="false" Name="CH7">DI7</CheckBox>
- </StackPanel>
- </Grid>
- <Grid Grid.Row="2" Grid.Column="0">
- <Grid.ColumnDefinitions>
- <ColumnDefinition></ColumnDefinition>
- <ColumnDefinition></ColumnDefinition>
- </Grid.ColumnDefinitions>
- <Grid Grid.Column="0">
- <StackPanel Orientation="Horizontal">
- <TextBlock FontSize="12" HorizontalAlignment="Center">DO输出</TextBlock>
- <ComboBox Width="50" FontSize="12" HorizontalAlignment="Center" SelectedIndex="{Binding MCU_DO_CH}">
- <ComboBoxItem IsSelected="true">DO0</ComboBoxItem>
- <ComboBoxItem>DO1</ComboBoxItem>
- <ComboBoxItem>DO2</ComboBoxItem>
- <ComboBoxItem>DO3</ComboBoxItem>
- <ComboBoxItem>DO4</ComboBoxItem>
- <ComboBoxItem>DO5</ComboBoxItem>
- <ComboBoxItem>DO6</ComboBoxItem>
- <ComboBoxItem>DO7</ComboBoxItem>
- </ComboBox>
- <ComboBox FontSize="12" HorizontalAlignment="Center" SelectedIndex="{Binding MCU_DO_CH}">
- <ComboBoxItem IsSelected="true">True</ComboBoxItem>
- <ComboBoxItem>False</ComboBoxItem>
- </ComboBox>
- <Button Width="50" Command="{Binding Button_MCUDOuputCommand}">输出</Button>
- </StackPanel>
- </Grid>
- <Grid Grid.Column="1">
- <StackPanel Orientation="Horizontal">
- <TextBlock FontSize="12" HorizontalAlignment="Center">舵机控制</TextBlock>
- <ComboBox Margin="0,0,0,0" FontSize="12" Width="60" SelectedIndex="{Binding MCU_PWM_CH}">
- <ComboBoxItem IsSelected="true">舵机1</ComboBoxItem>
- <ComboBoxItem>舵机2</ComboBoxItem>
- <ComboBoxItem>舵机3</ComboBoxItem>
- <ComboBoxItem>舵机4</ComboBoxItem>
- </ComboBox>
- <TextBox Width="50" Text="{Binding PWMInputNumber}"></TextBox>
- <Button FontSize="15" HorizontalAlignment="Center" Command="{Binding Button_MCUOuputCommand}">输出</Button>
- </StackPanel>
- </Grid>
- </Grid>
- </Grid>
- </GroupBox>
- <GroupBox Grid.Row="2" Grid.Column="0"
- FontFamily="楷体"
- FontSize="20"
- Header=" 果汁机 ">
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="2*"/>
- <ColumnDefinition Width="5*"/>
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition Height="3*"/>
- <RowDefinition Height="3*"/>
- <RowDefinition Height="3*"/>
- </Grid.RowDefinitions>
- <Grid>
- <TextBlock Text="连接状态:" />
- </Grid>
- <Grid Grid.Column="1">
- <TextBlock Text="{Binding JuicerConnected}"
- Margin="120,0,0,0"/>
- </Grid>
- <Grid Grid.Row="1">
- <TextBlock Text="设备状态:" />
- </Grid>
- <Grid Grid.Column="1" Grid.Row="1">
- <StackPanel Orientation="Horizontal" >
- <Button IsEnabled="False" Command="{Binding JuiceState_Heating}" >制热</Button>
- <Button IsEnabled="False" Command="{Binding JuiceState_Cooling}" >制冷</Button>
- <Button IsEnabled="False" Command="{Binding JuiceState_LackOfWater}" >缺水</Button>
- <Button IsEnabled="False" Command="{Binding JuiceState_ChildLocks}" >童锁</Button>
- <Button IsEnabled="False" Command="{Binding JuiceState_Using}" >使用</Button>
- </StackPanel>
- </Grid>
- <Grid Grid.Row="2">
- <TextBlock>果汁:</TextBlock>
- </Grid>
- <Grid Grid.Column="1" Grid.Row="2">
- <StackPanel Orientation="Horizontal">
- <ComboBox SelectedItem="{Binding MakeJuice_Index}">
- <ComboBoxItem IsSelected="true">0</ComboBoxItem>
- <ComboBoxItem>1</ComboBoxItem>
- <ComboBoxItem>2</ComboBoxItem>
- <ComboBoxItem>3</ComboBoxItem>
- <ComboBoxItem>4</ComboBoxItem>
- <ComboBoxItem>5</ComboBoxItem>
- <ComboBoxItem>6</ComboBoxItem>
- <ComboBoxItem>7</ComboBoxItem>
- </ComboBox>
- <Button Command="{Binding Button_MakeJuiceCommand}" Content="制作" />
- </StackPanel>
- </Grid>
- </Grid>
- </GroupBox>
- <GroupBox Grid.Row="0" Grid.Column="1"
- Header="订单模拟"
- FontSize="18"
- FontFamily="楷体">
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition></ColumnDefinition>
- <ColumnDefinition></ColumnDefinition>
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition></RowDefinition>
- <RowDefinition></RowDefinition>
- </Grid.RowDefinitions>
- <Grid Grid.Row="0" Grid.Column="0">
- <StackPanel Orientation="Horizontal">
- <TextBlock>咖啡:</TextBlock>
- <ComboBox Margin="10,0"
- Width="100"
- ItemsSource="{Binding Coffees}"
- SelectedItem="{Binding SimOrderCoffeeList}" />
- <Button Command="{Binding SimOrderMakeCoffee}">制作</Button>
- </StackPanel>
- </Grid>
- <Grid Grid.Row="1" Grid.Column="0">
- <StackPanel Orientation="Horizontal">
- <TextBlock>果汁:</TextBlock>
- <ComboBox SelectedIndex="{Binding SimOrder_JuiceList}">
- <ComboBoxItem IsSelected="true" >饮品1</ComboBoxItem>
- <ComboBoxItem>饮品2</ComboBoxItem>
- <ComboBoxItem>饮品3</ComboBoxItem>
- <ComboBoxItem>饮品4</ComboBoxItem>
- </ComboBox>
- <ComboBox SelectedItem="{Binding SimOrder_JuiceMakeID}">
- <ComboBoxItem IsSelected="true">热饮</ComboBoxItem>
- <ComboBoxItem>常温</ComboBoxItem>
- <ComboBoxItem>冷饮</ComboBoxItem>
- </ComboBox>
- <Button Command="{Binding SimOrderMakeJuice}">制作</Button>
- </StackPanel>
- </Grid>
- <Grid Grid.Row="0" Grid.Column="1">
- <StackPanel Orientation="Horizontal">
- <TextBlock>开水:</TextBlock>
- <Button Command="{Binding SimOrderMakeWater}">制作</Button>
- </StackPanel>
- </Grid>
- <Grid Grid.Row="1" Grid.Column="1">
- <StackPanel Orientation="Horizontal">
- <TextBlock>茶水:</TextBlock>
- <Button Command="{Binding SimOrderMakeTea}">制作</Button>
- </StackPanel>
- </Grid>
- </Grid>
- </GroupBox>
- <GroupBox Grid.Row="1" Grid.Column="1"
- Header="制冰机控制"
- FontSize="18"
- FontFamily="楷体">
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition></ColumnDefinition>
- <ColumnDefinition></ColumnDefinition>
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition></RowDefinition>
- <RowDefinition></RowDefinition>
- <RowDefinition></RowDefinition>
- </Grid.RowDefinitions>
- <Grid Grid.Row="0">
- <StackPanel Orientation="Horizontal" >
- <TextBlock>连接状态:</TextBlock>
- <TextBlock Text="{Binding IceMakerConnected}" />
- </StackPanel>
- </Grid>
- <Grid Grid.Row="0" Grid.Column="1">
- <StackPanel Orientation="Horizontal">
- <Button Command="{Binding IceMaker_BtnPowerOn}">开机</Button>
- <Button Command="{Binding IceMaker_BtnStandby}">待机</Button>
- <Button Command="{Binding IceMaker_BtnPump}" >抽水</Button>
- </StackPanel>
- </Grid>
- <Grid Grid.Row="1" Grid.ColumnSpan="2">
- <StackPanel Orientation="Horizontal" >
- <TextBlock>设备状态:</TextBlock>
- <TextBlock Text="{Binding IceMakerState}" />
- <Button IsEnabled="False" Name="IceMaker_State1" >开机状态</Button>
- <Button IsEnabled="False" Name="IceMaker_State2" >待机状态</Button>
- <Button IsEnabled="False" Name="IceMaker_State3" >电机故障</Button>
- <Button IsEnabled="False" Name="IceMaker_State4" >冰满</Button>
- </StackPanel>
- </Grid>
- <Grid Grid.Row="2" Grid.Column="0">
- <StackPanel Orientation="Horizontal">
- <TextBlock>控制:</TextBlock>
- <Button Command="{Binding IceMaker_BtnStart}">开始出冰</Button>
- <Button Command="{Binding IceMaker_BtnEnd}">结束出冰</Button>
- </StackPanel>
- </Grid>
- <Grid Grid.Row="2" Grid.Column="01">
- <StackPanel Orientation="Horizontal" >
- <TextBlock>出冰时间:</TextBlock>
- <TextBox Width="50" Text="{Binding IceMaker_IceTime}"></TextBox>
- <TextBlock>s</TextBlock>
- <Button Command="{Binding IceMaker_BtnSetIceTime}">设置</Button>
- </StackPanel>
- </Grid>
- </Grid>
- </GroupBox>
- <GroupBox Grid.Row="2" Grid.Column="1"
- FontFamily="楷体"
- FontSize="20"
- Header=" 咖啡机">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition />
- <RowDefinition />
- <RowDefinition />
- <RowDefinition />
- <RowDefinition />
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition></ColumnDefinition>
- <ColumnDefinition></ColumnDefinition>
- </Grid.ColumnDefinitions>
- <Grid Grid.Row="0">
- <TextBlock Text="连接状态" />
- </Grid>
- <Grid Grid.Row="0" Grid.Column="1">
- <TextBlock Text="{Binding CoffeeConnected}"/>
- </Grid>
- <Grid Grid.Row="1" Grid.RowSpan="2" Grid.ColumnSpan="2">
- <Grid.Resources>
- <Style TargetType="TextBlock">
- <Setter Property="HorizontalAlignment" Value="Left" />
- <Setter Property="VerticalAlignment" Value="Center" />
- </Style>
- </Grid.Resources>
- <Grid.RowDefinitions>
- <RowDefinition />
- <RowDefinition />
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="2*" />
- <ColumnDefinition Width="3*" />
- <ColumnDefinition Width="2*" />
- <ColumnDefinition Width="3*" />
- </Grid.ColumnDefinitions>
- <TextBlock Height="23" Width="100" FontSize="18" HorizontalAlignment="Center">咖啡机状态</TextBlock>
- <TextBlock FontSize="18"
- Grid.Column="1"
- Text="{Binding CoffeeStatus}" Height="23" />
- <TextBlock Grid.Column="2" Height="23" Width="80" FontSize="18">应用状态</TextBlock>
- <TextBlock FontSize="18"
- Grid.Column="3"
- Text="{Binding AppStatus}" Height="23"/>
- <TextBlock Grid.Row="1" Grid.Column="0" Height="22" Width="80" FontSize="18">告警信息</TextBlock>
- <TextBlock FontSize="15"
- Grid.Row="1"
- Grid.Column="1"
- Text="{Binding Warning}" />
- <TextBlock Grid.Row="1" Grid.Column="2" Height="22" Width="80" FontSize="18">故障信息</TextBlock>
- <TextBlock FontSize="18"
- Grid.Row="1"
- Grid.Column="3"
- Text="{Binding CaffeeFault}" Height="22" Width="60" />
- </Grid>
- <Grid Grid.Row="3" Grid.ColumnSpan="2">
- <StackPanel Margin="0,10,0,0" Orientation="Horizontal">
- <TextBlock>饮品</TextBlock>
- <ComboBox Margin="10,0"
- Width="100"
- ItemsSource="{Binding Coffees}"
- SelectedItem="{Binding SelectedCoffee}" />
- <Button Margin="10,0"
- Command="{Binding Button_MakeCoffeeCommand }"
- Content="制作"/>
- <Button Margin="10,0"
- Command="{Binding Button_StopMakeCoffeCommand}"
- Content="停止制作"/>
- </StackPanel>
- </Grid>
- <Grid Grid.Row="4" Grid.ColumnSpan="2">
- <StackPanel Margin="0,10,0,0" Orientation="Horizontal">
- <TextBlock>模式</TextBlock>
- <ComboBox Margin="10,0"
- Width="100"
- ItemsSource="{Binding CoffeeCmds}"
- SelectedItem="{Binding SelectedCoffeeCmd}"/>
- <Button Margin="10,0"
- Command="{Binding Button_CoffeeModeSetCommand}"
- Content="设置" Cursor="Hand"/>
- </StackPanel>
- </Grid>
- </Grid>
- </GroupBox>
- </Grid>
- </UserControl>
|