|
- <UserControl x:Class="BPASmartClient.JXJFoodBigStation.View.HKPlcCommMonitorView"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:pry="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:vm="clr-namespace:BPASmartClient.JXJFoodBigStation.ViewModel"
- mc:Ignorable="d"
- d:DesignHeight="1080" d:DesignWidth="1920">
- <UserControl.DataContext>
- <vm:HKPlcCommMonitorViewModel />
- </UserControl.DataContext>
-
- <Grid Margin="10">
- <Grid.RowDefinitions>
- <RowDefinition Height="80" />
- <RowDefinition />
- </Grid.RowDefinitions>
- <!--#region 表格标题栏设置-->
-
- <Grid
- Grid.Row="0"
- Margin="0,10,0,0"
- Background="#ff0C255F">
-
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="1*"/>
- <ColumnDefinition Width="1*"/>
- <ColumnDefinition Width="1*"/>
- <ColumnDefinition Width="1*"/>
- <ColumnDefinition Width="1*"/>
- <ColumnDefinition Width="1*"/>
- <ColumnDefinition Width="1*"/>
- <ColumnDefinition Width="1*"/>
- </Grid.ColumnDefinitions>
- <Grid Grid.Column="0">
- <TextBlock Text="序号" FontSize="24" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Aqua"/>
- <Border BorderThickness="1,0,1,0" Cursor="SizeWE" />
- </Grid>
- <TextBlock Grid.Column="1" FontSize="24" Text="变量名" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Aqua" />
- <TextBlock Grid.Column="2" FontSize="24" Text="地址" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Aqua" />
- <TextBlock Grid.Column="3" FontSize="24" Text="类型" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Aqua" />
- <Grid Grid.Column="4">
- <TextBlock Text="描述" FontSize="24" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Aqua" />
- <Border BorderThickness="1,0,1,0" Cursor="SizeWE" />
- </Grid>
- <TextBlock Grid.Column="5" FontSize="24" Text="当前值" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Aqua" />
- <Grid Grid.Column="6">
- <TextBlock Text="设定值" FontSize="24" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Aqua" />
- <Border BorderThickness="1,0,1,0" Cursor="SizeWE" />
- </Grid>
- <TextBlock Grid.Column="7" FontSize="24" Text="功能操作" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Aqua" />
- <Border Grid.ColumnSpan="10" BorderThickness="1,0,1,0" />
- </Grid>
- <Grid Grid.Row="1">
- <ScrollViewer HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden" >
- <ItemsControl ItemsSource="{Binding PlcInfo}" Foreground="Aqua">
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <Grid Name="gr" >
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition />
- <ColumnDefinition />
- <ColumnDefinition />
- <ColumnDefinition />
- <ColumnDefinition />
- <ColumnDefinition />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
- <Grid Grid.Column="0">
- <TextBlock
- FontSize="16"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Text="{Binding SerialNum}" />
- <Border
- BorderThickness="1,0,1,0"
- Cursor="SizeWE" />
- </Grid>
- <Grid Grid.Column="1">
- <TextBlock
- FontSize="16"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Text="{Binding Variable}" />
- <Border
- BorderThickness="1,0,1,0"
- Cursor="SizeWE" />
- </Grid>
- <TextBlock
- Grid.Column="2"
- FontSize="16"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Text="{Binding Address }" />
- <TextBlock
- Grid.Column="3"
- FontSize="16"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Text="{Binding Type }" />
- <Grid Grid.Column="4">
- <TextBlock
- FontSize="16"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Text="{Binding Describe}" />
- <Border
- BorderThickness="1,0,1,0"
- Cursor="SizeWE" />
- </Grid>
-
- <TextBlock
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Grid.Column="5"
- Text="{Binding NowValue}" FontSize="16" />
- <Grid Grid.Column="6">
- <TextBox
- Text="{Binding SetValue}" Foreground="Aqua" Background="Transparent" FontSize="16" VerticalAlignment="Center" />
- <Border
- BorderThickness="1,0,1,0"
- Cursor="SizeWE" />
- </Grid>
- <Grid Grid.Column="7">
- <pry:IcoButton
- Width="100"
- Command="{Binding DataContext.SetValueCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
- CommandParameter="{Binding Address}"
- Grid.Column="0"
- Margin="50,5,50,5"
- Content="设置"
- FontSize="20"
- Foreground="Aqua"
- Style="{StaticResource IcoButtonStyle}" />
- <Border
- BorderThickness="1,0,1,0"
- Cursor="SizeWE" />
- </Grid>
- <Border
- Grid.ColumnSpan="10"
- BorderThickness="1,0,1,1" />
- </Grid>
- <DataTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="true">
- <Setter TargetName="gr" Property="Background" Value="#112AB2E7" />
- </Trigger>
- </DataTemplate.Triggers>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
- </ScrollViewer>
- </Grid>
- </Grid>
- </UserControl>
|