|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368 |
- <UserControl
- x:Class="BPASmartClient.JXJFoodSmallStation.View.RobotView"
- 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: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="1080"
- d:DesignWidth="1920"
- 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:RobotViewModel />
- </UserControl.DataContext>
-
- <Grid Margin="10">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="4*" />
- <ColumnDefinition Width="4*" />
- <ColumnDefinition Width="4*" />
- </Grid.ColumnDefinitions>
- <!--#region 表格标题栏设置-->
- <Grid>
- <StackPanel>
- <WrapPanel>
- <TextBlock
- Margin="5"
- FontSize="22"
- Foreground="Aqua"
- Text="机器人自动运行模式:" />
- <TextBlock
- Margin="5"
- FontSize="22"
- Foreground="Aqua"
- Text="{Binding RobotIsAutoMode}" />
- </WrapPanel>
- <WrapPanel>
- <TextBlock
- Margin="5"
- FontSize="22"
- Foreground="Aqua"
- Text="机器人正在自动运行:" />
- <TextBlock
- Margin="5"
- FontSize="22"
- Foreground="Aqua"
- Text="{Binding RobotIsAutoRun}" />
- </WrapPanel>
- <WrapPanel>
- <TextBlock
- Margin="5"
- FontSize="22"
- Foreground="Aqua"
- Text="机器人停止状态:" />
- <TextBlock
- Margin="49,5"
- FontSize="22"
- Foreground="Aqua"
- Text="{Binding RobotIsStop}" />
- </WrapPanel>
- <WrapPanel>
- <TextBlock
- Margin="5"
- FontSize="22"
- Foreground="Aqua"
- Text="机器人运行正常:" />
- <TextBlock
- Margin="49,5"
- FontSize="22"
- Foreground="Aqua"
- Text="{Binding RobotIsRun}" />
- </WrapPanel>
- <WrapPanel>
- <TextBlock
- Margin="5"
- FontSize="22"
- Foreground="Aqua"
- Text="机器人运行故障:" />
- <TextBlock
- Margin="49,5"
- FontSize="22"
- Foreground="Aqua"
- Text="{Binding RobotIsAlarm}" />
- </WrapPanel>
- <WrapPanel>
- <TextBlock
- Margin="5"
- FontSize="22"
- Foreground="Aqua"
- Text="机器人在Home点:" />
- <TextBlock
- Margin="30,5"
- FontSize="22"
- Foreground="Aqua"
- Text="{Binding RobotIsHomed}" />
- </WrapPanel>
- <WrapPanel>
- <TextBlock
- Margin="5"
- FontSize="22"
- Foreground="Aqua"
- Text="机器人运行的程序号:" />
- <TextBlock
- Margin="5"
- FontSize="22"
- Foreground="Aqua"
- Text="{Binding IsRunProgramNum}" />
- </WrapPanel>
- <!--<WrapPanel>
- <TextBlock Margin="5" FontSize="22" Foreground="Aqua" Text="抓空桶完成:"></TextBlock>
- <TextBlock Margin="5" FontSize="22" Foreground="Aqua" Text="{Binding RobotGetEmptyBarrelComplete}"></TextBlock>
- </WrapPanel>
- <WrapPanel>
- <TextBlock Margin="5" FontSize="22" Foreground="Aqua" Text="放空桶完成:"></TextBlock>
- <TextBlock Margin="5" FontSize="22" Foreground="Aqua" Text="{Binding RobotPutEmptyBarrelComplete}"></TextBlock>
- </WrapPanel>
- <WrapPanel>
- <TextBlock Margin="5" FontSize="22" Foreground="Aqua" Text="抓满桶完成:"></TextBlock>
- <TextBlock Margin="5" FontSize="22" Foreground="Aqua" Text="{Binding RobotGetFullBarrelComplete}"></TextBlock>
- </WrapPanel>
- <WrapPanel>
- <TextBlock Margin="5" FontSize="22" Foreground="Aqua" Text="放满桶完成:"></TextBlock>
- <TextBlock Margin="5" FontSize="22" Foreground="Aqua" Text="{Binding RobotPutFullBarrelComplete}"></TextBlock>
- </WrapPanel>-->
- </StackPanel>
- </Grid>
- <Grid Grid.Column="1">
- <Grid.RowDefinitions>
- <RowDefinition Height="1*" />
- <RowDefinition Height="7*" />
- </Grid.RowDefinitions>
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition />
- <ColumnDefinition />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
- <Button
- Margin="20,15"
- Background="LightGreen"
- Command="{Binding SystemStart}"
- Content="启动"
- FontSize="40" />
- <Button
- Grid.Column="1"
- Margin="20,15"
- Background="OrangeRed"
- Command="{Binding SystemStop}"
- Content="停止"
- FontSize="40" />
- <Button
- Grid.Column="2"
- Grid.ColumnSpan="2"
- Margin="20,15"
- Background="DodgerBlue"
- Command="{Binding EStopReset}"
- Content="急停复位"
- FontSize="40" />
- </Grid>
- </Grid>
- <!--<Grid Grid.Column="2">
- <Grid.RowDefinitions>
- <RowDefinition></RowDefinition>
- <RowDefinition></RowDefinition>
- <RowDefinition></RowDefinition>
- </Grid.RowDefinitions>
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition></ColumnDefinition>
- <ColumnDefinition></ColumnDefinition>
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition></RowDefinition>
- <RowDefinition></RowDefinition>
- <RowDefinition></RowDefinition>
- </Grid.RowDefinitions>
- <Button
- Margin="20,5"
- Command="{Binding AutoMode}"
- Content="自动模式"
- FontSize="32"
- Panel.ZIndex="0"
- Style="{StaticResource ImageButtonStyle}"></Button>
- <Button
- Grid.Column="1"
- Margin="20,5"
- Command="{Binding TestMode}"
- Content="测试模式"
- FontSize="32"
- Panel.ZIndex="0"
- Style="{StaticResource ImageButtonStyle}"></Button>
- <Grid Grid.Row="1" Grid.ColumnSpan="2">
- <StackPanel Orientation="Vertical">
- <WrapPanel Orientation="Horizontal">
- <TextBlock Text="机器人正在运行程序号:" Foreground="#FF2AB2E7" FontSize="25" Margin="10" HorizontalAlignment="Left"></TextBlock>
- <TextBlock Text="{Binding IsRunProgramNum}" Foreground="#FF2AB2E7" FontSize="25" Margin="10" HorizontalAlignment="Left" TextAlignment="Center"></TextBlock>
- </WrapPanel>
- <WrapPanel Orientation="Horizontal" VerticalAlignment="Center">
- <TextBlock Text="机器人需要运行程序号:" Foreground="#FF2AB2E7" FontSize="25" Margin="10" HorizontalAlignment="Left"></TextBlock>
- <TextBox Text="{Binding SetProgramNum}" Width="50" Foreground="#FF2AB2E7" FontSize="25" Margin="10" HorizontalAlignment="Left" TextAlignment="Center"></TextBox>
- <Button FontSize="20" Height="40" Command="{Binding SetProgramNumCommand}" Content="设置" Style="{StaticResource ImageButtonStyle}"></Button>
- </WrapPanel>
- </StackPanel>
- </Grid>
- <Button
- Grid.Row="2"
- Margin="20,5"
- Command="{Binding TestRobotRun}"
- Content="测试抓桶程序"
- FontSize="32"
- Style="{StaticResource ImageButtonStyle}"></Button>
- </Grid>
- -->
- <!--<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 Grid.Row="1" Visibility="Hidden">
- <Grid.ColumnDefinitions>
- <ColumnDefinition></ColumnDefinition>
- <ColumnDefinition></ColumnDefinition>
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition></RowDefinition>
- <RowDefinition></RowDefinition>
- </Grid.RowDefinitions>
- <Grid Grid.Row="0">
- <Button
- Margin="20,5"
- Command="{Binding RobotGetEmptyBarrel}"
- Content="允许机器人抓空桶"
- Style="{StaticResource ImageButtonStyle}"></Button>
- </Grid>
- <Grid Grid.Column="1">
- <Button
- Margin="20,5"
- Command="{Binding RobotPutEmptyBarrel}"
- Content="允许机器人放空桶"
- Style="{StaticResource ImageButtonStyle}"></Button>
- </Grid>
- <Grid Grid.Row="1">
- <Button
- Margin="20,5"
- Command="{Binding RobotGetFullBarrel}"
- Content="允许机器人抓满桶"
- Style="{StaticResource ImageButtonStyle}"></Button>
- </Grid>
- <Grid Grid.Row="1" Grid.Column="1">
- <Button
- Margin="20,5"
- Command="{Binding RobotPutFullBarrel}"
- Content="允许机器人放满桶"
- Style="{StaticResource ImageButtonStyle}"></Button>
- </Grid>
- </Grid>
- </Grid>-->
- </Grid>
- </UserControl>
|