|
@@ -7,7 +7,7 @@
|
|
|
xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
|
|
|
xmlns:prism="http://prismlibrary.com/"
|
|
|
BorderBrush="#CBCBCB" BorderThickness="1"
|
|
|
- Height="600" Width="1000" >
|
|
|
+ Height="700" Width="1000" >
|
|
|
<!--<prism:Dialog.WindowStyle>
|
|
|
<Style TargetType="Window">
|
|
|
<Setter Property="SizeToContent" Value="WidthAndHeight" />
|
|
@@ -35,7 +35,7 @@
|
|
|
</b:Interaction.Triggers>
|
|
|
<Grid.RowDefinitions>
|
|
|
<RowDefinition Height="50" />
|
|
|
- <RowDefinition Height="auto" />
|
|
|
+ <RowDefinition Height="200" />
|
|
|
<RowDefinition />
|
|
|
|
|
|
</Grid.RowDefinitions>
|
|
@@ -62,13 +62,13 @@
|
|
|
|
|
|
</StackPanel>
|
|
|
<Border Grid.Row="0" BorderBrush="#CBCBCB" BorderThickness="0,1" />
|
|
|
- <Expander Grid.Row="1" >
|
|
|
+ <Expander Grid.Row="1" IsExpanded="True">
|
|
|
<Expander.Header>
|
|
|
<Label Content="已有测试项" FontSize="10"/>
|
|
|
</Expander.Header>
|
|
|
<DataGrid Grid.Row="2" 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 SchProjectList}" IsReadOnly="True" Margin="5" Padding="0" >
|
|
|
+ ItemsSource="{Binding SchProjectList}" IsReadOnly="True" Margin="5" Padding="0" VerticalScrollBarVisibility="Visible" HorizontalScrollBarVisibility="Visible" >
|
|
|
<b:Interaction.Triggers>
|
|
|
<b:EventTrigger EventName="SelectionChanged">
|
|
|
<b:InvokeCommandAction Command="{Binding DgSelectChangeCommand}" CommandParameter="{Binding SchDtlId}"/>
|
|
@@ -134,255 +134,263 @@
|
|
|
</StackPanel>
|
|
|
|
|
|
<Border Grid.Row="0" BorderBrush="#CBCBCB" BorderThickness="1" />
|
|
|
- <Grid Grid.Row="1">
|
|
|
- <Grid.ColumnDefinitions>
|
|
|
- <ColumnDefinition Width="80"/>
|
|
|
- <ColumnDefinition/>
|
|
|
- <ColumnDefinition Width="1.3*"/>
|
|
|
- </Grid.ColumnDefinitions>
|
|
|
- <TextBlock Grid.Column="0" Text="前置项" Style="{StaticResource NormalTextBlockStyle}" TextAlignment="Center">
|
|
|
- </TextBlock>
|
|
|
- <Border Grid.Column="1" BorderBrush="#CBCBCB" BorderThickness="1,0" />
|
|
|
- <Grid Grid.Column="1">
|
|
|
- <Grid.RowDefinitions>
|
|
|
- <RowDefinition/>
|
|
|
- <RowDefinition/>
|
|
|
- <RowDefinition Height="2*"/>
|
|
|
- </Grid.RowDefinitions>
|
|
|
- <Grid Grid.Row="0">
|
|
|
- <StackPanel Orientation="Horizontal" >
|
|
|
- <TextBlock Text="测试项类型:" Style="{StaticResource textBlockStyle}"/>
|
|
|
- <ComboBox Height="28" Width="150" ItemsSource="{Binding BeforeJudgeKinds}" SelectedItem="{Binding BeforeSelectJudge}" />
|
|
|
- </StackPanel>
|
|
|
- </Grid>
|
|
|
- <Grid Grid.Row="1" >
|
|
|
- <StackPanel Orientation="Horizontal" >
|
|
|
- <TextBlock Text="明细判定逻辑:" Style="{StaticResource textBlockStyle}"/>
|
|
|
- <ComboBox Height="28" Width="150" ItemsSource="{Binding JudgeLogicKinds}" SelectedItem="{Binding SelectLogic}"/>
|
|
|
- </StackPanel>
|
|
|
- </Grid>
|
|
|
- <Grid Grid.Row="2">
|
|
|
- <DockPanel LastChildFill="True" >
|
|
|
- <TextBlock Text="前置项描述:" Style="{StaticResource textBlockStyle}" />
|
|
|
- <TextBox x:Name="txtBefore" TextWrapping="Wrap" Text="{Binding BeforeDetail }" AcceptsReturn="True" KeyDown="txtBefore_KeyDown"/>
|
|
|
+ <ScrollViewer Grid.Row="1">
|
|
|
+ <Grid >
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition Width="80"/>
|
|
|
+ <ColumnDefinition/>
|
|
|
+ <ColumnDefinition Width="1.3*"/>
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+ <TextBlock Grid.Column="0" Text="前置项" Style="{StaticResource NormalTextBlockStyle}" TextAlignment="Center">
|
|
|
+ </TextBlock>
|
|
|
+ <Border Grid.Column="1" BorderBrush="#CBCBCB" BorderThickness="1,0" />
|
|
|
+ <Grid Grid.Column="1">
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition/>
|
|
|
+ <RowDefinition/>
|
|
|
+ <RowDefinition Height="2*"/>
|
|
|
+ </Grid.RowDefinitions>
|
|
|
+ <Grid Grid.Row="0">
|
|
|
+ <StackPanel Orientation="Horizontal" >
|
|
|
+ <TextBlock Text="测试项类型:" Style="{StaticResource textBlockStyle}"/>
|
|
|
+ <ComboBox Height="28" Width="150" ItemsSource="{Binding BeforeJudgeKinds}" SelectedItem="{Binding BeforeSelectJudge}" />
|
|
|
+ </StackPanel>
|
|
|
+ </Grid>
|
|
|
+ <Grid Grid.Row="1" >
|
|
|
+ <StackPanel Orientation="Horizontal" >
|
|
|
+ <TextBlock Text="明细判定逻辑:" Style="{StaticResource textBlockStyle}"/>
|
|
|
+ <ComboBox Height="28" Width="150" ItemsSource="{Binding JudgeLogicKinds}" SelectedItem="{Binding SelectLogic}"/>
|
|
|
+ </StackPanel>
|
|
|
+ </Grid>
|
|
|
+ <Grid Grid.Row="2">
|
|
|
+ <DockPanel LastChildFill="True" >
|
|
|
+ <TextBlock Text="前置项描述:" Style="{StaticResource textBlockStyle}" />
|
|
|
+ <TextBox x:Name="txtBefore" TextWrapping="Wrap" Text="{Binding BeforeDetail }" AcceptsReturn="True" KeyDown="txtBefore_KeyDown"/>
|
|
|
|
|
|
- </DockPanel>
|
|
|
+ </DockPanel>
|
|
|
+ </Grid>
|
|
|
</Grid>
|
|
|
- </Grid>
|
|
|
- <Grid Grid.Column="2" >
|
|
|
- <Grid.RowDefinitions>
|
|
|
- <RowDefinition Height="30"/>
|
|
|
- <RowDefinition/>
|
|
|
- </Grid.RowDefinitions>
|
|
|
- <DockPanel LastChildFill="False">
|
|
|
- <TextBlock Text="前置项明细:" Style="{StaticResource textBlockStyle}" />
|
|
|
- <Button Content="新增" Height="22" Width="60" Margin="5,0" Command="{Binding AddDetailCommand}" CommandParameter="Before" Style="{StaticResource NormalButtonStyle}" DockPanel.Dock="Right" />
|
|
|
- </DockPanel>
|
|
|
- <DataGrid Grid.Row="1" ColumnWidth="*" AutoGenerateColumns="False" HeadersVisibility="All" CanUserAddRows="False" SelectionUnit="FullRow" SelectionMode="Single" RowHeaderWidth="0" HorizontalScrollBarVisibility="Disabled"
|
|
|
- ColumnHeaderStyle="{StaticResource ColumnHeaderStyle}" x:Name="DeviceDataGrid" RowHeaderStyle="{StaticResource RowHeaderStyle}" RowStyle="{StaticResource DataGridRowtyle}" AlternationCount="2"
|
|
|
- ItemsSource="{Binding BeforeConList}" IsReadOnly="True" Padding="0" >
|
|
|
- <DataGrid.Columns >
|
|
|
- <DataGridTextColumn Header="序号" Width="40" Binding="{Binding Id}" CellStyle="{StaticResource MyDataGridCellStyle}" />
|
|
|
- <DataGridTextColumn Header="PLC地址" Binding="{Binding PlcAddress}" CellStyle="{StaticResource MyDataGridCellStyle}" />
|
|
|
- <DataGridTextColumn Header="PLC变量名" Binding="{Binding PlcItem}" CellStyle="{StaticResource MyDataGridCellStyle}"/>
|
|
|
- <DataGridTextColumn Header="判定值" Binding="{Binding PlcValue}" CellStyle="{StaticResource MyDataGridCellStyle}"/>
|
|
|
- <DataGridTemplateColumn Header="操作" Width="160" CellStyle="{StaticResource MyDataGridCellStyle}">
|
|
|
- <DataGridTemplateColumn.CellTemplate>
|
|
|
- <DataTemplate>
|
|
|
- <UniformGrid Columns="2">
|
|
|
- <Button Width="auto" Background="Transparent" HorizontalContentAlignment ="Left" Foreground="Black" Height="25" BorderThickness="0"
|
|
|
- Command="{Binding DataContext.EditBeforeCommand, RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=DataGrid}}" CommandParameter="{Binding Id}" Cursor="Hand" Margin="0,0,10,0" >
|
|
|
+ <Grid Grid.Column="2" >
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition Height="30"/>
|
|
|
+ <RowDefinition/>
|
|
|
+ </Grid.RowDefinitions>
|
|
|
+ <DockPanel LastChildFill="False">
|
|
|
+ <TextBlock Text="前置项明细:" Style="{StaticResource textBlockStyle}" />
|
|
|
+ <Button Content="新增" Height="22" Width="60" Margin="5,0" Command="{Binding AddDetailCommand}" CommandParameter="Before" Style="{StaticResource NormalButtonStyle}" DockPanel.Dock="Right" />
|
|
|
+ </DockPanel>
|
|
|
+ <DataGrid Grid.Row="1" ColumnWidth="*" AutoGenerateColumns="False" HeadersVisibility="All" CanUserAddRows="False" SelectionUnit="FullRow" SelectionMode="Single" RowHeaderWidth="0" HorizontalScrollBarVisibility="Disabled"
|
|
|
+ ColumnHeaderStyle="{StaticResource ColumnHeaderStyle}" x:Name="DeviceDataGrid" RowHeaderStyle="{StaticResource RowHeaderStyle}" RowStyle="{StaticResource DataGridRowtyle}" AlternationCount="2"
|
|
|
+ ItemsSource="{Binding BeforeConList}" IsReadOnly="True" Padding="0" >
|
|
|
+ <DataGrid.Columns >
|
|
|
+ <DataGridTextColumn Header="序号" Width="40" Binding="{Binding Id}" CellStyle="{StaticResource MyDataGridCellStyle}" />
|
|
|
+ <DataGridTextColumn Header="PLC地址" Binding="{Binding PlcAddress}" CellStyle="{StaticResource MyDataGridCellStyle}" />
|
|
|
+ <DataGridTextColumn Header="PLC变量名" Binding="{Binding PlcItem}" CellStyle="{StaticResource MyDataGridCellStyle}"/>
|
|
|
+ <DataGridTextColumn Header="判定值" Binding="{Binding PlcValue}" CellStyle="{StaticResource MyDataGridCellStyle}"/>
|
|
|
+ <DataGridTemplateColumn Header="操作" Width="160" CellStyle="{StaticResource MyDataGridCellStyle}">
|
|
|
+ <DataGridTemplateColumn.CellTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <UniformGrid Columns="2">
|
|
|
+ <Button Width="auto" Background="Transparent" HorizontalContentAlignment ="Left" Foreground="Black" Height="25" BorderThickness="0"
|
|
|
+Command="{Binding DataContext.EditBeforeCommand, RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=DataGrid}}" CommandParameter="{Binding Id}" 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.DeleteBeforeCommand, RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=DataGrid}}" CommandParameter="{Binding Id}" Cursor="Hand" >
|
|
|
+ <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.DeleteBeforeCommand, RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=DataGrid}}" CommandParameter="{Binding Id}" Cursor="Hand" >
|
|
|
|
|
|
- <StackPanel Orientation="Horizontal">
|
|
|
- <TextBlock Text="删除" VerticalAlignment="Center" Foreground="Blue"/>
|
|
|
- </StackPanel>
|
|
|
- </Button>
|
|
|
+ <StackPanel Orientation="Horizontal">
|
|
|
+ <TextBlock Text="删除" VerticalAlignment="Center" Foreground="Blue"/>
|
|
|
+ </StackPanel>
|
|
|
+ </Button>
|
|
|
|
|
|
- </UniformGrid>
|
|
|
- </DataTemplate>
|
|
|
- </DataGridTemplateColumn.CellTemplate>
|
|
|
- </DataGridTemplateColumn>
|
|
|
+ </UniformGrid>
|
|
|
+ </DataTemplate>
|
|
|
+ </DataGridTemplateColumn.CellTemplate>
|
|
|
+ </DataGridTemplateColumn>
|
|
|
|
|
|
- </DataGrid.Columns>
|
|
|
+ </DataGrid.Columns>
|
|
|
|
|
|
- </DataGrid>
|
|
|
+ </DataGrid>
|
|
|
|
|
|
- </Grid>
|
|
|
- </Grid>
|
|
|
- <Grid Grid.Row="2">
|
|
|
- <Grid.ColumnDefinitions>
|
|
|
- <ColumnDefinition Width="80"/>
|
|
|
- <ColumnDefinition/>
|
|
|
- <ColumnDefinition Width="1.3*"/>
|
|
|
- </Grid.ColumnDefinitions>
|
|
|
- <TextBlock Grid.Column="0" Text="输入项" Style="{StaticResource NormalTextBlockStyle}" TextAlignment="Center">
|
|
|
- </TextBlock>
|
|
|
- <Border Grid.Column="1" BorderBrush="#CBCBCB" BorderThickness="1,0" />
|
|
|
- <Grid Grid.Column="1">
|
|
|
- <Grid.RowDefinitions>
|
|
|
- <RowDefinition/>
|
|
|
- <RowDefinition/>
|
|
|
- <RowDefinition Height="2*"/>
|
|
|
- </Grid.RowDefinitions>
|
|
|
- <Grid Grid.Row="0">
|
|
|
- <StackPanel Orientation="Horizontal" >
|
|
|
- <TextBlock Text="测试项类型:" Style="{StaticResource textBlockStyle}"/>
|
|
|
- <ComboBox Height="28" Width="150" ItemsSource="{Binding InJudgeKinds}" SelectedItem="{Binding SelectInJudge}" />
|
|
|
- </StackPanel>
|
|
|
- </Grid>
|
|
|
- <Grid Grid.Row="1" >
|
|
|
- <StackPanel Orientation="Horizontal" >
|
|
|
- <TextBlock Text="明细判定逻辑:" Style="{StaticResource textBlockStyle}"/>
|
|
|
- <ComboBox Height="28" Width="150" ItemsSource="{Binding InJudgeLogicKinds}" SelectedItem="{Binding InSelectLogic}"/>
|
|
|
- </StackPanel>
|
|
|
</Grid>
|
|
|
- <Grid Grid.Row="2">
|
|
|
- <DockPanel LastChildFill="True" >
|
|
|
- <TextBlock Text="输入项描述:" Style="{StaticResource textBlockStyle}" />
|
|
|
- <TextBox x:Name="txtIn" TextWrapping="Wrap" Text="{Binding InDetail,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" AcceptsReturn="True" KeyDown="txtIn_KeyDown"/>
|
|
|
+ </Grid>
|
|
|
+ </ScrollViewer>
|
|
|
+ <ScrollViewer Grid.Row="2">
|
|
|
+ <Grid >
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition Width="80"/>
|
|
|
+ <ColumnDefinition/>
|
|
|
+ <ColumnDefinition Width="1.3*"/>
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+ <TextBlock Grid.Column="0" Text="输入项" Style="{StaticResource NormalTextBlockStyle}" TextAlignment="Center">
|
|
|
+ </TextBlock>
|
|
|
+ <Border Grid.Column="1" BorderBrush="#CBCBCB" BorderThickness="1,0" />
|
|
|
+ <Grid Grid.Column="1">
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition/>
|
|
|
+ <RowDefinition/>
|
|
|
+ <RowDefinition Height="2*"/>
|
|
|
+ </Grid.RowDefinitions>
|
|
|
+ <Grid Grid.Row="0">
|
|
|
+ <StackPanel Orientation="Horizontal" >
|
|
|
+ <TextBlock Text="测试项类型:" Style="{StaticResource textBlockStyle}"/>
|
|
|
+ <ComboBox Height="28" Width="150" ItemsSource="{Binding InJudgeKinds}" SelectedItem="{Binding SelectInJudge}" />
|
|
|
+ </StackPanel>
|
|
|
+ </Grid>
|
|
|
+ <Grid Grid.Row="1" >
|
|
|
+ <StackPanel Orientation="Horizontal" >
|
|
|
+ <TextBlock Text="明细判定逻辑:" Style="{StaticResource textBlockStyle}"/>
|
|
|
+ <ComboBox Height="28" Width="150" ItemsSource="{Binding InJudgeLogicKinds}" SelectedItem="{Binding InSelectLogic}"/>
|
|
|
+ </StackPanel>
|
|
|
+ </Grid>
|
|
|
+ <Grid Grid.Row="2">
|
|
|
+ <DockPanel LastChildFill="True" >
|
|
|
+ <TextBlock Text="输入项描述:" Style="{StaticResource textBlockStyle}" />
|
|
|
+ <TextBox x:Name="txtIn" TextWrapping="Wrap" Text="{Binding InDetail,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" AcceptsReturn="True" KeyDown="txtIn_KeyDown"/>
|
|
|
|
|
|
- </DockPanel>
|
|
|
+ </DockPanel>
|
|
|
+ </Grid>
|
|
|
</Grid>
|
|
|
- </Grid>
|
|
|
- <Grid Grid.Column="2" >
|
|
|
- <Grid.RowDefinitions>
|
|
|
- <RowDefinition Height="30"/>
|
|
|
- <RowDefinition/>
|
|
|
- </Grid.RowDefinitions>
|
|
|
- <DockPanel LastChildFill="False">
|
|
|
- <TextBlock Text="输入项明细:" Style="{StaticResource textBlockStyle}" />
|
|
|
- <Button Content="新增" Height="22" Width="60" Margin="5,0" Command="{Binding AddDetailCommand}" CommandParameter="In" Style="{StaticResource NormalButtonStyle}" DockPanel.Dock="Right" />
|
|
|
- </DockPanel>
|
|
|
- <DataGrid Grid.Row="1" ColumnWidth="*" AutoGenerateColumns="False" HeadersVisibility="All" CanUserAddRows="False" SelectionUnit="FullRow" SelectionMode="Single" RowHeaderWidth="0" HorizontalScrollBarVisibility="Disabled"
|
|
|
+ <Grid Grid.Column="2" >
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition Height="30"/>
|
|
|
+ <RowDefinition/>
|
|
|
+ </Grid.RowDefinitions>
|
|
|
+ <DockPanel LastChildFill="False">
|
|
|
+ <TextBlock Text="输入项明细:" Style="{StaticResource textBlockStyle}" />
|
|
|
+ <Button Content="新增" Height="22" Width="60" Margin="5,0" Command="{Binding AddDetailCommand}" CommandParameter="In" Style="{StaticResource NormalButtonStyle}" DockPanel.Dock="Right" />
|
|
|
+ </DockPanel>
|
|
|
+ <DataGrid Grid.Row="1" ColumnWidth="*" AutoGenerateColumns="False" HeadersVisibility="All" CanUserAddRows="False" SelectionUnit="FullRow" SelectionMode="Single" RowHeaderWidth="0" HorizontalScrollBarVisibility="Disabled"
|
|
|
ColumnHeaderStyle="{StaticResource ColumnHeaderStyle}" RowHeaderStyle="{StaticResource RowHeaderStyle}" RowStyle="{StaticResource DataGridRowtyle}" AlternationCount="2"
|
|
|
ItemsSource="{Binding InConList}" IsReadOnly="True" Padding="0" >
|
|
|
- <DataGrid.Columns >
|
|
|
- <DataGridTextColumn Header="序号" Width="40" Binding="{Binding Id}" CellStyle="{StaticResource MyDataGridCellStyle}" />
|
|
|
- <DataGridTextColumn Header="PLC地址" Binding="{Binding PlcAddress}" CellStyle="{StaticResource MyDataGridCellStyle}" />
|
|
|
- <DataGridTextColumn Header="PLC变量名" Binding="{Binding PlcItem}" CellStyle="{StaticResource MyDataGridCellStyle}"/>
|
|
|
- <DataGridTextColumn Header="判定值" Binding="{Binding PlcValue}" CellStyle="{StaticResource MyDataGridCellStyle}"/>
|
|
|
- <DataGridTemplateColumn Header="操作" Width="160" CellStyle="{StaticResource MyDataGridCellStyle}">
|
|
|
- <DataGridTemplateColumn.CellTemplate>
|
|
|
- <DataTemplate>
|
|
|
- <UniformGrid Columns="2">
|
|
|
- <Button Width="auto" Background="Transparent" HorizontalContentAlignment ="Left" Foreground="Black" Height="25" BorderThickness="0"
|
|
|
+ <DataGrid.Columns >
|
|
|
+ <DataGridTextColumn Header="序号" Width="40" Binding="{Binding Id}" CellStyle="{StaticResource MyDataGridCellStyle}" />
|
|
|
+ <DataGridTextColumn Header="PLC地址" Binding="{Binding PlcAddress}" CellStyle="{StaticResource MyDataGridCellStyle}" />
|
|
|
+ <DataGridTextColumn Header="PLC变量名" Binding="{Binding PlcItem}" CellStyle="{StaticResource MyDataGridCellStyle}"/>
|
|
|
+ <DataGridTextColumn Header="判定值" Binding="{Binding PlcValue}" CellStyle="{StaticResource MyDataGridCellStyle}"/>
|
|
|
+ <DataGridTemplateColumn Header="操作" Width="160" CellStyle="{StaticResource MyDataGridCellStyle}">
|
|
|
+ <DataGridTemplateColumn.CellTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <UniformGrid Columns="2">
|
|
|
+ <Button Width="auto" Background="Transparent" HorizontalContentAlignment ="Left" Foreground="Black" Height="25" BorderThickness="0"
|
|
|
Command="{Binding DataContext.EditInCommand, RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=DataGrid}}" CommandParameter="{Binding Id}" 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"
|
|
|
+ <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.DeleteInCommand, RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=DataGrid}}" CommandParameter="{Binding Id}" Cursor="Hand" >
|
|
|
|
|
|
- <StackPanel Orientation="Horizontal">
|
|
|
- <TextBlock Text="删除" VerticalAlignment="Center" Foreground="Blue"/>
|
|
|
- </StackPanel>
|
|
|
- </Button>
|
|
|
+ <StackPanel Orientation="Horizontal">
|
|
|
+ <TextBlock Text="删除" VerticalAlignment="Center" Foreground="Blue"/>
|
|
|
+ </StackPanel>
|
|
|
+ </Button>
|
|
|
|
|
|
- </UniformGrid>
|
|
|
- </DataTemplate>
|
|
|
- </DataGridTemplateColumn.CellTemplate>
|
|
|
- </DataGridTemplateColumn>
|
|
|
+ </UniformGrid>
|
|
|
+ </DataTemplate>
|
|
|
+ </DataGridTemplateColumn.CellTemplate>
|
|
|
+ </DataGridTemplateColumn>
|
|
|
|
|
|
- </DataGrid.Columns>
|
|
|
+ </DataGrid.Columns>
|
|
|
|
|
|
- </DataGrid>
|
|
|
+ </DataGrid>
|
|
|
|
|
|
+ </Grid>
|
|
|
</Grid>
|
|
|
- </Grid>
|
|
|
+ </ScrollViewer>
|
|
|
+
|
|
|
<Border Grid.Row="2" BorderBrush="#CBCBCB" BorderThickness="0,1,0,0" />
|
|
|
- <Grid Grid.Row="3">
|
|
|
- <Grid.ColumnDefinitions>
|
|
|
- <ColumnDefinition Width="80"/>
|
|
|
- <ColumnDefinition/>
|
|
|
- <ColumnDefinition Width="1.3*"/>
|
|
|
- </Grid.ColumnDefinitions>
|
|
|
- <TextBlock Grid.Column="0" Text="结果项" Style="{StaticResource NormalTextBlockStyle}" TextAlignment="Center">
|
|
|
- </TextBlock>
|
|
|
- <Border Grid.Column="1" BorderBrush="#CBCBCB" BorderThickness="1,0" />
|
|
|
- <Grid Grid.Column="1">
|
|
|
- <Grid.RowDefinitions>
|
|
|
- <RowDefinition/>
|
|
|
- <RowDefinition/>
|
|
|
- <RowDefinition Height="2*"/>
|
|
|
- </Grid.RowDefinitions>
|
|
|
- <Grid Grid.Row="0">
|
|
|
- <StackPanel Orientation="Horizontal" >
|
|
|
- <TextBlock Text="测试项类型:" Style="{StaticResource textBlockStyle}"/>
|
|
|
- <ComboBox Height="28" Width="150" ItemsSource="{Binding OutJudgeKinds}" SelectedItem="{Binding SelectOutJudge}" />
|
|
|
- </StackPanel>
|
|
|
- </Grid>
|
|
|
- <Grid Grid.Row="1" >
|
|
|
- <StackPanel Orientation="Horizontal" >
|
|
|
- <TextBlock Text="明细判定逻辑:" Style="{StaticResource textBlockStyle}"/>
|
|
|
- <ComboBox Height="28" Width="150" ItemsSource="{Binding OutJudgeLogicKinds}" SelectedItem="{Binding OutSelectLogic}"/>
|
|
|
- </StackPanel>
|
|
|
- </Grid>
|
|
|
- <Grid Grid.Row="2">
|
|
|
- <DockPanel LastChildFill="True" >
|
|
|
- <TextBlock Text="结果项描述:" Style="{StaticResource textBlockStyle}" />
|
|
|
+
|
|
|
+ <ScrollViewer Grid.Row="3">
|
|
|
+ <Grid >
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition Width="80"/>
|
|
|
+ <ColumnDefinition/>
|
|
|
+ <ColumnDefinition Width="1.3*"/>
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+ <TextBlock Grid.Column="0" Text="结果项" Style="{StaticResource NormalTextBlockStyle}" TextAlignment="Center">
|
|
|
+ </TextBlock>
|
|
|
+ <Border Grid.Column="1" BorderBrush="#CBCBCB" BorderThickness="1,0" />
|
|
|
+ <Grid Grid.Column="1">
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition/>
|
|
|
+ <RowDefinition/>
|
|
|
+ <RowDefinition Height="2*"/>
|
|
|
+ </Grid.RowDefinitions>
|
|
|
+ <Grid Grid.Row="0">
|
|
|
+ <StackPanel Orientation="Horizontal" >
|
|
|
+ <TextBlock Text="测试项类型:" Style="{StaticResource textBlockStyle}"/>
|
|
|
+ <ComboBox Height="28" Width="150" ItemsSource="{Binding OutJudgeKinds}" SelectedItem="{Binding SelectOutJudge}" />
|
|
|
+ </StackPanel>
|
|
|
+ </Grid>
|
|
|
+ <Grid Grid.Row="1" >
|
|
|
+ <StackPanel Orientation="Horizontal" >
|
|
|
+ <TextBlock Text="明细判定逻辑:" Style="{StaticResource textBlockStyle}"/>
|
|
|
+ <ComboBox Height="28" Width="150" ItemsSource="{Binding OutJudgeLogicKinds}" SelectedItem="{Binding OutSelectLogic}"/>
|
|
|
+ </StackPanel>
|
|
|
+ </Grid>
|
|
|
+ <Grid Grid.Row="2">
|
|
|
+ <DockPanel LastChildFill="True" >
|
|
|
+ <TextBlock Text="结果项描述:" Style="{StaticResource textBlockStyle}" />
|
|
|
|
|
|
- <TextBox x:Name="txtOut" TextWrapping="Wrap" Text="{Binding OutDetail,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" AcceptsReturn="True" KeyDown="txtOut_KeyDown"/>
|
|
|
+ <TextBox x:Name="txtOut" TextWrapping="Wrap" Text="{Binding OutDetail,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" AcceptsReturn="True" KeyDown="txtOut_KeyDown"/>
|
|
|
|
|
|
- </DockPanel>
|
|
|
+ </DockPanel>
|
|
|
+ </Grid>
|
|
|
</Grid>
|
|
|
- </Grid>
|
|
|
- <Grid Grid.Column="2" >
|
|
|
- <Grid.RowDefinitions>
|
|
|
- <RowDefinition Height="30"/>
|
|
|
- <RowDefinition/>
|
|
|
- </Grid.RowDefinitions>
|
|
|
- <DockPanel LastChildFill="False">
|
|
|
- <TextBlock Text="结果项明细:" Style="{StaticResource textBlockStyle}" />
|
|
|
- <Button Content="新增" Height="22" Width="60" Margin="5,0" Command="{Binding AddDetailCommand}" CommandParameter="Out" Style="{StaticResource NormalButtonStyle}" DockPanel.Dock="Right" />
|
|
|
- </DockPanel>
|
|
|
- <DataGrid Grid.Row="1" ColumnWidth="*" AutoGenerateColumns="False" HeadersVisibility="All" CanUserAddRows="False" SelectionUnit="FullRow" SelectionMode="Single" RowHeaderWidth="0" HorizontalScrollBarVisibility="Disabled"
|
|
|
+ <Grid Grid.Column="2" >
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition Height="30"/>
|
|
|
+ <RowDefinition/>
|
|
|
+ </Grid.RowDefinitions>
|
|
|
+ <DockPanel LastChildFill="False">
|
|
|
+ <TextBlock Text="结果项明细:" Style="{StaticResource textBlockStyle}" />
|
|
|
+ <Button Content="新增" Height="22" Width="60" Margin="5,0" Command="{Binding AddDetailCommand}" CommandParameter="Out" Style="{StaticResource NormalButtonStyle}" DockPanel.Dock="Right" />
|
|
|
+ </DockPanel>
|
|
|
+ <DataGrid Grid.Row="1" ColumnWidth="*" AutoGenerateColumns="False" HeadersVisibility="All" CanUserAddRows="False" SelectionUnit="FullRow" SelectionMode="Single" RowHeaderWidth="0" HorizontalScrollBarVisibility="Disabled"
|
|
|
ColumnHeaderStyle="{StaticResource ColumnHeaderStyle}" RowHeaderStyle="{StaticResource RowHeaderStyle}" RowStyle="{StaticResource DataGridRowtyle}" AlternationCount="2"
|
|
|
ItemsSource="{Binding OutConList}" IsReadOnly="True" Padding="0" >
|
|
|
- <DataGrid.Columns >
|
|
|
- <DataGridTextColumn Header="序号" Width="40" Binding="{Binding Id}" CellStyle="{StaticResource MyDataGridCellStyle}" />
|
|
|
- <DataGridTextColumn Header="PLC地址" Binding="{Binding PlcAddress}" CellStyle="{StaticResource MyDataGridCellStyle}" />
|
|
|
- <DataGridTextColumn Header="PLC变量名" Binding="{Binding PlcItem}" CellStyle="{StaticResource MyDataGridCellStyle}"/>
|
|
|
- <DataGridTextColumn Header="判定值" Binding="{Binding PlcValue}" CellStyle="{StaticResource MyDataGridCellStyle}"/>
|
|
|
- <DataGridTemplateColumn Header="操作" Width="160" CellStyle="{StaticResource MyDataGridCellStyle}">
|
|
|
- <DataGridTemplateColumn.CellTemplate>
|
|
|
- <DataTemplate>
|
|
|
- <UniformGrid Columns="2">
|
|
|
- <Button Width="auto" Background="Transparent" HorizontalContentAlignment ="Left" Foreground="Black" Height="25" BorderThickness="0"
|
|
|
+ <DataGrid.Columns >
|
|
|
+ <DataGridTextColumn Header="序号" Width="40" Binding="{Binding Id}" CellStyle="{StaticResource MyDataGridCellStyle}" />
|
|
|
+ <DataGridTextColumn Header="PLC地址" Binding="{Binding PlcAddress}" CellStyle="{StaticResource MyDataGridCellStyle}" />
|
|
|
+ <DataGridTextColumn Header="PLC变量名" Binding="{Binding PlcItem}" CellStyle="{StaticResource MyDataGridCellStyle}"/>
|
|
|
+ <DataGridTextColumn Header="判定值" Binding="{Binding PlcValue}" CellStyle="{StaticResource MyDataGridCellStyle}"/>
|
|
|
+ <DataGridTemplateColumn Header="操作" Width="160" CellStyle="{StaticResource MyDataGridCellStyle}">
|
|
|
+ <DataGridTemplateColumn.CellTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <UniformGrid Columns="2">
|
|
|
+ <Button Width="auto" Background="Transparent" HorizontalContentAlignment ="Left" Foreground="Black" Height="25" BorderThickness="0"
|
|
|
Command="{Binding DataContext.EditOutCommand, RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=DataGrid}}" CommandParameter="{Binding Id}" 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"
|
|
|
+ <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.DeleteOutCommand, RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=DataGrid}}" CommandParameter="{Binding Id}" Cursor="Hand" >
|
|
|
|
|
|
- <StackPanel Orientation="Horizontal">
|
|
|
- <TextBlock Text="删除" VerticalAlignment="Center" Foreground="Blue"/>
|
|
|
- </StackPanel>
|
|
|
- </Button>
|
|
|
+ <StackPanel Orientation="Horizontal">
|
|
|
+ <TextBlock Text="删除" VerticalAlignment="Center" Foreground="Blue"/>
|
|
|
+ </StackPanel>
|
|
|
+ </Button>
|
|
|
|
|
|
- </UniformGrid>
|
|
|
- </DataTemplate>
|
|
|
- </DataGridTemplateColumn.CellTemplate>
|
|
|
- </DataGridTemplateColumn>
|
|
|
+ </UniformGrid>
|
|
|
+ </DataTemplate>
|
|
|
+ </DataGridTemplateColumn.CellTemplate>
|
|
|
+ </DataGridTemplateColumn>
|
|
|
|
|
|
- </DataGrid.Columns>
|
|
|
+ </DataGrid.Columns>
|
|
|
|
|
|
- </DataGrid>
|
|
|
+ </DataGrid>
|
|
|
|
|
|
+ </Grid>
|
|
|
</Grid>
|
|
|
- </Grid>
|
|
|
- <Border Grid.Row="3" BorderBrush="#CBCBCB" BorderThickness="0,1" />
|
|
|
+ </ScrollViewer>
|
|
|
+ <Border Grid.Row="3" BorderBrush="#CBCBCB" BorderThickness="0,1" />
|
|
|
<Button Grid.Row="4" HorizontalAlignment="Right" Content="保存测试项" Width="80" Margin="5,0" Command="{Binding SureCommand}" Style="{StaticResource NormalButtonStyle}" />
|
|
|
</Grid>
|
|
|
|