|
@@ -0,0 +1,96 @@
|
|
|
+<UserControl x:Class="SAGA.GplotManage.SystemChecks.CheckSystemResultView"
|
|
|
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
+ xmlns:local="clr-namespace:SqliteTest"
|
|
|
+ mc:Ignorable="d"
|
|
|
+ d:DesignHeight="450" d:DesignWidth="800" Name="this" Height="{Binding Height,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UIElement}}"
|
|
|
+ Width="{Binding Width,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UIElement}}">
|
|
|
+ <UserControl.Resources>
|
|
|
+ <local:BoolToTextConverter x:Key="Corrected" TrueText="重新修改" FalseText="已改正"></local:BoolToTextConverter>
|
|
|
+ <local:BoolToTextConverter x:Key="Misinformation" TrueText="错误" FalseText="误报"></local:BoolToTextConverter>
|
|
|
+ <Style x:Key="CenterAlignmentStyle" TargetType="TextBlock">
|
|
|
+ <Setter Property="TextAlignment" Value="Center"/>
|
|
|
+ <Setter Property="VerticalAlignment" Value="Center"/>
|
|
|
+ </Style>
|
|
|
+ <Style TargetType="{x:Type GroupItem}" x:Key="GroupStyle">
|
|
|
+ <Setter Property="Template">
|
|
|
+ <Setter.Value>
|
|
|
+ <ControlTemplate TargetType="{x:Type GroupItem}">
|
|
|
+ <Expander IsExpanded="False" Foreground="Black" BorderBrush="Black" BorderThickness="0,0,0,1">
|
|
|
+ <Expander.Header>
|
|
|
+ <StackPanel Orientation="Horizontal" Margin="0,1" Background="BlanchedAlmond" HorizontalAlignment="Stretch">
|
|
|
+ <TextBlock FontWeight="Bold" Text="{Binding Path=Name}" Margin="0,0,10,0"/>
|
|
|
+ <TextBlock FontWeight="Bold" Text="{Binding Path=ItemCount,StringFormat=({0})}"/>
|
|
|
+ </StackPanel>
|
|
|
+ </Expander.Header>
|
|
|
+ <Expander.Content>
|
|
|
+ <ItemsPresenter />
|
|
|
+ </Expander.Content>
|
|
|
+ </Expander>
|
|
|
+ </ControlTemplate>
|
|
|
+ </Setter.Value>
|
|
|
+ </Setter>
|
|
|
+ </Style>
|
|
|
+ </UserControl.Resources>
|
|
|
+ <Grid>
|
|
|
+ <DataGrid x:Name="datagrid" RowHeight="30" AlternationCount="2" SelectionMode="Single" SelectionUnit="Cell" AutoGenerateColumns="False" CanUserAddRows="False"
|
|
|
+ ItemsSource="{Binding ItemsSource,ElementName=this}" >
|
|
|
+ <DataGrid.RowStyle>
|
|
|
+ <Style TargetType="DataGridRow">
|
|
|
+ <Setter Property="Height" Value="30"></Setter>
|
|
|
+ <Style.Triggers>
|
|
|
+ <Trigger Property="ItemsControl.AlternationIndex"
|
|
|
+ Value="0">
|
|
|
+ <Setter Property="Background" Value="White" />
|
|
|
+ </Trigger>
|
|
|
+ <Trigger Property="ItemsControl.AlternationIndex"
|
|
|
+ Value="1">
|
|
|
+ <Setter Property="Background" Value="#FFE6E3DD" />
|
|
|
+ </Trigger>
|
|
|
+ </Style.Triggers>
|
|
|
+ </Style>
|
|
|
+ </DataGrid.RowStyle>
|
|
|
+ <DataGrid.CellStyle>
|
|
|
+ <Style TargetType="DataGridCell">
|
|
|
+ <!--<Setter Property="TextBlock.VerticalAlignment" Value="Center"></Setter>
|
|
|
+ <Setter Property="TextBlock.TextAlignment" Value="Center"></Setter>
|
|
|
+ <Setter Property="VerticalContentAlignment" Value="Center"></Setter>-->
|
|
|
+ </Style>
|
|
|
+ </DataGrid.CellStyle>
|
|
|
+ <DataGrid.GroupStyle>
|
|
|
+ <GroupStyle ContainerStyle="{StaticResource GroupStyle}">
|
|
|
+ <GroupStyle.Panel>
|
|
|
+ <ItemsPanelTemplate>
|
|
|
+ <DataGridRowsPresenter/>
|
|
|
+ </ItemsPanelTemplate>
|
|
|
+ </GroupStyle.Panel>
|
|
|
+ </GroupStyle>
|
|
|
+ </DataGrid.GroupStyle>
|
|
|
+ <DataGrid.ColumnHeaderStyle>
|
|
|
+ <Style TargetType="DataGridColumnHeader">
|
|
|
+ <Setter Property="HorizontalContentAlignment" Value="Center"></Setter>
|
|
|
+ </Style>
|
|
|
+ </DataGrid.ColumnHeaderStyle>
|
|
|
+ <DataGrid.Columns>
|
|
|
+ <DataGridTextColumn IsReadOnly="True" Width="*" MinWidth="80" Header="BIMID" Binding="{Binding Name}" ElementStyle="{StaticResource CenterAlignmentStyle}"></DataGridTextColumn>
|
|
|
+ <DataGridTextColumn IsReadOnly="True" Width="*" MinWidth="100" Header="管网类型" ElementStyle="{StaticResource CenterAlignmentStyle}"></DataGridTextColumn>
|
|
|
+ <DataGridTextColumn IsReadOnly="True" Width="*" MinWidth="80" Header="流向" ElementStyle="{StaticResource CenterAlignmentStyle}"></DataGridTextColumn>
|
|
|
+ <DataGridTemplateColumn Header="操作" Width="Auto" MinWidth="350">
|
|
|
+ <DataGridTemplateColumn.CellTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <StackPanel Orientation="Horizontal" HorizontalAlignment="Stretch" >
|
|
|
+ <Button Width="80" VerticalAlignment="Center" Content="模型定位" Command="{x:Static local:CheckSystemResultView.FixedPositionCommand}" CommandParameter="{Binding}" Margin="5,0,5,0"/>
|
|
|
+ <Button Width="80" VerticalAlignment="Center" Content="{Binding IsCorrected,Converter={StaticResource Corrected}}" Command="{x:Static local:CheckSystemResultView.CorrectedCommand}" CommandParameter="{Binding}" Margin="5,0,5,0">
|
|
|
+ </Button>
|
|
|
+ <Button Width="80" VerticalAlignment="Center" Content="{Binding IsMisinformation,Converter={StaticResource Misinformation}}" Command="{x:Static local:CheckSystemResultView.MakeMisinformedCommand}" CommandParameter="{Binding}" Margin="5,0,5,0">
|
|
|
+ </Button>
|
|
|
+ </StackPanel>
|
|
|
+ </DataTemplate>
|
|
|
+ </DataGridTemplateColumn.CellTemplate>
|
|
|
+ </DataGridTemplateColumn>
|
|
|
+ </DataGrid.Columns>
|
|
|
+ </DataGrid>
|
|
|
+ </Grid>
|
|
|
+</UserControl>
|