|
@@ -7,40 +7,37 @@
|
|
|
mc:Ignorable="d"
|
|
|
d:DesignHeight="450" d:DesignWidth="800">
|
|
|
<Grid>
|
|
|
+
|
|
|
<DataGrid ColumnWidth="*" AutoGenerateColumns="False" HeadersVisibility="All" CanUserAddRows="False" SelectionUnit="FullRow" SelectionMode="Single" RowHeaderWidth="0"
|
|
|
- ColumnHeaderStyle="{StaticResource ColumnHeaderStyle}" RowHeaderStyle="{StaticResource RowHeaderStyle}" RowStyle="{StaticResource DataGridRowtyle}" AlternationCount="2"
|
|
|
- ItemsSource="{Binding BaseConfigList}" IsReadOnly="True" >
|
|
|
+ ColumnHeaderStyle="{StaticResource ColumnHeaderStyle}" RowHeaderStyle="{StaticResource RowHeaderStyle}" RowStyle="{StaticResource DataGridRowtyle}" AlternationCount="2"
|
|
|
+ ItemsSource="{Binding PLCItemList}" IsReadOnly="True" HorizontalScrollBarVisibility="Hidden" >
|
|
|
<DataGrid.Columns >
|
|
|
- <DataGridTextColumn Header="序号" Binding="{Binding Id}" CellStyle="{StaticResource DataGridCellStyle}" />
|
|
|
- <DataGridTextColumn Header="PLC变量编码" Binding="{Binding Name}" CellStyle="{StaticResource DataGridCellStyle}"/>
|
|
|
- <DataGridTextColumn Header="描述" Binding="{Binding Name}" CellStyle="{StaticResource DataGridCellStyle}"/>
|
|
|
- <DataGridTextColumn Header="数据类型" Binding="{Binding Name}" CellStyle="{StaticResource DataGridCellStyle}"/>
|
|
|
- <DataGridTextColumn Header="当前值" Binding="{Binding Name}" CellStyle="{StaticResource DataGridCellStyle}"/>
|
|
|
+ <DataGridTextColumn Header="序号" Binding="{Binding Id}" CellStyle="{StaticResource MyDataGridCellStyle}" />
|
|
|
+ <DataGridTextColumn Header="PLC变量编码" Binding="{Binding PlcItem}" CellStyle="{StaticResource MyDataGridCellStyle}"/>
|
|
|
+ <DataGridTextColumn Header="PLC地址" Binding="{Binding PlcAddress}" CellStyle="{StaticResource MyDataGridCellStyle}"/>
|
|
|
+ <DataGridTextColumn Header="描述" Binding="{Binding Remark}" CellStyle="{StaticResource MyDataGridCellStyle}"/>
|
|
|
+ <DataGridTextColumn Header="数据类型" Binding="{Binding PlcAddType}" CellStyle="{StaticResource MyDataGridCellStyle}"/>
|
|
|
<DataGridTemplateColumn Header="操作" CellStyle="{StaticResource DataGridCellStyle}">
|
|
|
<DataGridTemplateColumn.CellTemplate>
|
|
|
<DataTemplate>
|
|
|
- <UniformGrid Columns="2">
|
|
|
+ <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
|
|
+ <TextBox Width="60" HorizontalContentAlignment ="Left" Foreground="Black" Height="5"
|
|
|
+ Cursor="Hand" Margin="0,0,2,0" >
|
|
|
+ </TextBox>
|
|
|
<Button Width="auto" Background="Transparent" HorizontalContentAlignment ="Left" Foreground="Black" Height="25" BorderThickness="0"
|
|
|
- Command="{Binding DataContext.EditCommand, RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=DataGrid}}" Cursor="Hand" Margin="0,0,10,0" >
|
|
|
-
|
|
|
- <StackPanel Orientation="Horizontal">
|
|
|
- <TextBlock Text="编辑" VerticalAlignment="Center" Foreground="Blue"/>
|
|
|
- </StackPanel>
|
|
|
- </Button>
|
|
|
- <Button Width="auto" Background="Transparent" HorizontalContentAlignment ="Left" Foreground="Black" Height="25" BorderThickness="0"
|
|
|
- Command="{Binding DataContext.DeleteCommand, RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=DataGrid}}" Cursor="Hand" >
|
|
|
-
|
|
|
+ Command="{Binding DataContext.DeleteCommand, RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=DataGrid}}" Cursor="Hand" >
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
- <TextBlock Text="删除" VerticalAlignment="Center" Foreground="Blue"/>
|
|
|
+ <TextBlock Text="写入" VerticalAlignment="Center" Foreground="Blue"/>
|
|
|
</StackPanel>
|
|
|
</Button>
|
|
|
|
|
|
- </UniformGrid>
|
|
|
+ </StackPanel>
|
|
|
</DataTemplate>
|
|
|
</DataGridTemplateColumn.CellTemplate>
|
|
|
</DataGridTemplateColumn>
|
|
|
</DataGrid.Columns>
|
|
|
|
|
|
</DataGrid>
|
|
|
+
|
|
|
</Grid>
|
|
|
</UserControl>
|