improve:主题切换

This commit is contained in:
2025-10-04 21:55:55 +08:00
parent eef2a915fa
commit 402f8bb9f9
8 changed files with 224 additions and 78 deletions
+21 -19
View File
@@ -9,7 +9,7 @@
mc:Ignorable="d" WindowStyle="None" AllowsTransparency="True" Loaded="Window_Loaded"
WindowStartupLocation="CenterScreen"
Title="Ink Canvas 抽奖" Height="500" Width="900">
<Border x:Name="MainBorder" CornerRadius="10" BorderThickness="1" BorderBrush="#0066BF" Margin="0" ClipToBounds="True">
<Border x:Name="MainBorder" CornerRadius="10" BorderThickness="1" BorderBrush="{DynamicResource RandWindowBorderBrush}" Margin="0" ClipToBounds="True">
<Border.Background>
<ImageBrush x:Name="BackgroundImage" Stretch="UniformToFill" Opacity="1.0"/>
</Border.Background>
@@ -21,14 +21,14 @@
</Grid.ColumnDefinitions>
<Viewbox HorizontalAlignment="Center" Margin="20,0">
<ui:SimpleStackPanel Orientation="Horizontal" Spacing="50" MinHeight="470">
<Label Name="LabelOutput" FontSize="130" Content="" Block.TextAlignment="Center" HorizontalAlignment="Center" VerticalAlignment="Center"/>
<Label Name="LabelOutput2" FontSize="130" Visibility="Collapsed" Content="" Block.TextAlignment="Center" HorizontalAlignment="Center" VerticalAlignment="Center"/>
<Label Name="LabelOutput3" FontSize="130" Visibility="Collapsed" Content="" Block.TextAlignment="Center" HorizontalAlignment="Center" VerticalAlignment="Center"/>
<Label Name="LabelOutput" FontSize="130" Content="" Block.TextAlignment="Center" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{DynamicResource RandWindowTextForeground}"/>
<Label Name="LabelOutput2" FontSize="130" Visibility="Collapsed" Content="" Block.TextAlignment="Center" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{DynamicResource RandWindowTextForeground}"/>
<Label Name="LabelOutput3" FontSize="130" Visibility="Collapsed" Content="" Block.TextAlignment="Center" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{DynamicResource RandWindowTextForeground}"/>
</ui:SimpleStackPanel>
</Viewbox>
<ui:SimpleStackPanel Spacing="8" Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Center" Opacity="1" Name="PeopleControlPane" Width="256">
<StackPanel Orientation="Horizontal">
<Border x:Name="BorderBtnMinus" MouseUp="BorderBtnMinus_MouseUp" Background="#FBFBFD" Height="70" Width="70" CornerRadius="100">
<Border x:Name="BorderBtnMinus" MouseUp="BorderBtnMinus_MouseUp" Background="{DynamicResource RandWindowButtonBackground}" Height="70" Width="70" CornerRadius="100">
<Border.Effect>
<DropShadowEffect Direction="0" ShadowDepth="0" Opacity="0.15" BlurRadius="3"/>
</Border.Effect>
@@ -51,8 +51,8 @@
</Image>
</Viewbox>
</Border>
<TextBlock Name="LabelNumberCount" Text="1" FontFamily="Consolas" FontSize="55" Margin="10" Width="80" TextAlignment="Center"/>
<Border x:Name="BorderBtnAdd" MouseUp="BorderBtnAdd_MouseUp" Background="#FBFBFD" Height="70" Width="70" CornerRadius="100">
<TextBlock Name="LabelNumberCount" Text="1" FontFamily="Consolas" FontSize="55" Margin="10" Width="80" TextAlignment="Center" Foreground="{DynamicResource RandWindowTextForeground}"/>
<Border x:Name="BorderBtnAdd" MouseUp="BorderBtnAdd_MouseUp" Background="{DynamicResource RandWindowButtonBackground}" Height="70" Width="70" CornerRadius="100">
<Border.Effect>
<DropShadowEffect Direction="0" ShadowDepth="0" Opacity="0.15" BlurRadius="3"/>
</Border.Effect>
@@ -79,49 +79,51 @@
<ui:SimpleStackPanel Visibility="Collapsed" Margin="0,8,0,0" Orientation="Horizontal" HorizontalAlignment="Center" Spacing="24">
<CheckBox x:Name="NoHotStudents" MinWidth="0"
Content="不抽热门人选" IsThreeState="True"
HorizontalAlignment="Center" />
HorizontalAlignment="Center" Foreground="{DynamicResource RandWindowTextForeground}"/>
<CheckBox x:Name="NoShengPiZi" MinWidth="0"
Content="避开生僻字" IsThreeState="True"
HorizontalAlignment="Center" />
HorizontalAlignment="Center" Foreground="{DynamicResource RandWindowTextForeground}"/>
</ui:SimpleStackPanel>
<ui:SimpleStackPanel Visibility="Collapsed" Margin="0,0,0,8" Orientation="Horizontal" HorizontalAlignment="Center" Spacing="24">
<ComboBox Name="ComboBoxRandMode"
MinWidth="0"
IsEditable="False"
SelectedIndex="0"
IsReadOnly="True">
IsReadOnly="True"
Foreground="{DynamicResource RandWindowTextForeground}">
<ComboBoxItem>全都抽</ComboBoxItem>
<ComboBoxItem>只抽男</ComboBoxItem>
<ComboBoxItem>只抽女</ComboBoxItem>
</ComboBox>
</ui:SimpleStackPanel>
<Border x:Name="BorderBtnRand" MouseUp="BorderBtnRand_MouseUp" Background="#0066BF" Height="70" Width="200" CornerRadius="35">
<Border x:Name="BorderBtnRand" MouseUp="BorderBtnRand_MouseUp" Background="{DynamicResource RandWindowPrimaryButtonBackground}" Height="70" Width="200" CornerRadius="35">
<ui:SimpleStackPanel Margin="3,0" Spacing="20" Orientation="Horizontal" HorizontalAlignment="Center">
<Viewbox Margin="0,20">
<ui:SymbolIcon Name="SymbolIconStart" Symbol="Contact" Foreground="White"/>
</Viewbox>
<TextBlock Text="开抽" Foreground="White" FontSize="32" Margin="-1,-1,4,0" VerticalAlignment="Center"/>
<TextBlock Text="开抽" Foreground="{DynamicResource RandWindowPrimaryButtonForeground}" FontSize="32" Margin="-1,-1,4,0" VerticalAlignment="Center"/>
</ui:SimpleStackPanel>
</Border>
<ui:SimpleStackPanel Orientation="Horizontal" Spacing="8" Margin="0,16,0,0" HorizontalAlignment="Center">
<ComboBox Name="ComboBoxCallerType" Width="120" Height="50" VerticalAlignment="Center"
IsEditable="False" IsReadOnly="True" SelectedIndex="0">
IsEditable="False" IsReadOnly="True" SelectedIndex="0"
Foreground="{DynamicResource RandWindowTextForeground}">
<ComboBoxItem>ClassIsland点名</ComboBoxItem>
<ComboBoxItem>SecRandom点名</ComboBoxItem>
<ComboBoxItem>NamePicker点名</ComboBoxItem>
</ComboBox>
<Border x:Name="BorderBtnExternalCaller" MouseUp="BorderBtnExternalCaller_MouseUp" Background="#00B894" Height="50" Width="120" CornerRadius="25">
<Border x:Name="BorderBtnExternalCaller" MouseUp="BorderBtnExternalCaller_MouseUp" Background="{DynamicResource RandWindowSecondaryButtonBackground}" Height="50" Width="120" CornerRadius="25">
<ui:SimpleStackPanel Margin="3,0" Spacing="8" Orientation="Horizontal" HorizontalAlignment="Center">
<Viewbox Margin="0,10">
<ui:SymbolIcon Symbol="Globe" Foreground="White"/>
</Viewbox>
<TextBlock Text="外部点名" Foreground="White" FontSize="16" Margin="-1,-1,4,0" VerticalAlignment="Center"/>
<TextBlock Text="外部点名" Foreground="{DynamicResource RandWindowSecondaryButtonForeground}" FontSize="16" Margin="-1,-1,4,0" VerticalAlignment="Center"/>
</ui:SimpleStackPanel>
</Border>
</ui:SimpleStackPanel>
</ui:SimpleStackPanel>
</Grid>
<Border UseLayoutRounding="True" Canvas.Bottom="8" Canvas.Right="8" x:Name="BorderBtnHelp" MouseUp="BorderBtnHelp_MouseUp" Background="#FBFBFD" Grid.Column="1" Margin="10,10,60,10" Height="40" VerticalAlignment="Bottom" HorizontalAlignment="Right" CornerRadius="20">
<Border UseLayoutRounding="True" Canvas.Bottom="8" Canvas.Right="8" x:Name="BorderBtnHelp" MouseUp="BorderBtnHelp_MouseUp" Background="{DynamicResource RandWindowButtonBackground}" Grid.Column="1" Margin="10,10,60,10" Height="40" VerticalAlignment="Bottom" HorizontalAlignment="Right" CornerRadius="20">
<Border.Effect>
<DropShadowEffect Direction="0" ShadowDepth="0" Opacity="0.15" BlurRadius="3"/>
</Border.Effect>
@@ -129,15 +131,15 @@
<Viewbox Margin="15,12">
<ui:SymbolIcon Symbol="People" Foreground="Black"/>
</Viewbox>
<TextBlock Margin="-5,12,15,12" Name="TextBlockPeopleCount" Text="点击此处以导入名单" FontSize="16" HorizontalAlignment="Center" VerticalAlignment="Center"/>
<TextBlock Margin="-5,12,15,12" Name="TextBlockPeopleCount" Text="点击此处以导入名单" FontSize="16" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{DynamicResource RandWindowTextForeground}"/>
</ui:SimpleStackPanel>
</Border>
<Border UseLayoutRounding="True" Canvas.Bottom="8" Canvas.Right="8" x:Name="BtnClose" MouseUp="BtnClose_MouseUp" HorizontalAlignment="Right" VerticalAlignment="{Binding ElementName=BorderBtnHelp, Path=VerticalAlignment}" Margin="10" Grid.Column="1" Background="#E32A34" Height="40" Width="40" CornerRadius="100">
<Border UseLayoutRounding="True" Canvas.Bottom="8" Canvas.Right="8" x:Name="BtnClose" MouseUp="BtnClose_MouseUp" HorizontalAlignment="Right" VerticalAlignment="{Binding ElementName=BorderBtnHelp, Path=VerticalAlignment}" Margin="10" Grid.Column="1" Background="{DynamicResource RandWindowCloseButtonBackground}" Height="40" Width="40" CornerRadius="100">
<Border.Effect>
<DropShadowEffect Direction="0" ShadowDepth="0" Opacity="0.1" BlurRadius="3"/>
</Border.Effect>
<Viewbox Margin="14">
<ui:SymbolIcon Symbol="Clear" Foreground="White"/>
<ui:SymbolIcon Symbol="Clear" Foreground="{DynamicResource RandWindowCloseButtonForeground}"/>
</Viewbox>
</Border>
</Canvas>