|
- <UserControl
- x:Class="BPASmartClient.DosingSystem.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.DosingSystem.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.DosingSystem.ViewModel"
- d:DesignHeight="450"
- d:DesignWidth="800"
- 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>
- <ScrollViewer>
- <StackPanel Margin="8">
-
- <!--#region 升降气缸-->
- <Grid
- Name="cy"
- Grid.Row="0"
- Margin="5">
- <pry:ImageBorder
- Grid.RowSpan="2"
- Width="{Binding ElementName=cy, Path=ActualWidth}"
- Height="{Binding ElementName=cy, Path=ActualHeight}" />
-
- <StackPanel Background="Transparent">
- <Grid Height="40">
- <Image
- Margin="2,3,0,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Top"
- Source="/BPASmartClient.CustomResource;component/Image/标签.png" />
- <TextBlock
- Margin="10,10,0,0"
- VerticalAlignment="Top"
- FontSize="16"
- Foreground="Aqua"
- Text="升降气缸控制" />
- </Grid>
- <ListView
- Name="list1"
- Grid.Row="1"
- Margin="0,0,0,20"
- Background="Transparent"
- BorderBrush="#00BEFA"
- BorderThickness="0"
- ItemsSource="{Binding cylinderModels}"
- ScrollViewer.HorizontalScrollBarVisibility="Disabled">
- <ListView.ItemsPanel>
- <ItemsPanelTemplate>
- <WrapPanel Orientation="Horizontal" />
- </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>
- </StackPanel>
- </Grid>
- <!--#endregion-->
-
- <!--#region 阻挡气缸-->
- <Grid
- Name="zd"
- Grid.Row="1"
- Margin="5">
- <pry:ImageBorder Width="{Binding ElementName=zd, Path=ActualWidth}" Height="{Binding ElementName=zd, Path=ActualHeight}" />
- <StackPanel>
- <Grid Height="40">
- <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>
- <ListView
- Name="list2"
- Grid.Row="1"
- Margin="0,0,0,20"
- Background="Transparent"
- BorderBrush="#00BEFA"
- BorderThickness="0"
- ItemsSource="{Binding BlockCylinders}"
- ScrollViewer.HorizontalScrollBarVisibility="Disabled">
- <ListView.ItemsPanel>
- <ItemsPanelTemplate>
- <WrapPanel Orientation="Horizontal" />
- </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>
- </StackPanel>
-
-
- </Grid>
- <!--#endregion-->
-
- <!--#region 托盘气缸-->
- <Grid
- Name="tp"
- Grid.Row="2"
- Margin="5">
- <pry:ImageBorder
- Grid.RowSpan="2"
- Width="{Binding ElementName=tp, Path=ActualWidth}"
- Height="{Binding ElementName=tp, Path=ActualHeight}" />
- <StackPanel>
- <Grid Height="40">
- <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>
- <ListView
- Name="list3"
- Grid.Row="2"
- Margin="0,0,0,20"
- Background="Transparent"
- BorderBrush="#00BEFA"
- BorderThickness="0"
- ItemsSource="{Binding PalletCylinders}"
- ScrollViewer.HorizontalScrollBarVisibility="Disabled">
- <ListView.ItemsPanel>
- <ItemsPanelTemplate>
- <WrapPanel Orientation="Horizontal" />
- </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>
- </StackPanel>
-
-
- </Grid>
- <!--#endregion-->
-
- </StackPanel>
- </ScrollViewer>
- </UserControl>
|