|
@@ -26,18 +26,24 @@
|
|
|
<Setter Property="Margin" Value="0,0,5,0"/>
|
|
|
</Style>
|
|
|
|
|
|
- <!--侧滑栏弹出动画-,控制RenderTransfer的x轴坐标-->
|
|
|
- <Storyboard x:Key="UserInfoStoryboard">
|
|
|
- <DoubleAnimation Duration="0:0:0.2" To="200"
|
|
|
- Storyboard.TargetName="tt"
|
|
|
- Storyboard.TargetProperty="X"/>
|
|
|
- </Storyboard>
|
|
|
- <!--侧滑栏关闭动画-,控制RenderTransfer的x轴坐标-->
|
|
|
- <Storyboard x:Key="CloseUserInfoStoryboard">
|
|
|
- <DoubleAnimation Duration="0:0:0.1"
|
|
|
- Storyboard.TargetName="tt"
|
|
|
- Storyboard.TargetProperty="X"/>
|
|
|
- </Storyboard>
|
|
|
+ <Style x:Key="CenterAlignedGroupBoxStyle" TargetType="{x:Type GroupBox}">
|
|
|
+ <Setter Property="Template">
|
|
|
+ <Setter.Value>
|
|
|
+ <ControlTemplate TargetType="GroupBox">
|
|
|
+ <Grid>
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition Height="Auto"/>
|
|
|
+ <RowDefinition Height="*"/>
|
|
|
+ </Grid.RowDefinitions>
|
|
|
+ <Border Grid.Row="0" Background="BlueViolet" CornerRadius="5" Padding="5">
|
|
|
+ <TextBlock Text="{TemplateBinding Header}" HorizontalAlignment="Right"/>
|
|
|
+ </Border>
|
|
|
+ <ContentControl Grid.Row="1" Content="{TemplateBinding Content}"/>
|
|
|
+ </Grid>
|
|
|
+ </ControlTemplate>
|
|
|
+ </Setter.Value>
|
|
|
+ </Setter>
|
|
|
+ </Style>
|
|
|
</UserControl.Resources>
|
|
|
|
|
|
<Grid>
|
|
@@ -46,400 +52,394 @@
|
|
|
<b:InvokeCommandAction Command="{Binding OnLoadCommand}" CommandParameter="{Binding ElementName=tt}"/>
|
|
|
</b:EventTrigger>
|
|
|
</b:Interaction.Triggers>
|
|
|
- <Grid.ColumnDefinitions>
|
|
|
- <ColumnDefinition/>
|
|
|
- <ColumnDefinition Width="300"/>
|
|
|
- </Grid.ColumnDefinitions>
|
|
|
- <Grid Grid.Column="0" x:Name="EditGrid" Grid.ColumnSpan="2">
|
|
|
-
|
|
|
- <Grid.RowDefinitions>
|
|
|
- <RowDefinition Height="50" />
|
|
|
-
|
|
|
- <RowDefinition />
|
|
|
-
|
|
|
- </Grid.RowDefinitions>
|
|
|
-
|
|
|
- <StackPanel Orientation="Horizontal" Grid.Row="0" Margin="10">
|
|
|
- <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 ScheduleName}" >
|
|
|
- <b:Interaction.Triggers>
|
|
|
- <b:EventTrigger EventName="LostFocus">
|
|
|
- <b:InvokeCommandAction Command="{Binding TxtLostFocusCommand}" CommandParameter="{Binding ElementName=TBSeriesDescription}"/>
|
|
|
- </b:EventTrigger>
|
|
|
-
|
|
|
- </b:Interaction.Triggers>
|
|
|
-
|
|
|
- </TextBox>
|
|
|
- </StackPanel>
|
|
|
-
|
|
|
- <Button Content="保存测试方案" Width="80" Margin="5,0" Command="{Binding SaveAllSchCommand}" Style="{StaticResource NormalButtonStyle}" />
|
|
|
-
|
|
|
- </StackPanel>
|
|
|
- <Border Grid.Row="0" BorderBrush="#CBCBCB" BorderThickness="0,1" />
|
|
|
-
|
|
|
-
|
|
|
- <Expander Grid.Row="1" IsExpanded="True" >
|
|
|
- <Expander.Header>
|
|
|
- <Label Content="新增测试项" FontSize="10"/>
|
|
|
- </Expander.Header>
|
|
|
- <Grid>
|
|
|
- <Grid.RowDefinitions>
|
|
|
- <RowDefinition Height="50"/>
|
|
|
- <RowDefinition/>
|
|
|
- <RowDefinition/>
|
|
|
- <RowDefinition/>
|
|
|
- <RowDefinition Height="50"/>
|
|
|
- </Grid.RowDefinitions>
|
|
|
- <StackPanel Grid.Row="0" Orientation="Horizontal">
|
|
|
- <Button HorizontalAlignment="Left" Content="选择已有测试项" Width="100" Margin="5,0" Command="{Binding OpenExistCommand}" CommandParameter="{Binding DeviceKindName}" Style="{StaticResource NormalButtonStyle}" />
|
|
|
- <StackPanel Orientation="Horizontal" >
|
|
|
- <TextBlock Text="测试项类型:" Style="{StaticResource NormalTextBlockStyle}" Margin="10,0,5,0"/>
|
|
|
- <ComboBox Height="28" Width="120" ItemsSource="{Binding TestKinds}" SelectedItem="{Binding SelectTest}" />
|
|
|
+ <ScrollViewer>
|
|
|
+ <Grid >
|
|
|
+
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition Height="50" />
|
|
|
+ <RowDefinition Height="600" />
|
|
|
+ <RowDefinition Height="500"/>
|
|
|
+
|
|
|
+ </Grid.RowDefinitions>
|
|
|
+
|
|
|
+ <DockPanel Grid.Row="0" Margin="10" LastChildFill="False">
|
|
|
+ <StackPanel Orientation="Horizontal" Grid.Row="4" HorizontalAlignment="Center">
|
|
|
+ <TextBlock Text="设备类型:" Style="{StaticResource NormalTextBlockStyle}" Margin="10,0,5,0" Width="60"/>
|
|
|
+ <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 ScheduleName}" >
|
|
|
+ <b:Interaction.Triggers>
|
|
|
+ <b:EventTrigger EventName="LostFocus">
|
|
|
+ <b:InvokeCommandAction Command="{Binding TxtLostFocusCommand}" CommandParameter="{Binding ElementName=TBSeriesDescription}"/>
|
|
|
+ </b:EventTrigger>
|
|
|
+
|
|
|
+ </b:Interaction.Triggers>
|
|
|
+
|
|
|
+ </TextBox>
|
|
|
+ </StackPanel>
|
|
|
+ <Button Content="取消" Width="80" Margin="5,0" Command="{Binding CancelCommand}" Style="{StaticResource NormalButtonStyle}" DockPanel.Dock="Right" />
|
|
|
+ <Button Content="提交" Width="80" Margin="5,0" Command="{Binding SaveAllSchCommand}" Style="{StaticResource NormalButtonStyle}" DockPanel.Dock="Right" />
|
|
|
+
|
|
|
+ </DockPanel>
|
|
|
+ <Border Grid.Row="0" BorderBrush="#CBCBCB" BorderThickness="0,1" />
|
|
|
+
|
|
|
+
|
|
|
+ <Border Grid.Row="1" BorderBrush="#409EFF" BorderThickness="1" Margin="5" >
|
|
|
+
|
|
|
+ <Grid>
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition Height="50"/>
|
|
|
+ <RowDefinition Height="50"/>
|
|
|
+ <RowDefinition/>
|
|
|
+ <RowDefinition/>
|
|
|
+ <RowDefinition/>
|
|
|
+ <RowDefinition Height="50"/>
|
|
|
+ </Grid.RowDefinitions>
|
|
|
+ <StackPanel Grid.Row="0" Orientation="Horizontal">
|
|
|
+ <StackPanel Orientation="Horizontal" >
|
|
|
+ <TextBlock Text="|" TextAlignment="Center" VerticalAlignment="Center" Foreground="#409EFF" Margin="5,0,5,0"/>
|
|
|
+ <TextBlock Text="测试方案明细" Style="{StaticResource NormalTextBlockStyle}" Margin="0,0,5,0"/>
|
|
|
+ </StackPanel>
|
|
|
</StackPanel>
|
|
|
- <StackPanel Orientation="Horizontal">
|
|
|
- <TextBlock Text="测试项名称:" Style="{StaticResource NormalTextBlockStyle}" Margin="10,0,5,0"/>
|
|
|
- <TextBox Height="28" Width="120" Text="{Binding TestName}"/>
|
|
|
+ <StackPanel Grid.Row="1" Orientation="Horizontal">
|
|
|
+
|
|
|
+ <StackPanel Orientation="Horizontal" >
|
|
|
+ <TextBlock Text="测试项类型:" Style="{StaticResource NormalTextBlockStyle}" Margin="10,0,5,0"/>
|
|
|
+ <ComboBox Height="28" Width="120" ItemsSource="{Binding TestKinds}" SelectedItem="{Binding SelectTest}" />
|
|
|
+ </StackPanel>
|
|
|
+ <StackPanel Orientation="Horizontal">
|
|
|
+ <TextBlock Text="测试项名称:" Style="{StaticResource NormalTextBlockStyle}" Margin="10,0,5,0"/>
|
|
|
+ <TextBox Height="28" Width="120" Text="{Binding TestName}"/>
|
|
|
+ </StackPanel>
|
|
|
</StackPanel>
|
|
|
- </StackPanel>
|
|
|
|
|
|
- <Border Grid.Row="0" BorderBrush="#CBCBCB" BorderThickness="1" />
|
|
|
- <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>
|
|
|
+ <Border Grid.Row="1" BorderBrush="#CBCBCB" BorderThickness="1" />
|
|
|
+ <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 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.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.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>
|
|
|
- </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"
|
|
|
+ <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"
|
|
|
+ <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"
|
|
|
+ <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>
|
|
|
- </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>
|
|
|
+ </ScrollViewer>
|
|
|
+ <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 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.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 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>
|
|
|
- </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"
|
|
|
+ <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>
|
|
|
- </ScrollViewer>
|
|
|
-
|
|
|
- <Border Grid.Row="2" BorderBrush="#CBCBCB" BorderThickness="0,1,0,0" />
|
|
|
-
|
|
|
- <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>
|
|
|
+ </ScrollViewer>
|
|
|
+
|
|
|
+ <Border Grid.Row="3" BorderBrush="#CBCBCB" BorderThickness="0,1,0,0" />
|
|
|
+
|
|
|
+ <ScrollViewer Grid.Row="4">
|
|
|
+ <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"/>
|
|
|
+
|
|
|
+ </DockPanel>
|
|
|
+ </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 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>
|
|
|
- </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"
|
|
|
+ <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>
|
|
|
- </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>
|
|
|
-
|
|
|
- </Expander>
|
|
|
-
|
|
|
- </Grid>
|
|
|
- <Grid Grid.Column="1">
|
|
|
- <StackPanel>
|
|
|
- <Button Name="btnAlarm" Content=">>打开已有项" Height="24" Style="{StaticResource NormalButtonStyle}"
|
|
|
- Width="auto" HorizontalAlignment="Right" Cursor="Hand" Command="{Binding DisAnoCommand}" Click="btnAlarm_Click"/>
|
|
|
- </StackPanel>
|
|
|
- </Grid>
|
|
|
- <!--抽屉侧滑栏-->
|
|
|
- <!--侧滑栏弹出是通过RenderTransform的x轴的变化动画来实现的,通过按钮的click的EventTrigger-->
|
|
|
- <Border Width="300" HorizontalAlignment="Right" IsHitTestVisible="True" Margin="0,30,0,0" >
|
|
|
-
|
|
|
- <!--通过RenderTransform的X坐标变为0的动画实现侧滑栏弹出-->
|
|
|
- <Border.RenderTransform>
|
|
|
- <TranslateTransform X="600" x:Name="tt"/>
|
|
|
- </Border.RenderTransform>
|
|
|
- <Grid>
|
|
|
- <Grid.RowDefinitions>
|
|
|
- <RowDefinition Height="35"/>
|
|
|
- <RowDefinition />
|
|
|
-
|
|
|
- </Grid.RowDefinitions>
|
|
|
- <TextBlock Grid.Row="0" Text="已有测试项" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="16" Foreground="Black" Margin="5,0,0,0"/>
|
|
|
+ </ScrollViewer>
|
|
|
+ <Border Grid.Row="4" BorderBrush="#CBCBCB" BorderThickness="0,1" />
|
|
|
+ <StackPanel Grid.Row="5" Orientation="Horizontal" HorizontalAlignment="Right">
|
|
|
+ <Button HorizontalAlignment="Left" Content="选择已有测试项" Width="100" Margin="5,0" Command="{Binding OpenExistCommand}" CommandParameter="{Binding DeviceKindName}" Style="{StaticResource NormalButtonStyle}" />
|
|
|
+
|
|
|
+ <Button HorizontalAlignment="Right" Content="保存测试项" Width="80" Margin="5,0" Command="{Binding SureCommand}" Style="{StaticResource NormalButtonStyle}" />
|
|
|
+ </StackPanel>
|
|
|
|
|
|
+ </Grid>
|
|
|
|
|
|
-
|
|
|
- <DataGrid Grid.Row="2" ColumnWidth="*" AutoGenerateColumns="False" HeadersVisibility="All" CanUserAddRows="False" SelectionUnit="FullRow" SelectionMode="Single" RowHeaderWidth="0"
|
|
|
+ </Border>
|
|
|
+ <Border Grid.Row="2" BorderBrush="#409EFF" BorderThickness="1" Margin="5">
|
|
|
+ <StackPanel Orientation="Vertical">
|
|
|
+ <StackPanel Orientation="Horizontal" >
|
|
|
+ <TextBlock Text="|" TextAlignment="Center" VerticalAlignment="Center" Foreground="#409EFF" Margin="5,0,5,0"/>
|
|
|
+ <TextBlock Text="已添加测试项列表" Style="{StaticResource NormalTextBlockStyle}" Margin="0,0,5,0"/>
|
|
|
+ </StackPanel>
|
|
|
+ <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 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 Path=SelectedItem, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=DataGrid}}"/>
|
|
|
- </b:EventTrigger>
|
|
|
- </b:Interaction.Triggers>
|
|
|
- <DataGrid.Columns >
|
|
|
- <DataGridTextColumn Header="测试项" Binding="{Binding ItemName}" CellStyle="{StaticResource MyDataGridCellStyle}"/>
|
|
|
- <DataGridTextColumn Header="测试项类型" Binding="{Binding ItemType}" CellStyle="{StaticResource MyDataGridCellStyle}"/>
|
|
|
- <DataGridTemplateColumn Header="操作" Width="120" CellStyle="{StaticResource MyDataGridCellStyle}">
|
|
|
- <DataGridTemplateColumn.CellTemplate>
|
|
|
- <DataTemplate>
|
|
|
- <StackPanel Orientation="Horizontal">
|
|
|
- <Button Width="auto" Background="Transparent" HorizontalContentAlignment ="Left" Foreground="Black" Height="25" BorderThickness="0"
|
|
|
+ <b:Interaction.Triggers>
|
|
|
+ <b:EventTrigger EventName="SelectionChanged">
|
|
|
+ <b:InvokeCommandAction Command="{Binding DgSelectChangeCommand}"
|
|
|
+ CommandParameter="{Binding Path=SelectedItem, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=DataGrid}}"/>
|
|
|
+ </b:EventTrigger>
|
|
|
+ </b:Interaction.Triggers>
|
|
|
+ <DataGrid.Columns >
|
|
|
+ <DataGridTextColumn Header="测试项" Binding="{Binding ItemName}" CellStyle="{StaticResource MyDataGridCellStyle}"/>
|
|
|
+ <DataGridTextColumn Header="测试项类型" Binding="{Binding ItemType}" CellStyle="{StaticResource MyDataGridCellStyle}"/>
|
|
|
+ <DataGridTemplateColumn Header="操作" Width="120" 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 SchDtlId}" 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.DownCommand, RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=DataGrid}}" CommandParameter="{Binding SchDtlId}" 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.EditDetailCommand, RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=DataGrid}}" CommandParameter="{Binding SchDtlId}" 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>
|
|
|
+ </StackPanel>
|
|
|
+ </DataTemplate>
|
|
|
+ </DataGridTemplateColumn.CellTemplate>
|
|
|
+ </DataGridTemplateColumn>
|
|
|
+ </DataGrid.Columns>
|
|
|
|
|
|
- </DataGrid>
|
|
|
+ </DataGrid>
|
|
|
+ </StackPanel>
|
|
|
+
|
|
|
+ </Border>
|
|
|
|
|
|
</Grid>
|
|
|
- </Border>
|
|
|
+ </ScrollViewer>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
</Grid>
|
|
|
</UserControl>
|
|
|
|