You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
359 lines
19 KiB
359 lines
19 KiB
<Border x:Class="SparkClient.Views.Grading.GradingLoading" |
|
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:hc="https://handyorg.github.io/handycontrol" |
|
xmlns:local="clr-namespace:SparkClient.Views.Grading" |
|
xmlns:hx="http://helix-toolkit.org/wpf/SharpDX" |
|
xmlns:userControl="clr-namespace:SparkClient.Views.UserControl" |
|
mc:Ignorable="d" |
|
d:DesignWidth="1920" |
|
d:DesignHeight="600" |
|
> |
|
<Border.Resources> |
|
<Style x:Key="BorderRowStyle" TargetType="Border"> |
|
<Setter Property="CornerRadius" Value="15" /> |
|
<Setter Property="Background" Value="#ffffff" /> |
|
<Setter Property="Padding" Value="5 10" /> |
|
<Setter Property="Margin" Value="2 3" /> |
|
</Style> |
|
|
|
<Style x:Key="CustomDataGridRowStyle" TargetType="DataGridRow"> |
|
<Setter Property="Margin" Value="0,0,0,2"/> |
|
<Setter Property="Height" Value="50"/> |
|
<!-- 禁用所有系统默认视觉效果 --> |
|
<Setter Property="FocusVisualStyle" Value="{x:Null}"/> |
|
<Setter Property="SnapsToDevicePixels" Value="True"/> |
|
|
|
<Setter Property="Template"> |
|
<Setter.Value> |
|
<ControlTemplate TargetType="DataGridRow"> |
|
<!-- 核心技巧:用Grid做容器控制视觉层级 --> |
|
<Grid> |
|
<!-- 第1层:基础圆角背景 --> |
|
<Border x:Name="BaseBackground" |
|
CornerRadius="5" |
|
Background="{TemplateBinding Background}" |
|
Margin="2"/> |
|
|
|
<!-- 第2层:选中状态圆角层(默认隐藏) --> |
|
<Border x:Name="SelectedHighlight" |
|
CornerRadius="5" |
|
Background="Transparent" |
|
Margin="2"/> |
|
|
|
<!-- 第3层:内容展示层(不受覆盖影响) --> |
|
<SelectiveScrollingGrid> |
|
<SelectiveScrollingGrid.ColumnDefinitions> |
|
<ColumnDefinition Width="Auto"/> |
|
<ColumnDefinition Width="*"/> |
|
</SelectiveScrollingGrid.ColumnDefinitions> |
|
<DataGridCellsPresenter Grid.Column="1"/> |
|
<DataGridRowHeader Grid.Column="0"/> |
|
</SelectiveScrollingGrid> |
|
</Grid> |
|
|
|
<!-- 状态触发器 --> |
|
<ControlTemplate.Triggers> |
|
|
|
<!-- 强制清除HandyControl的默认选中边框 --> |
|
<Trigger Property="IsKeyboardFocusWithin" Value="True"> |
|
<Setter Property="BorderBrush" Value="Transparent"/> |
|
</Trigger> |
|
</ControlTemplate.Triggers> |
|
</ControlTemplate> |
|
</Setter.Value> |
|
</Setter> |
|
|
|
<Style.Triggers> |
|
<!-- 交替行背景色 --> |
|
<Trigger Property="ItemsControl.AlternationIndex" Value="0"> |
|
<Setter Property="Background" Value="#D4FCFF"/> |
|
</Trigger> |
|
<Trigger Property="ItemsControl.AlternationIndex" Value="1"> |
|
<Setter Property="Background" Value="#E4ECFF"/> |
|
</Trigger> |
|
</Style.Triggers> |
|
</Style> |
|
|
|
<Style x:Key="CustomColumnHeaderStyle" TargetType="DataGridColumnHeader"> |
|
<Setter Property="Background" Value="Transparent"/> |
|
<Setter Property="HorizontalContentAlignment" Value="Center"/> |
|
<Setter Property="VerticalContentAlignment" Value="Center"/> |
|
</Style> |
|
|
|
<Style x:Key="CustomDataGridCellStyle" TargetType="DataGridCell"> |
|
<Setter Property="FocusVisualStyle" Value="{x:Null}"/> |
|
<Setter Property="HorizontalContentAlignment" Value="Center"/> |
|
<Setter Property="BorderThickness" Value="0"/> |
|
<Setter Property="VerticalContentAlignment" Value="Center"/> |
|
</Style> |
|
|
|
<Style x:Key="CenteredTextBlockStyle" TargetType="TextBlock"> |
|
<Setter Property="TextAlignment" Value="Center"/> |
|
<Setter Property="HorizontalAlignment" Value="Stretch"/> |
|
<Setter Property="VerticalAlignment" Value="Center"/> |
|
</Style> |
|
|
|
</Border.Resources> |
|
<Grid > |
|
<Grid.ColumnDefinitions> |
|
<ColumnDefinition MinWidth="300" Width="5*" /> |
|
<ColumnDefinition Width="Auto" /> |
|
<ColumnDefinition MinWidth="300" Width="4*" /> |
|
</Grid.ColumnDefinitions> |
|
<Grid.RowDefinitions> |
|
<RowDefinition Height="Auto"></RowDefinition> |
|
<RowDefinition Height="10"></RowDefinition> |
|
<RowDefinition Height="*"></RowDefinition> |
|
</Grid.RowDefinitions> |
|
|
|
<Border Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3" Style="{StaticResource BorderRowStyle}"> |
|
<Grid> |
|
<Grid.ColumnDefinitions> |
|
<!-- 保存 --> |
|
<ColumnDefinition Width="Auto"/> |
|
<!-- 导出 --> |
|
<ColumnDefinition Width="Auto"/> |
|
<!-- DS --> |
|
<ColumnDefinition Width="Auto"/> |
|
<ColumnDefinition Width="Auto"/> |
|
<!-- 间隔 --> |
|
<ColumnDefinition Width="*"/> |
|
<!-- 标准 --> |
|
<ColumnDefinition Width="Auto"/> |
|
<!-- 形状 --> |
|
<ColumnDefinition Width="Auto"/> |
|
<!-- 管部 --> |
|
<ColumnDefinition Width="Auto"/> |
|
<!-- 亭部 --> |
|
<ColumnDefinition Width="Auto"/> |
|
<!-- 重量 --> |
|
<ColumnDefinition Width="Auto"/> |
|
<!-- 切工等级 --> |
|
<ColumnDefinition Width="Auto"/> |
|
<!-- 对称等级 --> |
|
<ColumnDefinition Width="Auto"/> |
|
</Grid.ColumnDefinitions> |
|
<!-- 保存按钮 --> |
|
<Button Grid.Column="0" Padding="0" Margin="10 0 0 0" Height="50" BorderThickness="0" IsEnabled="{Binding IsEnabled}" |
|
Background="Transparent" FocusVisualStyle="{x:Null}" Command="{Binding SaveFileCommand}" ForceCursor="True"> |
|
<Border |
|
HorizontalAlignment="Center" |
|
VerticalAlignment="Center" |
|
Margin="0 0 0 0" |
|
Padding="10, 10" |
|
Width="100" |
|
BorderThickness="0" |
|
CornerRadius="20"> |
|
|
|
<Border.Background> |
|
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1"> |
|
<GradientStop Color="#38C8BF" Offset="0"/> |
|
<GradientStop Color="#1FB2A9" Offset="1"/> |
|
</LinearGradientBrush> |
|
</Border.Background> |
|
<TextBlock FontSize="18" TextAlignment="Center" Foreground="#ffffff" IsEnabled="False" /> |
|
</Border> |
|
</Button> |
|
<!-- 导出按钮 --> |
|
<Button Grid.Column="1" Padding="0" Margin="10 0" Height="50" BorderThickness="0" IsEnabled="{Binding IsEnabled}" |
|
Background="Transparent" FocusVisualStyle="{x:Null}" Command="{Binding SaveAsCommand}" > |
|
<Border |
|
HorizontalAlignment="Center" |
|
VerticalAlignment="Center" |
|
Margin="0 0 0 0" |
|
Padding="10, 10" |
|
Width="100" |
|
BorderThickness="0" |
|
CornerRadius="20"> |
|
<Border.Background> |
|
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1"> |
|
<GradientStop Color="#40B1FF" Offset="0"/> |
|
<GradientStop Color="#3C9CE6" Offset="1"/> |
|
</LinearGradientBrush> |
|
</Border.Background> |
|
<TextBlock FontSize="18" TextAlignment="Center" Foreground="#ffffff" IsEnabled="False" /> |
|
</Border> |
|
</Button> |
|
<!-- DS 下拉列表 --> |
|
<Border Grid.Column="3" Background="#E0E2EE" Width="170" Height="40" CornerRadius="10" Margin="2,20,30,20" > |
|
<Grid Margin="-2,0,2,0"> |
|
<Grid.ColumnDefinitions> |
|
<ColumnDefinition Width="*" /> |
|
<ColumnDefinition Width="Auto" /> |
|
<ColumnDefinition Width="Auto" /> |
|
<ColumnDefinition Width="*" /> |
|
</Grid.ColumnDefinitions> |
|
<!-- <TextBlock Grid.Column="1" Text="{StaticResource DiamondResultDs}" TextAlignment="Center" VerticalAlignment="Center" --> |
|
<!-- FontSize="16"/> --> |
|
<!-- <ComboBox Grid.Column="2" ItemsSource="{Binding DSList}" DisplayMemberPath="Key" SelectedValuePath="Value" --> |
|
<!-- SelectedValue="{Binding DS, Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" --> |
|
<!-- Margin="10 0 0 0" FontSize="16" Width="80" BorderBrush="Black" BorderThickness="0" Height="30"/> --> |
|
</Grid> |
|
</Border> |
|
<!-- 打印按钮 --> |
|
<Button Grid.Column="2" Padding="0" Margin="0,0,10,0" Height="50" BorderThickness="0" IsEnabled="{Binding IsEnabled}" |
|
Background="Transparent" FocusVisualStyle="{x:Null}" Command="{Binding ThermalPrintCommand}" HorizontalAlignment="Left"> |
|
<Border |
|
HorizontalAlignment="Center" |
|
VerticalAlignment="Center" |
|
Margin="0 0 0 0" |
|
Padding="10, 10" |
|
Width="100" |
|
BorderThickness="0" |
|
CornerRadius="20"> |
|
<Border.Background> |
|
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1"> |
|
<GradientStop Color="#C26989B7" Offset="0"/> |
|
<GradientStop Color="#C26989B7" Offset="1"/> |
|
</LinearGradientBrush> |
|
</Border.Background> |
|
<TextBlock FontSize="18" TextAlignment="Center" Foreground="#ffffff" /> |
|
</Border> |
|
</Button> |
|
|
|
<!-- 卡片 --> |
|
<!-- 标准 --> |
|
<Border Grid.Column="5" Background="#EBEEF5" Width="170" Height="80" CornerRadius="10" Margin="0 0 10 0" IsEnabled="False"> |
|
<Grid> |
|
<Grid.RowDefinitions> |
|
<RowDefinition Height="*"/> |
|
<RowDefinition Height="Auto"/> |
|
<RowDefinition Height="Auto"/> |
|
<RowDefinition Height="*"/> |
|
</Grid.RowDefinitions> |
|
<TextBlock Grid.Row="1" TextAlignment="Center" VerticalAlignment="Center" |
|
FontSize="20" Foreground="Black" Margin="0 0 0 5"/> |
|
<TextBlock Grid.Row="2" TextAlignment="Center" VerticalAlignment="Center" |
|
FontSize="20" Foreground="#0063FF"/> |
|
</Grid> |
|
</Border> |
|
<!-- 形状 --> |
|
<Border Grid.Column="6" Background="#EBEEF5" Width="170" Height="80" CornerRadius="10" Margin="0 0 10 0"> |
|
<Grid> |
|
<Grid.RowDefinitions> |
|
<RowDefinition Height="*"/> |
|
<RowDefinition Height="Auto"/> |
|
<RowDefinition Height="Auto"/> |
|
<RowDefinition Height="*"/> |
|
</Grid.RowDefinitions> |
|
<TextBlock Grid.Row="1" TextAlignment="Center" VerticalAlignment="Center" |
|
FontSize="20" Foreground="Black" Margin="0 0 0 5"/> |
|
<TextBlock Grid.Row="2" TextAlignment="Center" VerticalAlignment="Center" Text="{Binding Shape}" |
|
FontSize="20" Foreground="#0063FF"/> |
|
</Grid> |
|
</Border> |
|
<!-- 冠部 --> |
|
<Border Grid.Column="7" Background="#EBEEF5" Width="170" Height="80" CornerRadius="10" Margin="0 0 10 0"> |
|
<Grid> |
|
<Grid.RowDefinitions> |
|
<RowDefinition Height="*"/> |
|
<RowDefinition Height="Auto"/> |
|
<RowDefinition Height="Auto"/> |
|
<RowDefinition Height="*"/> |
|
</Grid.RowDefinitions> |
|
<TextBlock Grid.Row="1" TextAlignment="Center" VerticalAlignment="Center" |
|
FontSize="20" Foreground="Black" Margin="0 0 0 5"/> |
|
<TextBlock Grid.Row="2" TextAlignment="Center" VerticalAlignment="Center" Text="{Binding CrownType}" |
|
FontSize="20" Foreground="#0063FF"/> |
|
</Grid> |
|
</Border> |
|
<!-- 亭部 --> |
|
<Border Grid.Column="8" Background="#EBEEF5" Width="170" Height="80" CornerRadius="10" Margin="0 0 10 0"> |
|
<Grid> |
|
<Grid.RowDefinitions> |
|
<RowDefinition Height="*"/> |
|
<RowDefinition Height="Auto"/> |
|
<RowDefinition Height="Auto"/> |
|
<RowDefinition Height="*"/> |
|
</Grid.RowDefinitions> |
|
<TextBlock Grid.Row="1" TextAlignment="Center" VerticalAlignment="Center" |
|
FontSize="20" Foreground="Black" Margin="0 0 0 5"/> |
|
<TextBlock Grid.Row="2" TextAlignment="Center" VerticalAlignment="Center" Text="{Binding PavType}" |
|
FontSize="20" Foreground="#0063FF"/> |
|
</Grid> |
|
</Border> |
|
<!-- 重量 --> |
|
<Border Grid.Column="9" Background="#EBEEF5" Width="170" Height="80" CornerRadius="10" Margin="0 0 10 0"> |
|
<Grid> |
|
<Grid.RowDefinitions> |
|
<RowDefinition Height="*"/> |
|
<RowDefinition Height="Auto"/> |
|
<RowDefinition Height="Auto"/> |
|
<RowDefinition Height="*"/> |
|
</Grid.RowDefinitions> |
|
<TextBlock Grid.Row="1" TextAlignment="Center" VerticalAlignment="Center" |
|
FontSize="20" Foreground="Black" Margin="0 0 0 5"/> |
|
<TextBlock Grid.Row="2" TextAlignment="Center" VerticalAlignment="Center" Text="{Binding Wight}" |
|
FontSize="20" Foreground="#0063FF"/> |
|
</Grid> |
|
</Border> |
|
<!-- 切工等级 --> |
|
<Border Grid.Column="10" Background="#EBEEF5" Width="170" Height="80" CornerRadius="10" Margin="0 0 10 0"> |
|
<Grid> |
|
<Grid.RowDefinitions> |
|
<RowDefinition Height="*"/> |
|
<RowDefinition Height="Auto"/> |
|
<RowDefinition Height="Auto"/> |
|
<RowDefinition Height="*"/> |
|
</Grid.RowDefinitions> |
|
<TextBlock Grid.Row="1" TextAlignment="Center" VerticalAlignment="Center" |
|
FontSize="20" Foreground="Black" Margin="0 0 0 5"/> |
|
<Border Grid.Row="2" Background="Transparent" CornerRadius="5" Width="100"> |
|
<TextBlock Grid.Row="2" TextAlignment="Center" VerticalAlignment="Center" |
|
FontSize="20" Foreground="Black" Padding="5"/> |
|
</Border> |
|
</Grid> |
|
</Border> |
|
<!-- 切工等级 --> |
|
<Border Grid.Column="11" Background="#EBEEF5" Width="170" Height="80" CornerRadius="10" Margin="0 0 10 0"> |
|
<Grid> |
|
<Grid.RowDefinitions> |
|
<RowDefinition Height="*"/> |
|
<RowDefinition Height="Auto"/> |
|
<RowDefinition Height="Auto"/> |
|
<RowDefinition Height="*"/> |
|
</Grid.RowDefinitions> |
|
<TextBlock Grid.Row="1" TextAlignment="Center" VerticalAlignment="Center" |
|
FontSize="20" Foreground="Black" Margin="0 0 0 5"/> |
|
<Border Grid.Row="2" Background="Transparent" CornerRadius="5" Width="100"> |
|
<TextBlock Grid.Row="2" TextAlignment="Center" VerticalAlignment="Center" Text="{Binding SymLevelTotal}" |
|
FontSize="20" Foreground="Black" Padding="5"/> |
|
</Border> |
|
</Grid> |
|
</Border> |
|
</Grid> |
|
</Border> |
|
|
|
<Border Grid.Row="2" Grid.Column="0" Style="{StaticResource BorderRowStyle}" > |
|
|
|
</Border> |
|
|
|
<GridSplitter Grid.Row="2" Grid.Column="1" Width="5" HorizontalAlignment="Stretch" Background="Transparent" IsEnabled="False"></GridSplitter> |
|
<Border Grid.Row="2" Grid.Column="2" Background="White" Style="{StaticResource BorderRowStyle}"> |
|
<Grid> |
|
<Grid.RowDefinitions> |
|
<RowDefinition Height="Auto" /> |
|
<RowDefinition Height="Auto" /> |
|
<RowDefinition Height="Auto" /> |
|
</Grid.RowDefinitions> |
|
|
|
<TextBox Grid.Row="0" Text="检测中,请稍等..." BorderBrush="Transparent" BorderThickness="0" |
|
TextAlignment="Center" FontSize="26"/> |
|
<Grid Grid.Row="1" > |
|
<Grid.RowDefinitions> |
|
<RowDefinition Height="Auto" /> |
|
<RowDefinition Height="Auto" /> |
|
</Grid.RowDefinitions> |
|
<Grid.ColumnDefinitions> |
|
<ColumnDefinition Width="*" /> |
|
<ColumnDefinition Width="Auto" /> |
|
<ColumnDefinition Width="*" /> |
|
</Grid.ColumnDefinitions> |
|
</Grid> |
|
</Grid> |
|
</Border> |
|
</Grid> |
|
</Border>
|
|
|