|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546 |
- <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>
-
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="40" />
- <RowDefinition />
- </Grid.RowDefinitions>
-
- <StackPanel
- Margin="0,0,10,0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- Orientation="Horizontal">
- <TextBlock
- FontSize="16"
- VerticalAlignment="Center"
- Foreground="Aqua"
- Text="当前系统模式:" />
- <TextBlock
- Width="50"
- FontSize="20"
- VerticalAlignment="Center"
- Foreground="Aqua"
- Text="{Binding SystemMode}" />
- <TextBlock
- FontSize="16"
- VerticalAlignment="Center"
- Foreground="Aqua"
- Text="当前系统状态:" />
- <TextBlock
- Width="50"
- FontSize="20"
- VerticalAlignment="Center"
- Foreground="Aqua"
- Text="{Binding SystemStatus}" />
- <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>
|