|
- <UserControl
- x:Class="BPASmartClient.DosingSystemSingle.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.DosingSystemSingle.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.DosingSystemSingle.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>
-
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="40" />
- <RowDefinition />
- </Grid.RowDefinitions>
-
- <StackPanel
- Margin="0,0,10,0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- Orientation="Horizontal">
-
- <ToggleButton
- Width="100"
- Height="30"
- Margin="5,0,5,0"
- Background="Transparent"
- Command="{Binding SystemStart}"
- Content="{Binding SystemControlText}"
- FontSize="20"
- Style="{StaticResource SwitchToggleButtonStyle1}" />
-
- <ToggleButton
- Width="100"
- Height="30"
- Margin="5,0,5,0"
- Background="Transparent"
- Command="{Binding ModelSwitch}"
- Content="{Binding ModelSwitchText}"
- FontSize="20"
- Style="{StaticResource SwitchToggleButtonStyle1}" />
-
- <!--<Button
- Width="150"
- Height="40"
- Margin="10,0,10,0"
- Command="{Binding SystemStart}"
- Content="{Binding SystemControlText}"
- FontSize="20"
- Style="{StaticResource ImageButtonStyle}" />
-
- <Button
- Width="150"
- Height="40"
- Margin="10,0,10,0"
- Command="{Binding ModelSwitch}"
- Content="{Binding ModelSwitchText}"
- FontSize="20"
- Style="{StaticResource ImageButtonStyle}" />-->
-
- </StackPanel>
-
- <ScrollViewer
- Grid.Row="1"
- HorizontalScrollBarVisibility="Disabled"
- VerticalScrollBarVisibility="Hidden">
- <StackPanel Margin="8">
-
- <!--#region 升降气缸-->
- <Grid
- Name="cy"
- Grid.Row="0"
- Margin="5"
- Visibility="{Binding cylinderModels, Converter={StaticResource CountIsVisiableConvert}}">
- <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" ScrollViewer.HorizontalScrollBarVisibility="Disabled" />
- </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"
- Visibility="{Binding BlockCylinders, Converter={StaticResource CountIsVisiableConvert}}">
- <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"
- Visibility="{Binding PalletCylinders, Converter={StaticResource CountIsVisiableConvert}}">
- <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-->
-
- <!--#region 上下桶工位气缸-->
- <Grid
- Name="onGrid"
- Grid.Row="2"
- Margin="5"
- Visibility="{Binding OtherHandCylinders, Converter={StaticResource CountIsVisiableConvert}}">
- <pry:ImageBorder
- Grid.RowSpan="2"
- Width="{Binding ElementName=onGrid, Path=ActualWidth}"
- Height="{Binding ElementName=onGrid, 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="list4"
- Grid.Row="2"
- Margin="0,0,0,20"
- Background="Transparent"
- BorderBrush="#00BEFA"
- BorderThickness="0"
- ItemsSource="{Binding OtherHandCylinders}"
- 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>
- </Grid>
- </UserControl>
|