|
- <UserControl
- x:Class="BPASmartClient.FoodStationTest.View.ManualControlView"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:BPASmartClient.FoodStationTest.View"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:pry="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
- xmlns:vm="clr-namespace:BPASmartClient.FoodStationTest.ViewModel"
- d:DesignHeight="850"
- d:DesignWidth="1200"
- mc:Ignorable="d">
-
- <UserControl.Resources>
- <Style x:Key="radioButtonStyle" TargetType="RadioButton">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="RadioButton">
- <Grid Name="gr" Opacity="0.8">
- <ContentControl
- Margin="{TemplateBinding Margin}"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- HorizontalContentAlignment="Center"
- VerticalContentAlignment="Center"
- Content="{TemplateBinding Content}"
- FontSize="{TemplateBinding FontSize}"
- Foreground="{TemplateBinding Foreground}" />
- <Image
- Name="image"
- Source="/BPASmartClient.CustomResource;component/Image/边框线.png"
- Stretch="Fill" />
-
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="IsChecked" Value="False">
- <Setter TargetName="image" Property="Source" Value="/BPASmartClient.CustomResource;component/Image/边框线.png" />
- </Trigger>
- <Trigger Property="IsChecked" Value="True">
- <Setter TargetName="image" Property="Source" Value="/BPASmartClient.CustomResource;component/Image/透明背景.png" />
- </Trigger>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter TargetName="gr" Property="Opacity" Value="1" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- </UserControl.Resources>
-
- <UserControl.DataContext>
- <vm:ManualControlViewModel />
- </UserControl.DataContext>
-
- <Grid Margin="8">
- <Grid.RowDefinitions>
- <RowDefinition Height="2*" />
- <RowDefinition Height="2*" />
- <RowDefinition Height="3*" />
- <RowDefinition Height="2*" />
- </Grid.RowDefinitions>
- <Grid
- Name="jiu"
- Grid.Row="0"
- Margin="5">
- <Grid.RowDefinitions>
- <RowDefinition Height="20" />
- <RowDefinition />
- </Grid.RowDefinitions>
- <pry:ImageBorder
- Grid.RowSpan="2"
- Width="{Binding ElementName=tp, Path=ActualWidth}"
- Height="{Binding ElementName=tp, Path=ActualHeight}" />
-
- <Image
- Margin="2,3,0,0"
- HorizontalAlignment="Left"
- Source="/BPASmartClient.CustomResource;component/Image/标签.png" />
- <TextBlock
- Margin="10,0,0,0"
- VerticalAlignment="Center"
- FontSize="16"
- Foreground="Aqua"
- Text="总控制" />
- <Grid Grid.Row="1">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="5*" />
- <ColumnDefinition Width="5*" />
- </Grid.ColumnDefinitions>
- <Grid Grid.Column="0">
- <Grid.RowDefinitions>
- <RowDefinition />
- <RowDefinition />
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
- <Grid>
- <WrapPanel HorizontalAlignment="Center" VerticalAlignment="Center">
- <TextBlock
- FontSize="24"
- Foreground="Aqua"
- Text="当前系统模式:" />
- <TextBlock
- FontSize="24"
- Foreground="Aqua"
- Text="{Binding SystemMode}" />
- </WrapPanel>
- </Grid>
- <Grid Grid.Row="1" Grid.Column="0">
- <WrapPanel HorizontalAlignment="Center" VerticalAlignment="Center">
- <TextBlock
- FontSize="24"
- Foreground="Aqua"
- Text="当前系统状态:" />
- <TextBlock
- FontSize="24"
- Foreground="Aqua"
- Text="{Binding SystemStatus}" />
- </WrapPanel>
- </Grid>
-
- <RadioButton
- Grid.Row="0"
- Grid.Column="1"
- Margin="15"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Command="{Binding AutoMode}"
- Content="Auto模式"
- FontSize="20"
- Foreground="Aqua"
- IsChecked="{Binding AutoModeStatus}" />
- <RadioButton
- Grid.Row="1"
- Grid.Column="1"
- Margin="15"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Command="{Binding DebugMode}"
- Content="Debug模式"
- FontSize="20"
- Foreground="Aqua"
- IsChecked="{Binding ManualMode}" />
- </Grid>
-
- <Grid Grid.Column="3">
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition />
- <ColumnDefinition />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
- <pry:IcoButton
- Grid.Column="0"
- Margin="5,30"
- Command="{Binding SystemStartCommand}"
- Content="启动"
- FontSize="40"
- Foreground="Aqua"
- Style="{StaticResource IcoButtonStyle}" />
- <pry:IcoButton
- Grid.Column="1"
- Margin="5,30"
- Command="{Binding SystemStopCommand}"
- Content="停止"
- FontSize="40"
- Foreground="Aqua"
- Style="{StaticResource IcoButtonStyle}" />
- <pry:IcoButton
- Grid.Column="2"
- Margin="5,30"
- Command="{Binding SystemPauseCommand}"
- Content="暂停"
- FontSize="40"
- Foreground="Aqua"
- Style="{StaticResource IcoButtonStyle}" />
- <pry:IcoButton
- Grid.Column="3"
- Margin="5,30"
- Command="{Binding SystemResetCommand}"
- Content="恢复"
- FontSize="40"
- Foreground="Aqua"
- Style="{StaticResource IcoButtonStyle}" />
- </Grid>
- </Grid>
- </Grid>
- <Grid
- Name="zd"
- Grid.Row="1"
- Margin="5">
- <Grid.RowDefinitions>
- <RowDefinition Height="40" />
- <RowDefinition />
- </Grid.RowDefinitions>
- <pry:ImageBorder
- Grid.RowSpan="2"
- Width="{Binding ElementName=zd, Path=ActualWidth}"
- Height="{Binding ElementName=zd, Path=ActualHeight}" />
-
- <Image
- Margin="2,3,0,0"
- HorizontalAlignment="Left"
- Source="/BPASmartClient.CustomResource;component/Image/标签.png" />
- <TextBlock
- Margin="10,0,0,0"
- VerticalAlignment="Center"
- FontSize="16"
- Foreground="Aqua"
- Text="线体控制" />
- <Grid Grid.Row="1">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="1*" />
- <ColumnDefinition Width="1*" />
- <ColumnDefinition Width="1*" />
- <ColumnDefinition Width="1*" />
- <ColumnDefinition Width="1*" />
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition />
- </Grid.RowDefinitions>
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition />
- <RowDefinition />
- </Grid.RowDefinitions>
- <TextBlock
- Grid.ColumnSpan="2"
- Margin="0,0,0,0"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="16"
- Foreground="Aqua"
- Text="进桶侧调速电机" />
- <pry:IcoButton
- Grid.Row="1"
- Grid.Column="0"
- Margin="10"
- Command="{Binding StartAxisLoadCommand}"
- Content="启动"
- FontSize="16"
- Foreground="Aqua"
- Style="{StaticResource IcoButtonStyle}" />
- <pry:IcoButton
- Grid.Row="1"
- Grid.Column="1"
- Margin="10"
- Command="{Binding StopAxisLoadCommand}"
- Content="停止"
- FontSize="16"
- Foreground="Aqua"
- Style="{StaticResource IcoButtonStyle}" />
- </Grid>
-
-
- <Border BorderThickness="1,0,1,0" />
- <Grid Grid.Column="1">
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition />
- <RowDefinition />
- </Grid.RowDefinitions>
- <TextBlock
- Grid.ColumnSpan="2"
- Margin="0,0,0,0"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="16"
- Foreground="Aqua"
- Text="过渡段调速电机" />
- <pry:IcoButton
- Grid.Row="1"
- Grid.Column="0"
- Margin="10"
- Command="{Binding StartAxisMidCommand}"
- Content="启动"
- FontSize="16"
- Foreground="Aqua"
- Style="{StaticResource IcoButtonStyle}" />
- <pry:IcoButton
- Grid.Row="1"
- Grid.Column="1"
- Margin="10"
- Command="{Binding StopAxisMidCommand}"
- Content="停止"
- FontSize="16"
- Foreground="Aqua"
- Style="{StaticResource IcoButtonStyle}" />
- </Grid>
- <Grid Grid.Column="2">
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition />
- <RowDefinition />
- </Grid.RowDefinitions>
- <TextBlock
- Grid.ColumnSpan="2"
- Margin="0,0,0,0"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="16"
- Foreground="Aqua"
- Text="出桶侧调速电机" />
- <pry:IcoButton
- Grid.Row="1"
- Grid.Column="0"
- Margin="10"
- Command="{Binding StartAxisUnLoadCommand}"
- Content="启动"
- FontSize="16"
- Foreground="Aqua"
- Style="{StaticResource IcoButtonStyle}" />
- <pry:IcoButton
- Grid.Row="1"
- Grid.Column="1"
- Margin="10"
- Command="{Binding StopAxisUnLoadCommand}"
- Content="停止"
- FontSize="16"
- Foreground="Aqua"
- Style="{StaticResource IcoButtonStyle}" />
- </Grid>
- <Border BorderThickness="1,0,1,0" />
- <Grid Grid.Column="3">
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition />
- <RowDefinition />
- </Grid.RowDefinitions>
- <TextBlock
- Grid.ColumnSpan="2"
- Margin="0,0,0,0"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="16"
- Foreground="Aqua"
- Text="伺服1调速电机" />
- <pry:IcoButton
- Grid.Row="1"
- Grid.Column="0"
- Margin="10"
- Command="{Binding StartAxis1Command}"
- Content="启动"
- FontSize="16"
- Foreground="Aqua"
- Style="{StaticResource IcoButtonStyle}" />
- <pry:IcoButton
- Grid.Row="1"
- Grid.Column="1"
- Margin="10"
- Command="{Binding StopAxis1Command}"
- Content="停止"
- FontSize="16"
- Foreground="Aqua"
- Style="{StaticResource IcoButtonStyle}" />
- </Grid>
- <Grid Grid.Column="4">
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition />
- <RowDefinition />
- </Grid.RowDefinitions>
- <TextBlock
- Grid.ColumnSpan="2"
- Margin="0,0,0,0"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="16"
- Foreground="Aqua"
- Text="伺服2调速电机" />
- <pry:IcoButton
- Grid.Row="1"
- Grid.Column="0"
- Margin="10"
- Command="{Binding StartAxis2Command}"
- Content="启动"
- FontSize="16"
- Foreground="Aqua"
- Style="{StaticResource IcoButtonStyle}" />
- <pry:IcoButton
- Grid.Row="1"
- Grid.Column="1"
- Margin="10"
- Command="{Binding StopAxis2Command}"
- Content="停止"
- FontSize="16"
- Foreground="Aqua"
- Style="{StaticResource IcoButtonStyle}" />
- </Grid>
- </Grid>
- </Grid>
- <!--#region 升降气缸-->
- <Grid
- Name="cy"
- Grid.Row="2"
- Margin="5">
- <Grid.RowDefinitions>
- <RowDefinition Height="40" />
- <RowDefinition />
- </Grid.RowDefinitions>
- <pry:ImageBorder
- Grid.RowSpan="2"
- Width="{Binding ElementName=cy, Path=ActualWidth}"
- Height="{Binding ElementName=cy, Path=ActualHeight}" />
-
- <Image
- Margin="2,3,0,0"
- HorizontalAlignment="Left"
- Source="/BPASmartClient.CustomResource;component/Image/标签.png" />
- <TextBlock
- Margin="10,0,0,0"
- VerticalAlignment="Center"
- FontSize="16"
- Foreground="Aqua"
- Text="升降气缸控制" />
- <ListView VerticalAlignment="Center"
- Grid.Row="1"
- Background="Transparent"
- BorderBrush="#00BEFA"
- BorderThickness="0"
- ItemsSource="{Binding cylinderModels}"
- ScrollViewer.HorizontalScrollBarVisibility="Disabled">
- <ListView.ItemsPanel>
- <ItemsPanelTemplate>
- <UniformGrid
- HorizontalAlignment="Left"
- VerticalAlignment="Top"
- Columns="8" />
- </ItemsPanelTemplate>
- </ListView.ItemsPanel>
-
- <ListView.ItemTemplate>
- <DataTemplate>
- <Grid
- Width="200"
- Height="100"
- Margin="0,0,0,15"
- Background="Transparent">
- <Grid.RowDefinitions>
- <RowDefinition Height="30" />
- <RowDefinition />
- <RowDefinition Height="30" />
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="0.5*" />
- <ColumnDefinition />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
-
- <TextBlock
- Grid.Column="1"
- Grid.ColumnSpan="2"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Foreground="Aqua"
- Text="{Binding Name}" />
-
- <pry:Cylinder
- Grid.Row="1"
- Grid.ColumnSpan="3"
- Width="200"
- Height="50"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- LeftTogIsChecked="{Binding LeftTog}"
- RightTogIsChecked="{Binding RightTog}" />
-
- <RadioButton
- Grid.Row="2"
- Grid.Column="1"
- Command="{Binding DataContext.Open, RelativeSource={RelativeSource AncestorType=ListView, Mode=FindAncestor}}"
- CommandParameter="{Binding Name}"
- Content="伸出"
- Foreground="Aqua"
- IsChecked="True"
- Style="{StaticResource radioButtonStyle}" />
-
- <RadioButton
- Grid.Row="2"
- Grid.Column="2"
- Command="{Binding DataContext.Close, RelativeSource={RelativeSource AncestorType=ListView, Mode=FindAncestor}}"
- CommandParameter="{Binding Name}"
- Content="缩回"
- Foreground="Aqua"
- IsChecked="False"
- Style="{StaticResource radioButtonStyle}" />
- </Grid>
- </DataTemplate>
- </ListView.ItemTemplate>
- </ListView>
- </Grid>
- <!--#endregion-->
-
- <!--#region 阻挡气缸-->
-
- <!--#endregion-->
-
- <!--#region 托盘气缸-->
- <Grid
- Name="tp"
- Grid.Row="3"
- Margin="5">
- <Grid.RowDefinitions>
- <RowDefinition Height="40" />
- <RowDefinition />
- </Grid.RowDefinitions>
- <pry:ImageBorder
- Grid.RowSpan="2"
- Width="{Binding ElementName=tp, Path=ActualWidth}"
- Height="{Binding ElementName=tp, Path=ActualHeight}" />
-
- <Image
- Margin="2,3,0,0"
- HorizontalAlignment="Left"
- Source="/BPASmartClient.CustomResource;component/Image/标签.png" />
- <TextBlock
- Margin="10,0,0,0"
- VerticalAlignment="Center"
- FontSize="16"
- Foreground="Aqua"
- Text="托盘气缸控制" />
- <ListView
- Grid.Row="2"
- Margin="10"
- Background="Transparent"
- BorderBrush="#00BEFA"
- BorderThickness="0"
- ItemsSource="{Binding PalletCylinders}"
- ScrollViewer.HorizontalScrollBarVisibility="Disabled">
- <ListView.ItemsPanel>
- <ItemsPanelTemplate>
- <UniformGrid
- HorizontalAlignment="Left"
- VerticalAlignment="Top"
- Columns="8" />
- </ItemsPanelTemplate>
- </ListView.ItemsPanel>
-
- <ListView.ItemTemplate>
- <DataTemplate>
- <Grid
- Width="200"
- Height="100"
- Margin="0,0,0,15"
- Background="Transparent">
- <Grid.RowDefinitions>
- <RowDefinition Height="30" />
- <RowDefinition />
- <RowDefinition Height="30" />
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="0.5*" />
- <ColumnDefinition />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
-
- <TextBlock
- Grid.Column="1"
- Grid.ColumnSpan="2"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Foreground="Aqua"
- Text="{Binding Name}" />
-
- <pry:Cylinder
- Grid.Row="1"
- Grid.ColumnSpan="3"
- Width="200"
- Height="50"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- LeftTogIsChecked="{Binding LeftTog}"
- RightTogIsChecked="{Binding RightTog}" />
-
- <RadioButton
- Grid.Row="2"
- Grid.Column="1"
- Command="{Binding DataContext.Open, RelativeSource={RelativeSource AncestorType=ListView, Mode=FindAncestor}}"
- CommandParameter="{Binding Name}"
- Content="伸出"
- Foreground="Aqua"
- IsChecked="True"
- Style="{StaticResource radioButtonStyle}" />
-
- <RadioButton
- Grid.Row="2"
- Grid.Column="2"
- Command="{Binding DataContext.Close, RelativeSource={RelativeSource AncestorType=ListView, Mode=FindAncestor}}"
- CommandParameter="{Binding Name}"
- Content="缩回"
- Foreground="Aqua"
- IsChecked="False"
- Style="{StaticResource radioButtonStyle}" />
- </Grid>
- </DataTemplate>
- </ListView.ItemTemplate>
- </ListView>
- </Grid>
- <!--#endregion-->
-
-
-
-
-
-
-
-
- </Grid>
- </UserControl>
|