优化台架启动界面

This commit is contained in:
2026-08-03 14:39:49 +08:00
parent a15334f02d
commit 7e6c342908

View File

@@ -4,201 +4,86 @@
xmlns:prism="http://prismlibrary.com/"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
prism:ViewModelLocator.AutoWireViewModel="True">
<Grid>
<!-- 工业深色背景 -->
<!-- 背景:多层柔光圆 -->
<Grid.Background>
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
<GradientStop Color="#0F172A" Offset="0"/>
<GradientStop Color="#020617" Offset="1"/>
<LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
<GradientStop Color="#E8F0FE" Offset="0"/>
<GradientStop Color="#F3E8FF" Offset="0.5"/>
<GradientStop Color="#FCE7F3" Offset="1"/>
</LinearGradientBrush>
</Grid.Background>
<!-- 背景装饰光斑 -->
<Ellipse Width="200" Height="200" Fill="#93C5FD" Opacity="0.3"
HorizontalAlignment="Left" VerticalAlignment="Top" Margin="-50,-50,0,0"/>
<Ellipse Width="150" Height="150" Fill="#C4B5FD" Opacity="0.3"
HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,-30,-30"/>
<!-- 工业卡片 -->
<Border Width="360"
Height="430"
CornerRadius="18"
Background="#111827"
BorderBrush="#334155"
BorderThickness="1"
HorizontalAlignment="Center"
VerticalAlignment="Center">
<!-- 中心磨砂卡片 -->
<Border Width="380" Height="440" CornerRadius="20"
Background="#CCFFFFFF" BorderBrush="#E2E8F0" BorderThickness="1"
HorizontalAlignment="Center" VerticalAlignment="Center">
<Border.Effect>
<DropShadowEffect BlurRadius="25"
ShadowDepth="8"
Opacity="0.5"/>
<DropShadowEffect BlurRadius="40" ShadowDepth="0" Opacity="0.12"/>
</Border.Effect>
<Grid Margin="28">
<Grid Margin="32">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!-- 顶部设备状态 -->
<StackPanel Grid.Row="0"
HorizontalAlignment="Center">
<materialDesign:PackIcon
Kind="Chip"
Width="30"
Height="30"
Foreground="#38BDF8"/>
<TextBlock Text="PROTOCOL CONTROLLER"
Margin="0,12,0,0"
FontSize="14"
FontWeight="Bold"
Foreground="#CBD5E1"
HorizontalAlignment="Center"/>
<StackPanel Orientation="Horizontal"
HorizontalAlignment="Center"
Margin="0,12,0,0">
<!-- 状态灯 -->
<Ellipse Width="10"
Height="10"
Fill="#22C55E"
Margin="0,0,8,0"/>
<TextBlock Text="{Binding TestStatus}"
FontSize="13"
Foreground="#94A3B8"/>
</StackPanel>
</StackPanel>
<!-- 中央启动按钮 -->
<Grid Grid.Row="1"
VerticalAlignment="Center"
HorizontalAlignment="Center">
<!-- 外圈 -->
<Ellipse Width="210"
Height="210"
Fill="#0B1220"
Stroke="#334155"
StrokeThickness="2"/>
<!-- 内圈 -->
<Ellipse Width="170"
Height="170"
Fill="#1E293B"
Stroke="#475569"
StrokeThickness="2"/>
<!-- 启动按钮 -->
<Button
Command="{Binding StartProtocolCommand}"
Width="130"
Height="130"
Background="#020617"
BorderBrush="#38BDF8"
BorderThickness="3"
Style="{StaticResource MaterialDesignFloatingActionButton}">
<Button.Resources>
<Style TargetType="Border">
<Setter Property="CornerRadius"
Value="65"/>
</Style>
</Button.Resources>
<Grid>
<materialDesign:PackIcon
Kind="Power"
Width="55"
Height="55"
Foreground="#38BDF8"/>
</Grid>
</Button>
</Grid>
<!-- 底部状态 -->
<StackPanel Grid.Row="2"
HorizontalAlignment="Center">
<Border Background="#052E16"
CornerRadius="8"
Padding="20,6">
<StackPanel Orientation="Horizontal">
<Ellipse Width="8"
Height="8"
Fill="#22C55E"
Margin="0,0,8,0"/>
<TextBlock Text="SYSTEM READY"
FontWeight="Bold"
FontSize="14"
Foreground="#4ADE80"/>
</StackPanel>
<!-- 顶部 -->
<StackPanel Grid.Row="0" HorizontalAlignment="Center">
<Border Width="64" Height="64" Background="#E0E7FF" CornerRadius="32">
<materialDesign:PackIcon Kind="Chip" Width="32" Height="32"
Foreground="#4F46E5"
HorizontalAlignment="Center"
VerticalAlignment="Center"/>
</Border>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0"
HorizontalAlignment="Center">
<TextBlock Text="点击启动按钮加载测试序列"
FontSize="12"
Foreground="#64748B"
Margin="0,12,0,0"
HorizontalAlignment="Center"/>
<TextBlock Text="{Binding TestStatus}" FontSize="13" Foreground="#64748B"/>
</StackPanel>
</StackPanel>
<!-- 中央按钮 -->
<Grid Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center">
<Button Width="130" Height="130"
Command="{Binding StartProtocolCommand}"
Background="#7C3AED" BorderBrush="#6D28D9" BorderThickness="0"
materialDesign:ElevationAssist.Elevation="Dp6">
<Button.Resources>
<Style TargetType="Border">
<Setter Property="CornerRadius" Value="65"/>
</Style>
</Button.Resources>
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<materialDesign:PackIcon Kind="Power" Width="44" Height="44"
Foreground="#FFFFFF" HorizontalAlignment="Center"/>
<TextBlock Text="START" Margin="0,6,0,0"
FontSize="14" FontWeight="Bold"
Foreground="#FFFFFF" HorizontalAlignment="Center"/>
</StackPanel>
</Button>
</Grid>
<!-- 底部 -->
<StackPanel Grid.Row="2" HorizontalAlignment="Center">
<Border Background="#E0E7FF" CornerRadius="8" Padding="16,6">
<StackPanel Orientation="Horizontal">
<Ellipse Width="8" Height="8" Fill="#4F46E5" Margin="0,0,6,0"/>
<TextBlock Text="系统准备中" FontSize="13"
FontWeight="Bold" Foreground="#4338CA"/>
</StackPanel>
</Border>
<TextBlock Text="点击按钮加载测试序列" Margin="0,10,0,0"
FontSize="12" Foreground="#94A3B8" HorizontalAlignment="Center"/>
</StackPanel>
</Grid>
</Border>
</Grid>
</UserControl>