|
- <UserControl
- x:Class="BPASmartClient.JXJFoodSmallStation.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.JXJFoodSmallStation.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.JXJFoodSmallStation.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="6*"/>
- <ColumnDefinition Width="4*"/>
- </Grid.ColumnDefinitions>
- <WrapPanel VerticalAlignment="Center" HorizontalAlignment="Center" >
- <TextBlock Margin="0,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Center"
- FontSize="24" Foreground="Aqua" Text="当前系统模式:"/>
- <RadioButton Content="Auto模式" IsChecked="True" Margin="15" FontSize="16"
- Foreground="Aqua" Command="{Binding AutoMode}"></RadioButton>
- <RadioButton Content="Debug模式" IsChecked="false" Margin="15" FontSize="16"
- Foreground="Aqua" Command="{Binding DebugMode}"></RadioButton>
- </WrapPanel>
- <Grid
- Grid.Column="3" >
- <Grid.ColumnDefinitions>
- <ColumnDefinition></ColumnDefinition>
- <ColumnDefinition></ColumnDefinition>
- <ColumnDefinition></ColumnDefinition>
- <ColumnDefinition></ColumnDefinition>
- </Grid.ColumnDefinitions>
- <pry:IcoButton
- Command="{Binding SystemStartCommand}"
- Grid.Column="0"
- Margin="5,30"
- Content="启动"
- FontSize="40"
- Foreground="Aqua"
- Style="{StaticResource IcoButtonStyle}" />
- <pry:IcoButton
- Command="{Binding SystemStopCommand}"
- Grid.Column="1"
- Margin="5,30"
- Content="停止"
- FontSize="40"
- Foreground="Aqua"
- Style="{StaticResource IcoButtonStyle}" />
- <pry:IcoButton
- Command="{Binding SystemPauseCommand}"
- Grid.Column="2"
- Margin="5,30"
- Content="暂停"
- FontSize="40"
- Foreground="Aqua"
- Style="{StaticResource IcoButtonStyle}" />
- <pry:IcoButton
- Command="{Binding SystemResetCommand}"
- Grid.Column="3"
- Margin="5,30"
- 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>
- <ColumnDefinition Width="1*"></ColumnDefinition>
- <ColumnDefinition Width="1*"></ColumnDefinition>
- <ColumnDefinition Width="1*"></ColumnDefinition>
- <ColumnDefinition Width="1*"></ColumnDefinition>
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition></RowDefinition>
- </Grid.RowDefinitions>
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition></ColumnDefinition>
- <ColumnDefinition></ColumnDefinition>
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition></RowDefinition>
- <RowDefinition></RowDefinition>
- </Grid.RowDefinitions>
- <TextBlock Grid.ColumnSpan="2" Margin="0,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Center"
- FontSize="16" Foreground="Aqua" Text="进桶侧调速电机"/>
- <pry:IcoButton
- Margin="10"
- Grid.Row="1"
- Grid.Column="0"
- Command="{Binding StartCommand}"
- CommandParameter="{Binding }"
- Content="启动"
- FontSize="16"
- Foreground="Aqua"
- Style="{StaticResource IcoButtonStyle}" />
- <pry:IcoButton
- Grid.Row="1"
- Grid.Column="1"
- Margin="10"
- Command="{Binding CloseCommand}"
- CommandParameter="{Binding }"
- Content="停止"
- FontSize="16"
- Foreground="Aqua"
- Style="{StaticResource IcoButtonStyle}" />
- </Grid>
-
-
- <Border
- BorderThickness="1,0,1,0" />
- <Grid Grid.Column="1">
- <Grid.ColumnDefinitions>
- <ColumnDefinition></ColumnDefinition>
- <ColumnDefinition></ColumnDefinition>
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition></RowDefinition>
- <RowDefinition></RowDefinition>
- </Grid.RowDefinitions>
- <TextBlock Grid.ColumnSpan="2" Margin="0,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Center"
- FontSize="16" Foreground="Aqua" Text="过渡段调速电机"/>
- <pry:IcoButton
- Margin="10"
- Grid.Row="1"
- Grid.Column="0"
- Command="{Binding StartCommand}"
- CommandParameter="{Binding }"
- Content="启动"
- FontSize="16"
- Foreground="Aqua"
- Style="{StaticResource IcoButtonStyle}" />
- <pry:IcoButton
- Grid.Row="1"
- Grid.Column="1"
- Margin="10"
- Command="{Binding StopCommand}"
- CommandParameter="{Binding }"
- Content="停止"
- FontSize="16"
- Foreground="Aqua"
- Style="{StaticResource IcoButtonStyle}" />
- </Grid>
- <Grid Grid.Column="2">
- <Grid.ColumnDefinitions>
- <ColumnDefinition></ColumnDefinition>
- <ColumnDefinition></ColumnDefinition>
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition></RowDefinition>
- <RowDefinition></RowDefinition>
- </Grid.RowDefinitions>
- <TextBlock Grid.ColumnSpan="2" Margin="0,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Center"
- FontSize="16" Foreground="Aqua" Text="出桶侧调速电机"/>
- <pry:IcoButton
- Margin="10"
- Grid.Row="1"
- Grid.Column="0"
- Command="{Binding StartCommand}"
- CommandParameter="{Binding }"
- Content="启动"
- FontSize="16"
- Foreground="Aqua"
- Style="{StaticResource IcoButtonStyle}" />
- <pry:IcoButton
- Grid.Row="1"
- Grid.Column="1"
- Margin="10"
- Command="{Binding CloseCommand}"
- CommandParameter="{Binding }"
- Content="停止"
- FontSize="16"
- Foreground="Aqua"
- Style="{StaticResource IcoButtonStyle}" />
- </Grid>
- <Border
- BorderThickness="1,0,1,0" />
- <Grid Grid.Column="3">
- <Grid.ColumnDefinitions>
- <ColumnDefinition></ColumnDefinition>
- <ColumnDefinition></ColumnDefinition>
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition></RowDefinition>
- <RowDefinition></RowDefinition>
- </Grid.RowDefinitions>
- <TextBlock Grid.ColumnSpan="2" Margin="0,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Center"
- FontSize="16" Foreground="Aqua" Text="伺服1调速电机"/>
- <pry:IcoButton
- Margin="10"
- Grid.Row="1"
- Grid.Column="0"
- Command="{Binding StartCommand}"
- CommandParameter="{Binding }"
- Content="启动"
- FontSize="16"
- Foreground="Aqua"
- Style="{StaticResource IcoButtonStyle}" />
- <pry:IcoButton
- Grid.Row="1"
- Grid.Column="1"
- Margin="10"
- Command="{Binding CloseCommand}"
- CommandParameter="{Binding }"
- Content="停止"
- FontSize="16"
- Foreground="Aqua"
- Style="{StaticResource IcoButtonStyle}" />
- </Grid>
- <Grid Grid.Column="4">
- <Grid.ColumnDefinitions>
- <ColumnDefinition></ColumnDefinition>
- <ColumnDefinition></ColumnDefinition>
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition></RowDefinition>
- <RowDefinition></RowDefinition>
- </Grid.RowDefinitions>
- <TextBlock Grid.ColumnSpan="2" Margin="0,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Center"
- FontSize="16" Foreground="Aqua" Text="伺服2调速电机"/>
- <pry:IcoButton
- Margin="10"
- Grid.Row="1"
- Grid.Column="0"
- Command="{Binding StartCommand}"
- CommandParameter="{Binding }"
- Content="启动"
- FontSize="16"
- Foreground="Aqua"
- Style="{StaticResource IcoButtonStyle}" />
- <pry:IcoButton
- Grid.Row="1"
- Grid.Column="1"
- Margin="10"
- Command="{Binding CloseCommand}"
- CommandParameter="{Binding }"
- 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
- 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>
|