|
@@ -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="800" Width="1000" >
|
|
|
<!--<prism:Dialog.WindowStyle>
|
|
|
<Style TargetType="Window">
|
|
|
<Setter Property="SizeToContent" Value="WidthAndHeight" />
|
|
@@ -36,20 +36,30 @@
|
|
|
<Grid.RowDefinitions>
|
|
|
|
|
|
<RowDefinition Height="50" />
|
|
|
+ <RowDefinition Height="auto" />
|
|
|
+
|
|
|
<RowDefinition />
|
|
|
- <RowDefinition />
|
|
|
- <RowDefinition />
|
|
|
+
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
|
<StackPanel Orientation="Horizontal" Grid.Row="0" Margin="10">
|
|
|
- <StackPanel Orientation="Horizontal">
|
|
|
- <TextBlock Text="测试方案名称:" Style="{StaticResource NormalTextBlockStyle}" Margin="10,0,5,0"/>
|
|
|
- <TextBox Height="28" Width="120" Text="{Binding ScheduleName}" />
|
|
|
+ <StackPanel Orientation="Horizontal" Grid.Row="4" HorizontalAlignment="Center">
|
|
|
+ <TextBlock Text="所属设备类型:" Style="{StaticResource NormalTextBlockStyle}" Margin="10,0,5,0" TextAlignment="Right" Width="80"/>
|
|
|
+ <ComboBox Height="28" Width="120" ItemsSource="{Binding DeviceKindNameList}" SelectedItem="{Binding DeviceKindName}" />
|
|
|
</StackPanel>
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
- <TextBlock Text="设备类型:" Style="{StaticResource NormalTextBlockStyle}" Margin="10,0,5,0"/>
|
|
|
- <TextBox Height="28" Width="120" Text="{Binding DeviceKindName}"/>
|
|
|
+ <TextBlock Text="测试方案名称:" Style="{StaticResource NormalTextBlockStyle}" Margin="10,0,5,0"/>
|
|
|
+ <TextBox Height="28" Width="120" Text="{Binding ScheduleName}" >
|
|
|
+ <b:Interaction.Triggers>
|
|
|
+ <b:EventTrigger EventName="LostFocus">
|
|
|
+ <b:InvokeCommandAction Command="{Binding TxtLostFocusCommand}" CommandParameter="{Binding ElementName=TBSeriesDescription}"/>
|
|
|
+ </b:EventTrigger>
|
|
|
+
|
|
|
+ </b:Interaction.Triggers>
|
|
|
+
|
|
|
+ </TextBox>
|
|
|
</StackPanel>
|
|
|
+
|
|
|
<StackPanel Orientation="Horizontal" >
|
|
|
<TextBlock Text="测试项类型:" Style="{StaticResource NormalTextBlockStyle}" Margin="10,0,5,0"/>
|
|
|
<ComboBox Height="28" Width="120" ItemsSource="{Binding TestKinds}" SelectedItem="{Binding SelectTest}" />
|
|
@@ -62,255 +72,312 @@
|
|
|
<Button Content="重置" Width="80" Margin="5,0" Command="{Binding ResetCommand}" Style="{StaticResource NormalButtonStyle}" />
|
|
|
</StackPanel>
|
|
|
<Border Grid.Row="0" BorderBrush="#CBCBCB" BorderThickness="0,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">
|
|
|
+ <Expander Grid.Row="1" >
|
|
|
+ <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" >
|
|
|
+ <DataGrid.Columns >
|
|
|
+ <DataGridTextColumn Header="测试项" Binding="{Binding ItemName}" CellStyle="{StaticResource MyDataGridCellStyle}"/>
|
|
|
+ <DataGridTextColumn Header="测试项类型" Binding="{Binding ItemType}" CellStyle="{StaticResource MyDataGridCellStyle}"/>
|
|
|
+ <DataGridTemplateColumn Header="操作" Width="180" CellStyle="{StaticResource MyDataGridCellStyle}">
|
|
|
+ <DataGridTemplateColumn.CellTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <StackPanel Orientation="Horizontal">
|
|
|
+ <Button Width="auto" Background="Transparent" HorizontalContentAlignment ="Left" Foreground="Black" Height="25" BorderThickness="0"
|
|
|
+ Command="{Binding DataContext.UpCommand, 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.DownCommand, 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>
|
|
|
+
|
|
|
+ </StackPanel>
|
|
|
+ </DataTemplate>
|
|
|
+ </DataGridTemplateColumn.CellTemplate>
|
|
|
+ </DataGridTemplateColumn>
|
|
|
+ </DataGrid.Columns>
|
|
|
+
|
|
|
+ </DataGrid>
|
|
|
+ </Expander>
|
|
|
+
|
|
|
+ <Expander Grid.Row="2" IsExpanded="True" >
|
|
|
+ <Expander.Header>
|
|
|
+ <Label Content="新增测试项" FontSize="10"/>
|
|
|
+ </Expander.Header>
|
|
|
+ <Grid>
|
|
|
<Grid.RowDefinitions>
|
|
|
+ <RowDefinition Height="50"/>
|
|
|
<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>
|
|
|
- </Grid>
|
|
|
- </Grid>
|
|
|
- <Grid Grid.Column="2" >
|
|
|
- <Grid.RowDefinitions>
|
|
|
- <RowDefinition Height="30"/>
|
|
|
<RowDefinition/>
|
|
|
+ <RowDefinition Height="50"/>
|
|
|
</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>
|
|
|
-
|
|
|
- </UniformGrid>
|
|
|
- </DataTemplate>
|
|
|
- </DataGridTemplateColumn.CellTemplate>
|
|
|
- </DataGridTemplateColumn>
|
|
|
-
|
|
|
- </DataGrid.Columns>
|
|
|
-
|
|
|
- </DataGrid>
|
|
|
+ <Button Grid.Row="0" HorizontalAlignment="Left" Content="选择已有测试项" Width="100" Margin="5,0" Command="{Binding OpenCurrentCommand}" Style="{StaticResource NormalButtonStyle}" />
|
|
|
+ <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"/>
|
|
|
|
|
|
- </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"/>
|
|
|
+ </DockPanel>
|
|
|
+ </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" >
|
|
|
|
|
|
- </DockPanel>
|
|
|
- </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"
|
|
|
- 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"
|
|
|
- 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"
|
|
|
- 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>
|
|
|
-
|
|
|
- </UniformGrid>
|
|
|
- </DataTemplate>
|
|
|
- </DataGridTemplateColumn.CellTemplate>
|
|
|
- </DataGridTemplateColumn>
|
|
|
-
|
|
|
- </DataGrid.Columns>
|
|
|
-
|
|
|
- </DataGrid>
|
|
|
+ <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" >
|
|
|
|
|
|
- </Grid>
|
|
|
- </Grid>
|
|
|
- <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>
|
|
|
+ <StackPanel Orientation="Horizontal">
|
|
|
+ <TextBlock Text="删除" VerticalAlignment="Center" Foreground="Blue"/>
|
|
|
+ </StackPanel>
|
|
|
+ </Button>
|
|
|
+
|
|
|
+ </UniformGrid>
|
|
|
+ </DataTemplate>
|
|
|
+ </DataGridTemplateColumn.CellTemplate>
|
|
|
+ </DataGridTemplateColumn>
|
|
|
+
|
|
|
+ </DataGrid.Columns>
|
|
|
+
|
|
|
+ </DataGrid>
|
|
|
+
|
|
|
+ </Grid>
|
|
|
</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"/>
|
|
|
+ <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>
|
|
|
+ </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"
|
|
|
+ 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"
|
|
|
+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"
|
|
|
+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>
|
|
|
|
|
|
- </DockPanel>
|
|
|
+ </UniformGrid>
|
|
|
+ </DataTemplate>
|
|
|
+ </DataGridTemplateColumn.CellTemplate>
|
|
|
+ </DataGridTemplateColumn>
|
|
|
+
|
|
|
+ </DataGrid.Columns>
|
|
|
+
|
|
|
+ </DataGrid>
|
|
|
+
|
|
|
+ </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"
|
|
|
- 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"
|
|
|
- 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"
|
|
|
- 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>
|
|
|
-
|
|
|
- </UniformGrid>
|
|
|
- </DataTemplate>
|
|
|
- </DataGridTemplateColumn.CellTemplate>
|
|
|
- </DataGridTemplateColumn>
|
|
|
-
|
|
|
- </DataGrid.Columns>
|
|
|
-
|
|
|
- </DataGrid>
|
|
|
+ <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}" />
|
|
|
+
|
|
|
+ <TextBox x:Name="txtOut" TextWrapping="Wrap" Text="{Binding OutDetail,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" AcceptsReturn="True" KeyDown="txtOut_KeyDown"/>
|
|
|
|
|
|
+ </DockPanel>
|
|
|
+ </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"
|
|
|
+ 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"
|
|
|
+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"
|
|
|
+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>
|
|
|
+
|
|
|
+ </UniformGrid>
|
|
|
+ </DataTemplate>
|
|
|
+ </DataGridTemplateColumn.CellTemplate>
|
|
|
+ </DataGridTemplateColumn>
|
|
|
+
|
|
|
+ </DataGrid.Columns>
|
|
|
+
|
|
|
+ </DataGrid>
|
|
|
+
|
|
|
+ </Grid>
|
|
|
+ </Grid>
|
|
|
+ <Border Grid.Row="3" BorderBrush="#CBCBCB" BorderThickness="0,1" />
|
|
|
+ <Button Grid.Row="4" HorizontalAlignment="Left" Content="确认" Width="80" Margin="5,0" Command="{Binding SureCommand}" Style="{StaticResource NormalButtonStyle}" />
|
|
|
</Grid>
|
|
|
- </Grid>
|
|
|
- <Border Grid.Row="3" BorderBrush="#CBCBCB" BorderThickness="0,1,0,0" />
|
|
|
+
|
|
|
+ </Expander>
|
|
|
+
|
|
|
</Grid>
|
|
|
</UserControl>
|
|
|
|