add:新点名UI
This commit is contained in:
@@ -3299,6 +3299,62 @@
|
||||
FontFamily="Consolas"
|
||||
Text="{Binding ElementName=RandWindowOnceMaxStudentsSlider, Path=Value, Converter={StaticResource IntNumberToString}}" />
|
||||
</ui:SimpleStackPanel>
|
||||
|
||||
<!-- 新点名UI设置 -->
|
||||
<Line HorizontalAlignment="Center" X1="0" Y1="0" X2="400" Y2="0"
|
||||
Stroke="#3f3f46" StrokeThickness="1" Margin="0,4,0,4" />
|
||||
<TextBlock Foreground="#fafafa" Text="新点名UI设置"
|
||||
FontSize="16" FontWeight="Bold" Margin="0,10,0,5" />
|
||||
|
||||
<ui:SimpleStackPanel Orientation="Horizontal" HorizontalAlignment="Left">
|
||||
<TextBlock Foreground="#fafafa" Text="启用新点名UI"
|
||||
VerticalAlignment="Center" FontSize="14" Margin="0,0,16,0" />
|
||||
<ui:ToggleSwitch OnContent="" OffContent=""
|
||||
Name="ToggleSwitchUseNewRollCallUI"
|
||||
IsOn="False" FontFamily="Microsoft YaHei UI"
|
||||
FontWeight="Bold"
|
||||
Toggled="ToggleSwitchUseNewRollCallUI_Toggled" />
|
||||
</ui:SimpleStackPanel>
|
||||
|
||||
<ui:SimpleStackPanel Orientation="Horizontal" HorizontalAlignment="Left">
|
||||
<TextBlock Foreground="#fafafa" Text="启用机器学习避免重复"
|
||||
VerticalAlignment="Center" FontSize="14" Margin="0,0,16,0" />
|
||||
<ui:ToggleSwitch OnContent="" OffContent=""
|
||||
Name="ToggleSwitchEnableMLAvoidance"
|
||||
IsOn="True" FontFamily="Microsoft YaHei UI"
|
||||
FontWeight="Bold"
|
||||
Toggled="ToggleSwitchEnableMLAvoidance_Toggled" />
|
||||
</ui:SimpleStackPanel>
|
||||
|
||||
<ui:SimpleStackPanel Orientation="Horizontal" HorizontalAlignment="Left">
|
||||
<TextBlock Foreground="#fafafa" Text="避免重复历史记录数量" VerticalAlignment="Center"
|
||||
FontSize="14" Margin="0,0,16,0" />
|
||||
<Slider x:Name="MLAvoidanceHistorySlider" Minimum="5"
|
||||
Maximum="50" Width="168" FontFamily="Microsoft YaHei UI"
|
||||
ValueChanged="MLAvoidanceHistorySlider_ValueChanged"
|
||||
FontSize="20" IsSnapToTickEnabled="True" Value="20" TickFrequency="5"
|
||||
TickPlacement="None" AutoToolTipPlacement="None" />
|
||||
<TextBlock VerticalAlignment="Center" Margin="12,0,16,0" FontSize="14"
|
||||
FontFamily="Consolas"
|
||||
Text="{Binding ElementName=MLAvoidanceHistorySlider, Path=Value, Converter={StaticResource IntNumberToString}}" />
|
||||
</ui:SimpleStackPanel>
|
||||
|
||||
<ui:SimpleStackPanel Orientation="Horizontal" HorizontalAlignment="Left">
|
||||
<TextBlock Foreground="#fafafa" Text="避免重复权重" VerticalAlignment="Center"
|
||||
FontSize="14" Margin="0,0,16,0" />
|
||||
<Slider x:Name="MLAvoidanceWeightSlider" Minimum="0.1"
|
||||
Maximum="1.0" Width="168" FontFamily="Microsoft YaHei UI"
|
||||
ValueChanged="MLAvoidanceWeightSlider_ValueChanged"
|
||||
FontSize="20" IsSnapToTickEnabled="True" Value="0.8" TickFrequency="0.1"
|
||||
TickPlacement="None" AutoToolTipPlacement="None" />
|
||||
<TextBlock VerticalAlignment="Center" Margin="12,0,16,0" FontSize="14"
|
||||
FontFamily="Consolas"
|
||||
Text="{Binding ElementName=MLAvoidanceWeightSlider, Path=Value, StringFormat={}{0:P0}}" />
|
||||
</ui:SimpleStackPanel>
|
||||
|
||||
<TextBlock Text="# 机器学习算法会分析最近的点名历史,智能避免重复选择相同人员"
|
||||
TextWrapping="Wrap" Foreground="#a1a1aa" Margin="0,5,0,0" />
|
||||
|
||||
<Line HorizontalAlignment="Center" X1="0" Y1="0" X2="400" Y2="0"
|
||||
Stroke="#3f3f46" StrokeThickness="1" Margin="0,4,0,4" />
|
||||
<TextBlock Foreground="#fafafa" Text="计时器设置"
|
||||
|
||||
@@ -1085,11 +1085,20 @@ namespace Ink_Canvas
|
||||
AnimationsHelper.HideWithSlideAndFade(BoardBorderTools);
|
||||
AnimationsHelper.HideWithSlideAndFade(BoardImageOptionsPanel);
|
||||
|
||||
var randWindow = new RandWindow(Settings);
|
||||
randWindow.Show();
|
||||
// 根据设置决定使用哪个点名窗口
|
||||
if (Settings.RandSettings.UseNewRollCallUI)
|
||||
{
|
||||
// 使用新点名UI - 随机抽模式
|
||||
new NewStyleRollCallWindow(Settings, false).ShowDialog();
|
||||
}
|
||||
else
|
||||
{
|
||||
// 使用默认的随机点名窗口
|
||||
var randWindow = new RandWindow(Settings);
|
||||
randWindow.Show();
|
||||
|
||||
// 使用延迟确保窗口完全显示后再强制置顶
|
||||
randWindow.Dispatcher.BeginInvoke(new Action(() =>
|
||||
// 使用延迟确保窗口完全显示后再强制置顶
|
||||
randWindow.Dispatcher.BeginInvoke(new Action(() =>
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -1126,6 +1135,7 @@ namespace Ink_Canvas
|
||||
LogHelper.WriteLogToFile($"强制置顶RandWindow失败: {ex.Message}", LogHelper.LogType.Error);
|
||||
}
|
||||
}), DispatcherPriority.Loaded);
|
||||
}
|
||||
}
|
||||
|
||||
public void CheckEraserTypeTab()
|
||||
@@ -1232,14 +1242,30 @@ namespace Ink_Canvas
|
||||
{
|
||||
MessageBox.Show("无法调用外部点名:" + ex.Message);
|
||||
|
||||
// 调用失败时回退到默认的随机点名窗口
|
||||
new RandWindow(Settings, true).ShowDialog();
|
||||
// 调用失败时回退到相应的点名窗口
|
||||
if (Settings.RandSettings.UseNewRollCallUI)
|
||||
{
|
||||
new NewStyleRollCallWindow(Settings, true).ShowDialog(); // 单次抽模式
|
||||
}
|
||||
else
|
||||
{
|
||||
new RandWindow(Settings, true).ShowDialog();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// 使用默认的随机点名窗口
|
||||
new RandWindow(Settings, true).ShowDialog();
|
||||
// 根据设置决定使用哪个点名窗口
|
||||
if (Settings.RandSettings.UseNewRollCallUI)
|
||||
{
|
||||
// 使用新点名UI - 单次抽模式
|
||||
new NewStyleRollCallWindow(Settings, true).ShowDialog();
|
||||
}
|
||||
else
|
||||
{
|
||||
// 使用默认的随机点名窗口
|
||||
new RandWindow(Settings, true).ShowDialog();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2671,6 +2671,35 @@ namespace Ink_Canvas
|
||||
SaveSettingsToFile();
|
||||
}
|
||||
|
||||
// 新点名UI设置事件处理
|
||||
private void ToggleSwitchUseNewRollCallUI_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!isLoaded) return;
|
||||
Settings.RandSettings.UseNewRollCallUI = ToggleSwitchUseNewRollCallUI.IsOn;
|
||||
SaveSettingsToFile();
|
||||
}
|
||||
|
||||
private void ToggleSwitchEnableMLAvoidance_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!isLoaded) return;
|
||||
Settings.RandSettings.EnableMLAvoidance = ToggleSwitchEnableMLAvoidance.IsOn;
|
||||
SaveSettingsToFile();
|
||||
}
|
||||
|
||||
private void MLAvoidanceHistorySlider_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
|
||||
{
|
||||
if (!isLoaded) return;
|
||||
Settings.RandSettings.MLAvoidanceHistoryCount = (int)MLAvoidanceHistorySlider.Value;
|
||||
SaveSettingsToFile();
|
||||
}
|
||||
|
||||
private void MLAvoidanceWeightSlider_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
|
||||
{
|
||||
if (!isLoaded) return;
|
||||
Settings.RandSettings.MLAvoidanceWeight = MLAvoidanceWeightSlider.Value;
|
||||
SaveSettingsToFile();
|
||||
}
|
||||
|
||||
private void ProgressiveReminderVolumeSlider_ValueChanged(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!isLoaded) return;
|
||||
|
||||
@@ -886,6 +886,12 @@ namespace Ink_Canvas
|
||||
ToggleSwitchUseNewStyleUI.IsOn = Settings.RandSettings.UseNewStyleUI;
|
||||
ToggleSwitchEnableOvertimeCountUp.IsOn = Settings.RandSettings.EnableOvertimeCountUp;
|
||||
|
||||
// 新点名UI设置
|
||||
ToggleSwitchUseNewRollCallUI.IsOn = Settings.RandSettings.UseNewRollCallUI;
|
||||
ToggleSwitchEnableMLAvoidance.IsOn = Settings.RandSettings.EnableMLAvoidance;
|
||||
MLAvoidanceHistorySlider.Value = Settings.RandSettings.MLAvoidanceHistoryCount;
|
||||
MLAvoidanceWeightSlider.Value = Settings.RandSettings.MLAvoidanceWeight;
|
||||
|
||||
bool canEnableRedText = Settings.RandSettings.EnableOvertimeCountUp && Settings.RandSettings.EnableOvertimeRedText;
|
||||
ToggleSwitchEnableOvertimeRedText.IsOn = canEnableRedText;
|
||||
if (!canEnableRedText)
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<!-- 新点名窗口主题资源 -->
|
||||
|
||||
<!-- 浅色主题资源 -->
|
||||
<SolidColorBrush x:Key="NewRollCallWindowBackgroundLight" Color="#FFFFFF"/>
|
||||
<SolidColorBrush x:Key="NewRollCallWindowBorderBrushLight" Color="#E4E4E7"/>
|
||||
<SolidColorBrush x:Key="NewRollCallWindowTitleForegroundLight" Color="#18181B"/>
|
||||
<SolidColorBrush x:Key="NewRollCallWindowDigitForegroundLight" Color="#18181B"/>
|
||||
<SolidColorBrush x:Key="NewRollCallWindowButtonBackgroundLight" Color="#F4F4F5"/>
|
||||
<SolidColorBrush x:Key="NewRollCallWindowButtonForegroundLight" Color="#18181B"/>
|
||||
<SolidColorBrush x:Key="NewRollCallWindowPrimaryButtonBackgroundLight" Color="#4CAF50"/>
|
||||
<SolidColorBrush x:Key="NewRollCallWindowPrimaryButtonForegroundLight" Color="#FFFFFF"/>
|
||||
<SolidColorBrush x:Key="NewRollCallWindowSecondaryTextForegroundLight" Color="#71717A"/>
|
||||
|
||||
<!-- 深色主题资源 -->
|
||||
<SolidColorBrush x:Key="NewRollCallWindowBackgroundDark" Color="#1f1f1f"/>
|
||||
<SolidColorBrush x:Key="NewRollCallWindowBorderBrushDark" Color="#E0E0E0"/>
|
||||
<SolidColorBrush x:Key="NewRollCallWindowTitleForegroundDark" Color="White"/>
|
||||
<SolidColorBrush x:Key="NewRollCallWindowDigitForegroundDark" Color="White"/>
|
||||
<SolidColorBrush x:Key="NewRollCallWindowButtonBackgroundDark" Color="#2a2a2a"/>
|
||||
<SolidColorBrush x:Key="NewRollCallWindowButtonForegroundDark" Color="White"/>
|
||||
<SolidColorBrush x:Key="NewRollCallWindowPrimaryButtonBackgroundDark" Color="#4CAF50"/>
|
||||
<SolidColorBrush x:Key="NewRollCallWindowPrimaryButtonForegroundDark" Color="White"/>
|
||||
<SolidColorBrush x:Key="NewRollCallWindowSecondaryTextForegroundDark" Color="#9ca3af"/>
|
||||
|
||||
<!-- 默认资源绑定 -->
|
||||
<SolidColorBrush x:Key="NewRollCallWindowBackground" Color="#1f1f1f"/>
|
||||
<SolidColorBrush x:Key="NewRollCallWindowBorderBrush" Color="#E0E0E0"/>
|
||||
<SolidColorBrush x:Key="NewRollCallWindowTitleForeground" Color="White"/>
|
||||
<SolidColorBrush x:Key="NewRollCallWindowDigitForeground" Color="White"/>
|
||||
<SolidColorBrush x:Key="NewRollCallWindowButtonBackground" Color="#2a2a2a"/>
|
||||
<SolidColorBrush x:Key="NewRollCallWindowButtonForeground" Color="White"/>
|
||||
<SolidColorBrush x:Key="NewRollCallWindowPrimaryButtonBackground" Color="#4CAF50"/>
|
||||
<SolidColorBrush x:Key="NewRollCallWindowPrimaryButtonForeground" Color="White"/>
|
||||
<SolidColorBrush x:Key="NewRollCallWindowSecondaryTextForeground" Color="#9ca3af"/>
|
||||
|
||||
</ResourceDictionary>
|
||||
@@ -650,6 +650,14 @@ namespace Ink_Canvas
|
||||
public double ProgressiveReminderVolume { get; set; } = 1.0;
|
||||
[JsonProperty("progressiveReminderSoundPath")]
|
||||
public string ProgressiveReminderSoundPath { get; set; } = "";
|
||||
[JsonProperty("useNewRollCallUI")]
|
||||
public bool UseNewRollCallUI { get; set; } = true;
|
||||
[JsonProperty("enableMLAvoidance")]
|
||||
public bool EnableMLAvoidance { get; set; } = true;
|
||||
[JsonProperty("mlAvoidanceHistoryCount")]
|
||||
public int MLAvoidanceHistoryCount { get; set; } = 20;
|
||||
[JsonProperty("mlAvoidanceWeight")]
|
||||
public double MLAvoidanceWeight { get; set; } = 0.8;
|
||||
}
|
||||
|
||||
public class CustomPickNameBackground
|
||||
|
||||
@@ -5,15 +5,40 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:Ink_Canvas"
|
||||
mc:Ignorable="d" FontFamily="Microsoft YaHei UI" ui:WindowHelper.UseModernWindowStyle="True"
|
||||
ui:ThemeManager.RequestedTheme="Light" WindowStartupLocation="CenterScreen"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern" Topmost="True"
|
||||
Title="Ink Canvas 抽奖 - 名单导入" Height="500" Width="400"
|
||||
Loaded="Window_Loaded" Closing="Window_Closing">
|
||||
<Grid>
|
||||
<Label Content="请在下方输入名单,每行一人(建议直接粘贴表格姓名列)" Margin="10"/>
|
||||
<TextBox Name="TextBoxNames" FontFamily="Microsoft YaHei UI" VerticalScrollBarVisibility="Auto" AcceptsReturn="True" Margin="10,40,10,50" />
|
||||
<Button Margin="10" VerticalAlignment="Bottom" HorizontalAlignment="Right"
|
||||
Content="关闭" FontFamily="Microsoft YaHei UI"
|
||||
Width="100" Click="Button_Click"/>
|
||||
<Window.Resources>
|
||||
<!-- 主题资源 -->
|
||||
<SolidColorBrush x:Key="NamesInputWindowBackground" Color="White"/>
|
||||
<SolidColorBrush x:Key="NamesInputWindowForeground" Color="Black"/>
|
||||
<SolidColorBrush x:Key="NamesInputWindowButtonBackground" Color="#F4F4F5"/>
|
||||
<SolidColorBrush x:Key="NamesInputWindowButtonForeground" Color="Black"/>
|
||||
<SolidColorBrush x:Key="NamesInputWindowBorderBrush" Color="#E4E4E7"/>
|
||||
</Window.Resources>
|
||||
<Grid Background="{DynamicResource NamesInputWindowBackground}">
|
||||
<Label Content="请在下方输入名单,每行一人(建议直接粘贴表格姓名列)"
|
||||
Margin="10"
|
||||
Foreground="{DynamicResource NamesInputWindowForeground}"
|
||||
FontFamily="Microsoft YaHei UI"/>
|
||||
<TextBox Name="TextBoxNames"
|
||||
FontFamily="Microsoft YaHei UI"
|
||||
VerticalScrollBarVisibility="Auto"
|
||||
AcceptsReturn="True"
|
||||
Margin="10,40,10,50"
|
||||
Background="{DynamicResource NamesInputWindowBackground}"
|
||||
Foreground="{DynamicResource NamesInputWindowForeground}"
|
||||
BorderBrush="{DynamicResource NamesInputWindowBorderBrush}"/>
|
||||
<Button Margin="10"
|
||||
VerticalAlignment="Bottom"
|
||||
HorizontalAlignment="Right"
|
||||
Content="关闭"
|
||||
FontFamily="Microsoft YaHei UI"
|
||||
Width="100"
|
||||
Click="Button_Click"
|
||||
Background="{DynamicResource NamesInputWindowButtonBackground}"
|
||||
Foreground="{DynamicResource NamesInputWindowButtonForeground}"
|
||||
BorderBrush="{DynamicResource NamesInputWindowBorderBrush}"/>
|
||||
</Grid>
|
||||
</Window>
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
using Ink_Canvas.Helpers;
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.IO;
|
||||
using System.Windows;
|
||||
using System.Windows.Media;
|
||||
using MessageBox = iNKORE.UI.WPF.Modern.Controls.MessageBox;
|
||||
|
||||
namespace Ink_Canvas
|
||||
{
|
||||
@@ -14,6 +17,7 @@ namespace Ink_Canvas
|
||||
{
|
||||
InitializeComponent();
|
||||
AnimationsHelper.ShowWithSlideFromBottomAndFade(this, 0.25);
|
||||
ApplyTheme();
|
||||
}
|
||||
|
||||
string originText = "";
|
||||
@@ -43,5 +47,111 @@ namespace Ink_Canvas
|
||||
{
|
||||
Close();
|
||||
}
|
||||
|
||||
private void ApplyTheme()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (MainWindow.Settings != null)
|
||||
{
|
||||
ApplyTheme(MainWindow.Settings);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.WriteLogToFile($"应用名单导入窗口主题出错: {ex.Message}", LogHelper.LogType.Error);
|
||||
}
|
||||
}
|
||||
|
||||
private void ApplyTheme(Settings settings)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (settings.Appearance.Theme == 0) // 浅色主题
|
||||
{
|
||||
iNKORE.UI.WPF.Modern.ThemeManager.SetRequestedTheme(this, iNKORE.UI.WPF.Modern.ElementTheme.Light);
|
||||
ApplyThemeResources("Light");
|
||||
}
|
||||
else if (settings.Appearance.Theme == 1) // 深色主题
|
||||
{
|
||||
iNKORE.UI.WPF.Modern.ThemeManager.SetRequestedTheme(this, iNKORE.UI.WPF.Modern.ElementTheme.Dark);
|
||||
ApplyThemeResources("Dark");
|
||||
}
|
||||
else // 跟随系统主题
|
||||
{
|
||||
bool isSystemLight = IsSystemThemeLight();
|
||||
if (isSystemLight)
|
||||
{
|
||||
iNKORE.UI.WPF.Modern.ThemeManager.SetRequestedTheme(this, iNKORE.UI.WPF.Modern.ElementTheme.Light);
|
||||
ApplyThemeResources("Light");
|
||||
}
|
||||
else
|
||||
{
|
||||
iNKORE.UI.WPF.Modern.ThemeManager.SetRequestedTheme(this, iNKORE.UI.WPF.Modern.ElementTheme.Dark);
|
||||
ApplyThemeResources("Dark");
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.WriteLogToFile($"应用名单导入窗口主题出错: {ex.Message}", LogHelper.LogType.Error);
|
||||
}
|
||||
}
|
||||
|
||||
private void ApplyThemeResources(string theme)
|
||||
{
|
||||
try
|
||||
{
|
||||
var resources = this.Resources;
|
||||
|
||||
if (theme == "Light")
|
||||
{
|
||||
// 应用浅色主题资源
|
||||
resources["NamesInputWindowBackground"] = new SolidColorBrush(Color.FromRgb(255, 255, 255));
|
||||
resources["NamesInputWindowForeground"] = new SolidColorBrush(Color.FromRgb(24, 24, 27));
|
||||
resources["NamesInputWindowButtonBackground"] = new SolidColorBrush(Color.FromRgb(244, 244, 245));
|
||||
resources["NamesInputWindowButtonForeground"] = new SolidColorBrush(Color.FromRgb(24, 24, 27));
|
||||
resources["NamesInputWindowBorderBrush"] = new SolidColorBrush(Color.FromRgb(228, 228, 231));
|
||||
}
|
||||
else
|
||||
{
|
||||
// 应用深色主题资源 - 与新计时器窗口统一
|
||||
resources["NamesInputWindowBackground"] = new SolidColorBrush(Color.FromRgb(31, 31, 31)); // #1f1f1f
|
||||
resources["NamesInputWindowForeground"] = new SolidColorBrush(Colors.White);
|
||||
resources["NamesInputWindowButtonBackground"] = new SolidColorBrush(Color.FromRgb(42, 42, 42)); // #2a2a2a
|
||||
resources["NamesInputWindowButtonForeground"] = new SolidColorBrush(Colors.White);
|
||||
resources["NamesInputWindowBorderBrush"] = new SolidColorBrush(Color.FromRgb(224, 224, 224)); // #E0E0E0
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.WriteLogToFile($"应用名单导入窗口主题资源出错: {ex.Message}", LogHelper.LogType.Error);
|
||||
}
|
||||
}
|
||||
|
||||
private bool IsSystemThemeLight()
|
||||
{
|
||||
var light = false;
|
||||
try
|
||||
{
|
||||
var registryKey = Microsoft.Win32.Registry.CurrentUser;
|
||||
var themeKey = registryKey.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Themes\Personalize");
|
||||
if (themeKey != null)
|
||||
{
|
||||
var value = themeKey.GetValue("AppsUseLightTheme");
|
||||
if (value != null)
|
||||
{
|
||||
light = (int)value == 1;
|
||||
}
|
||||
themeKey.Close();
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
// 如果无法读取注册表,默认使用浅色主题
|
||||
light = true;
|
||||
}
|
||||
return light;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,509 @@
|
||||
<Window x:Class="Ink_Canvas.NewStyleRollCallWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:Ink_Canvas"
|
||||
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
|
||||
xmlns:controls="clr-namespace:Ink_Canvas.Windows.Controls"
|
||||
Topmost="True" Background="Transparent"
|
||||
mc:Ignorable="d" WindowStyle="None" AllowsTransparency="True"
|
||||
Loaded="RollCallWindow_Loaded" Closing="Window_Closing" WindowStartupLocation="CenterScreen"
|
||||
MouseMove="Window_MouseMove" MouseEnter="Window_MouseEnter"
|
||||
Title="Ink Canvas 画板 - 点名" Height="500" Width="800">
|
||||
|
||||
<Window.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="Controls/WinUI3CloseButton.xaml" />
|
||||
<ResourceDictionary Source="../Resources/NewRollCallWindowResources.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</Window.Resources>
|
||||
|
||||
<Border Background="{DynamicResource NewRollCallWindowBackground}" CornerRadius="15" BorderThickness="1" BorderBrush="{DynamicResource NewRollCallWindowBorderBrush}" Margin="10" x:Name="MainBorder" MouseLeftButtonDown="WindowDragMove">
|
||||
<Grid>
|
||||
<controls:WinUI3CloseButton x:Name="CloseButton"
|
||||
HorizontalAlignment="Right" VerticalAlignment="Top"
|
||||
Margin="0,0,0,0" Cursor="Hand" Click="CloseButton_Click"
|
||||
Content="✕"/>
|
||||
<!-- 主要内容区域 -->
|
||||
<Grid>
|
||||
<!-- 使用Viewbox自动缩放内容 -->
|
||||
<Viewbox x:Name="MainViewController" Margin="20,20,20,20">
|
||||
<Grid Height="550" Width="1000">
|
||||
<!-- 顶部标题栏 -->
|
||||
<Grid Height="50" Background="{DynamicResource NewRollCallWindowBackground}" x:Name="TitleBar" VerticalAlignment="Top" MouseLeftButtonDown="WindowDragMove" Margin="0,0,450,0">
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="22,0,0,0">
|
||||
<!-- 点名图标 -->
|
||||
<Path Data="M5 7C5 8.06087 5.42143 9.07828 6.17157 9.82843C6.92172 10.5786 7.93913 11 9 11C10.0609 11 11.0783 10.5786 11.8284 9.82843C12.5786 9.07828 13 8.06087 13 7C13 5.93913 12.5786 4.92172 11.8284 4.17157C11.0783 3.42143 10.0609 3 9 3C7.93913 3 6.92172 3.42143 6.17157 4.17157C5.42143 4.92172 5 5.93913 5 7Z M3 21V19C3 17.9391 3.42143 16.9217 4.17157 16.1716C4.92172 15.4214 5.93913 15 7 15H11C12.0609 15 13.0783 15.4214 13.8284 16.1716C14.5786 16.9217 15 17.9391 15 19V21 M16 3.13C16.8604 3.35031 17.623 3.85071 18.1676 4.55232C18.7122 5.25392 19.0078 6.11683 19.0078 7.005C19.0078 7.89318 18.7122 8.75608 18.1676 9.45769C17.623 10.1593 16.8604 10.6597 16 10.88 M21 21V19C20.9949 18.1172 20.6979 17.2608 20.1553 16.5644C19.6126 15.868 18.8548 15.3707 18 15.15"
|
||||
Stroke="{DynamicResource NewRollCallWindowButtonForeground}"
|
||||
StrokeThickness="2"
|
||||
StrokeLineJoin="Round"
|
||||
Fill="Transparent"
|
||||
Width="24" Height="24"
|
||||
Stretch="Uniform"
|
||||
Margin="0,0,8,0"/>
|
||||
<!-- 点名文字 -->
|
||||
<TextBlock Text="点名" FontSize="28" FontWeight="Bold"
|
||||
Foreground="{DynamicResource NewRollCallWindowTitleForeground}" x:Name="TitleText"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
<!-- 主要内容区域 - 分为左右两部分 -->
|
||||
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Center"
|
||||
x:Name="MainContentGrid" Margin="0,-25,0,25">
|
||||
<!-- 左侧:结果显示区域 -->
|
||||
<Grid HorizontalAlignment="Left" VerticalAlignment="Center"
|
||||
x:Name="MainDisplayGrid" Width="500" Margin="-10,0,0,0">
|
||||
<!-- 结果显示区域 -->
|
||||
<StackPanel Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<!-- 主结果显示 -->
|
||||
<TextBlock x:Name="MainResultDisplay" Text="点击开始点名" FontSize="48" FontWeight="Bold"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center"
|
||||
Foreground="{DynamicResource NewRollCallWindowDigitForeground}"
|
||||
TextAlignment="Center" Margin="0,0,0,20"/>
|
||||
|
||||
<!-- 多结果显示区域 - 支持最多20个结果 -->
|
||||
<ScrollViewer x:Name="MultiResultScrollViewer" MaxHeight="200" VerticalScrollBarVisibility="Auto"
|
||||
HorizontalScrollBarVisibility="Disabled" Visibility="Collapsed">
|
||||
<StackPanel x:Name="MultiResultPanel" Orientation="Vertical" HorizontalAlignment="Center">
|
||||
<!-- 第1行:结果1-5 -->
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,0,0,8">
|
||||
<TextBlock x:Name="Result1Display" Text="" FontSize="24" FontWeight="Bold"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center"
|
||||
Foreground="{DynamicResource NewRollCallWindowDigitForeground}"
|
||||
TextAlignment="Center" Margin="0,0,12,0" Width="60"/>
|
||||
<TextBlock x:Name="Result2Display" Text="" FontSize="24" FontWeight="Bold"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center"
|
||||
Foreground="{DynamicResource NewRollCallWindowDigitForeground}"
|
||||
TextAlignment="Center" Margin="0,0,12,0" Width="60"/>
|
||||
<TextBlock x:Name="Result3Display" Text="" FontSize="24" FontWeight="Bold"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center"
|
||||
Foreground="{DynamicResource NewRollCallWindowDigitForeground}"
|
||||
TextAlignment="Center" Margin="0,0,12,0" Width="60"/>
|
||||
<TextBlock x:Name="Result4Display" Text="" FontSize="24" FontWeight="Bold"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center"
|
||||
Foreground="{DynamicResource NewRollCallWindowDigitForeground}"
|
||||
TextAlignment="Center" Margin="0,0,12,0" Width="60"/>
|
||||
<TextBlock x:Name="Result5Display" Text="" FontSize="24" FontWeight="Bold"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center"
|
||||
Foreground="{DynamicResource NewRollCallWindowDigitForeground}"
|
||||
TextAlignment="Center" Width="60"/>
|
||||
</StackPanel>
|
||||
<!-- 第2行:结果6-10 -->
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,0,0,8">
|
||||
<TextBlock x:Name="Result6Display" Text="" FontSize="24" FontWeight="Bold"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center"
|
||||
Foreground="{DynamicResource NewRollCallWindowDigitForeground}"
|
||||
TextAlignment="Center" Margin="0,0,12,0" Width="60"/>
|
||||
<TextBlock x:Name="Result7Display" Text="" FontSize="24" FontWeight="Bold"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center"
|
||||
Foreground="{DynamicResource NewRollCallWindowDigitForeground}"
|
||||
TextAlignment="Center" Margin="0,0,12,0" Width="60"/>
|
||||
<TextBlock x:Name="Result8Display" Text="" FontSize="24" FontWeight="Bold"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center"
|
||||
Foreground="{DynamicResource NewRollCallWindowDigitForeground}"
|
||||
TextAlignment="Center" Margin="0,0,12,0" Width="60"/>
|
||||
<TextBlock x:Name="Result9Display" Text="" FontSize="24" FontWeight="Bold"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center"
|
||||
Foreground="{DynamicResource NewRollCallWindowDigitForeground}"
|
||||
TextAlignment="Center" Margin="0,0,12,0" Width="60"/>
|
||||
<TextBlock x:Name="Result10Display" Text="" FontSize="24" FontWeight="Bold"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center"
|
||||
Foreground="{DynamicResource NewRollCallWindowDigitForeground}"
|
||||
TextAlignment="Center" Width="60"/>
|
||||
</StackPanel>
|
||||
<!-- 第3行:结果11-15 -->
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,0,0,8">
|
||||
<TextBlock x:Name="Result11Display" Text="" FontSize="24" FontWeight="Bold"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center"
|
||||
Foreground="{DynamicResource NewRollCallWindowDigitForeground}"
|
||||
TextAlignment="Center" Margin="0,0,12,0" Width="60"/>
|
||||
<TextBlock x:Name="Result12Display" Text="" FontSize="24" FontWeight="Bold"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center"
|
||||
Foreground="{DynamicResource NewRollCallWindowDigitForeground}"
|
||||
TextAlignment="Center" Margin="0,0,12,0" Width="60"/>
|
||||
<TextBlock x:Name="Result13Display" Text="" FontSize="24" FontWeight="Bold"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center"
|
||||
Foreground="{DynamicResource NewRollCallWindowDigitForeground}"
|
||||
TextAlignment="Center" Margin="0,0,12,0" Width="60"/>
|
||||
<TextBlock x:Name="Result14Display" Text="" FontSize="24" FontWeight="Bold"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center"
|
||||
Foreground="{DynamicResource NewRollCallWindowDigitForeground}"
|
||||
TextAlignment="Center" Margin="0,0,12,0" Width="60"/>
|
||||
<TextBlock x:Name="Result15Display" Text="" FontSize="24" FontWeight="Bold"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center"
|
||||
Foreground="{DynamicResource NewRollCallWindowDigitForeground}"
|
||||
TextAlignment="Center" Width="60"/>
|
||||
</StackPanel>
|
||||
<!-- 第4行:结果16-20 -->
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
||||
<TextBlock x:Name="Result16Display" Text="" FontSize="24" FontWeight="Bold"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center"
|
||||
Foreground="{DynamicResource NewRollCallWindowDigitForeground}"
|
||||
TextAlignment="Center" Margin="0,0,12,0" Width="60"/>
|
||||
<TextBlock x:Name="Result17Display" Text="" FontSize="24" FontWeight="Bold"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center"
|
||||
Foreground="{DynamicResource NewRollCallWindowDigitForeground}"
|
||||
TextAlignment="Center" Margin="0,0,12,0" Width="60"/>
|
||||
<TextBlock x:Name="Result18Display" Text="" FontSize="24" FontWeight="Bold"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center"
|
||||
Foreground="{DynamicResource NewRollCallWindowDigitForeground}"
|
||||
TextAlignment="Center" Margin="0,0,12,0" Width="60"/>
|
||||
<TextBlock x:Name="Result19Display" Text="" FontSize="24" FontWeight="Bold"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center"
|
||||
Foreground="{DynamicResource NewRollCallWindowDigitForeground}"
|
||||
TextAlignment="Center" Margin="0,0,12,0" Width="60"/>
|
||||
<TextBlock x:Name="Result20Display" Text="" FontSize="24" FontWeight="Bold"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center"
|
||||
Foreground="{DynamicResource NewRollCallWindowDigitForeground}"
|
||||
TextAlignment="Center" Width="60"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
|
||||
<!-- 点名状态显示 -->
|
||||
<TextBlock x:Name="StatusDisplay" Text="准备就绪" FontSize="16"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center"
|
||||
Foreground="{DynamicResource NewRollCallWindowSecondaryTextForeground}"
|
||||
TextAlignment="Center" Margin="0,10,0,0"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
<!-- 分割线 -->
|
||||
<Border Width="2" Background="{DynamicResource NewRollCallWindowButtonForeground}"
|
||||
Opacity="0.3" HorizontalAlignment="Left" VerticalAlignment="Stretch"
|
||||
Margin="500,0,0,0"/>
|
||||
|
||||
<!-- 右侧:控制选项区域 -->
|
||||
<Grid HorizontalAlignment="Left" VerticalAlignment="Center"
|
||||
x:Name="ControlOptionsGrid" Width="450" Margin="520,0,0,0" Height="400">
|
||||
<StackPanel Orientation="Vertical" HorizontalAlignment="Center">
|
||||
<!-- 人数控制区域 -->
|
||||
<Grid Margin="0,0,0,20">
|
||||
<StackPanel Orientation="Vertical" HorizontalAlignment="Center">
|
||||
<TextBlock Text="点名人数" FontSize="16" FontWeight="Bold"
|
||||
Foreground="{DynamicResource NewRollCallWindowButtonForeground}"
|
||||
HorizontalAlignment="Center" Margin="0,0,0,10"/>
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
||||
<Button x:Name="CountMinusBtn" Width="40" Height="40" Background="{DynamicResource NewRollCallWindowButtonBackground}"
|
||||
BorderThickness="0" Click="CountMinus_Click" Cursor="Hand" Margin="0,0,15,0">
|
||||
<Button.Template>
|
||||
<ControlTemplate TargetType="Button">
|
||||
<Border Background="{TemplateBinding Background}" CornerRadius="15">
|
||||
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Button.Template>
|
||||
<Path Data="M5 12l14 0"
|
||||
Stroke="{DynamicResource NewRollCallWindowButtonForeground}"
|
||||
StrokeThickness="2"
|
||||
StrokeStartLineCap="Round"
|
||||
StrokeEndLineCap="Round"
|
||||
StrokeLineJoin="Round"
|
||||
Fill="Transparent"
|
||||
Width="20" Height="20"
|
||||
Stretch="Uniform"/>
|
||||
</Button>
|
||||
|
||||
<TextBlock x:Name="CountDisplay" Text="1" FontSize="24" FontWeight="Bold"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center"
|
||||
Foreground="{DynamicResource NewRollCallWindowDigitForeground}"
|
||||
Width="60" TextAlignment="Center"/>
|
||||
|
||||
<Button x:Name="CountPlusBtn" Width="40" Height="40" Background="{DynamicResource NewRollCallWindowButtonBackground}"
|
||||
BorderThickness="0" Click="CountPlus_Click" Cursor="Hand" Margin="15,0,0,0">
|
||||
<Button.Template>
|
||||
<ControlTemplate TargetType="Button">
|
||||
<Border Background="{TemplateBinding Background}" CornerRadius="15">
|
||||
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Button.Template>
|
||||
<Path Data="M12 5l0 14 M5 12l14 0"
|
||||
Stroke="{DynamicResource NewRollCallWindowButtonForeground}"
|
||||
StrokeThickness="2"
|
||||
StrokeStartLineCap="Round"
|
||||
StrokeEndLineCap="Round"
|
||||
StrokeLineJoin="Round"
|
||||
Fill="Transparent"
|
||||
Width="20" Height="20"
|
||||
Stretch="Uniform"/>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
<!-- 点名模式选择 -->
|
||||
<Grid Margin="0,0,0,20">
|
||||
<StackPanel Orientation="Vertical" HorizontalAlignment="Center">
|
||||
<TextBlock Text="点名模式" FontSize="16" FontWeight="Bold"
|
||||
Foreground="{DynamicResource NewRollCallWindowButtonForeground}"
|
||||
HorizontalAlignment="Center" Margin="0,0,0,10"/>
|
||||
<Border Background="{DynamicResource NewRollCallWindowButtonBackground}"
|
||||
CornerRadius="8"
|
||||
BorderThickness="1"
|
||||
BorderBrush="#616161"
|
||||
Width="300" Height="40">
|
||||
<Grid>
|
||||
<!-- 背景指示器 -->
|
||||
<Border x:Name="SegmentedIndicator"
|
||||
Background="{DynamicResource NewRollCallWindowPrimaryButtonBackground}"
|
||||
CornerRadius="7.5,0,0,7.5"
|
||||
Width="100" Height="38"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Margin="0,0,0,0"/>
|
||||
|
||||
<!-- 按钮容器 -->
|
||||
<Grid>
|
||||
<Button x:Name="RandomModeBtn"
|
||||
Width="100" Height="40"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
Click="RandomMode_Click"
|
||||
Cursor="Hand"
|
||||
HorizontalAlignment="Left">
|
||||
<TextBlock x:Name="RandomModeText" Text="随机点名" FontSize="16" FontWeight="Bold"
|
||||
Foreground="{DynamicResource NewRollCallWindowButtonForeground}"/>
|
||||
</Button>
|
||||
<Button x:Name="SequentialModeBtn"
|
||||
Width="100" Height="40"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
Click="SequentialMode_Click"
|
||||
Cursor="Hand"
|
||||
HorizontalAlignment="Center">
|
||||
<TextBlock x:Name="SequentialModeText" Text="顺序点名" FontSize="16" FontWeight="Normal"
|
||||
Foreground="{DynamicResource NewRollCallWindowButtonForeground}" Opacity="0.6"/>
|
||||
</Button>
|
||||
<Button x:Name="GroupModeBtn"
|
||||
Width="100" Height="40"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
Click="GroupMode_Click"
|
||||
Cursor="Hand"
|
||||
HorizontalAlignment="Right">
|
||||
<TextBlock x:Name="GroupModeText" Text="分组点名" FontSize="16" FontWeight="Normal"
|
||||
Foreground="{DynamicResource NewRollCallWindowButtonForeground}" Opacity="0.6"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
<!-- 外部点名区域 -->
|
||||
<Grid Margin="0,0,0,20">
|
||||
<StackPanel Orientation="Vertical" HorizontalAlignment="Center">
|
||||
<TextBlock Text="外部点名" FontSize="16" FontWeight="Bold"
|
||||
Foreground="{DynamicResource NewRollCallWindowButtonForeground}"
|
||||
HorizontalAlignment="Center" Margin="0,0,0,10"/>
|
||||
|
||||
<!-- 外部点名类型切换 -->
|
||||
<Border Background="{DynamicResource NewRollCallWindowButtonBackground}"
|
||||
CornerRadius="8"
|
||||
BorderThickness="1"
|
||||
BorderBrush="#616161"
|
||||
Width="360" Height="40">
|
||||
<Grid>
|
||||
<!-- 背景指示器 -->
|
||||
<Border x:Name="ExternalCallerIndicator"
|
||||
Background="{DynamicResource NewRollCallWindowPrimaryButtonBackground}"
|
||||
CornerRadius="7.5,0,0,7.5"
|
||||
Width="120" Height="38"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Margin="0,0,0,0"/>
|
||||
|
||||
<!-- 按钮容器 -->
|
||||
<Grid>
|
||||
<Button x:Name="ClassIslandBtn"
|
||||
Width="120" Height="40"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
Click="ClassIsland_Click"
|
||||
Cursor="Hand"
|
||||
HorizontalAlignment="Left">
|
||||
<TextBlock x:Name="ClassIslandText" Text="ClassIsland" FontSize="16" FontWeight="Bold"
|
||||
Foreground="{DynamicResource NewRollCallWindowButtonForeground}"/>
|
||||
</Button>
|
||||
<Button x:Name="SecRandomBtn"
|
||||
Width="120" Height="40"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
Click="SecRandom_Click"
|
||||
Cursor="Hand"
|
||||
HorizontalAlignment="Center">
|
||||
<TextBlock x:Name="SecRandomText" Text="SecRandom" FontSize="16" FontWeight="Normal"
|
||||
Foreground="{DynamicResource NewRollCallWindowButtonForeground}" Opacity="0.6"/>
|
||||
</Button>
|
||||
<Button x:Name="NamePickerBtn"
|
||||
Width="120" Height="40"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
Click="NamePicker_Click"
|
||||
Cursor="Hand"
|
||||
HorizontalAlignment="Right">
|
||||
<TextBlock x:Name="NamePickerText" Text="NamePicker" FontSize="16" FontWeight="Normal"
|
||||
Foreground="{DynamicResource NewRollCallWindowButtonForeground}" Opacity="0.6"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
<!-- 名单管理区域 -->
|
||||
<Grid Margin="0,0,0,20">
|
||||
<StackPanel Orientation="Vertical" HorizontalAlignment="Center">
|
||||
<TextBlock Text="名单管理" FontSize="16" FontWeight="Bold"
|
||||
Foreground="{DynamicResource NewRollCallWindowButtonForeground}"
|
||||
HorizontalAlignment="Center" Margin="0,0,0,10"/>
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
||||
<Button x:Name="ImportListBtn" Width="90" Height="40" Background="{DynamicResource NewRollCallWindowButtonBackground}"
|
||||
BorderThickness="0" Click="ImportList_Click" Cursor="Hand" Margin="0,0,10,0">
|
||||
<Button.Template>
|
||||
<ControlTemplate TargetType="Button">
|
||||
<Border Background="{TemplateBinding Background}" CornerRadius="8">
|
||||
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Button.Template>
|
||||
<TextBlock Text="导入名单" FontSize="14"
|
||||
Foreground="{DynamicResource NewRollCallWindowButtonForeground}"/>
|
||||
</Button>
|
||||
<Button x:Name="ClearListBtn" Width="90" Height="40" Background="{DynamicResource NewRollCallWindowButtonBackground}"
|
||||
BorderThickness="0" Click="ClearList_Click" Cursor="Hand">
|
||||
<Button.Template>
|
||||
<ControlTemplate TargetType="Button">
|
||||
<Border Background="{TemplateBinding Background}" CornerRadius="8">
|
||||
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Button.Template>
|
||||
<TextBlock Text="清空名单" FontSize="14"
|
||||
Foreground="{DynamicResource NewRollCallWindowButtonForeground}"/>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
<!-- 名单统计信息 -->
|
||||
<Grid Margin="0,0,0,20">
|
||||
<StackPanel Orientation="Vertical" HorizontalAlignment="Center">
|
||||
<TextBlock x:Name="ListCountDisplay" Text="名单人数: 0" FontSize="14"
|
||||
Foreground="{DynamicResource NewRollCallWindowSecondaryTextForeground}"
|
||||
HorizontalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<!-- 底部控制按钮区域 -->
|
||||
<Grid HorizontalAlignment="Center" VerticalAlignment="Bottom" Margin="0,0,0,20">
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
||||
<!-- 外部点名按钮 -->
|
||||
<Button x:Name="ExternalCallerBtn" Width="140" Height="60"
|
||||
Background="{DynamicResource NewRollCallWindowButtonBackground}"
|
||||
BorderThickness="0" Click="ExternalCaller_Click" Cursor="Hand" Margin="0,0,20,0">
|
||||
<Button.Template>
|
||||
<ControlTemplate TargetType="Button">
|
||||
<Border Background="{TemplateBinding Background}" CornerRadius="30">
|
||||
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Button.Template>
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
||||
<Path Data="M9 15L15 9 M11 6L11.463 5.464C12.4008 4.52633 13.6727 3.9996 14.9989 3.99969C16.325 3.99979 17.5968 4.52669 18.5345 5.4645C19.4722 6.40231 19.9989 7.67419 19.9988 9.00035C19.9987 10.3265 19.4718 11.5983 18.534 12.536L18 13 M13.0001 18L12.6031 18.534C11.6544 19.4722 10.3739 19.9984 9.03964 19.9984C7.70535 19.9984 6.42489 19.4722 5.47614 18.534C5.0085 18.0716 4.63724 17.521 4.38385 16.9141C4.13047 16.3073 4 15.6561 4 14.9985C4 14.3408 4.13047 13.6897 4.38385 13.0829C4.63724 12.476 5.0085 11.9254 5.47614 11.463L6.00014 11"
|
||||
Stroke="{DynamicResource NewRollCallWindowButtonForeground}"
|
||||
StrokeThickness="2"
|
||||
Fill="Transparent"
|
||||
Width="20" Height="20"
|
||||
Stretch="Uniform"
|
||||
Margin="0,0,8,0"/>
|
||||
<TextBlock Text="外部点名" FontSize="18" FontWeight="Bold"
|
||||
Foreground="{DynamicResource NewRollCallWindowButtonForeground}"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
<!-- 开始点名按钮 -->
|
||||
<Button x:Name="StartRollCallBtn" Width="140" Height="60" Background="{DynamicResource NewRollCallWindowPrimaryButtonBackground}"
|
||||
BorderThickness="0" Click="StartRollCall_Click" Cursor="Hand" Margin="0,0,20,0">
|
||||
<Button.Template>
|
||||
<ControlTemplate TargetType="Button">
|
||||
<Border Background="{TemplateBinding Background}" CornerRadius="30">
|
||||
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Button.Template>
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
||||
<Path Data="M5 7C5 8.06087 5.42143 9.07828 6.17157 9.82843C6.92172 10.5786 7.93913 11 9 11C10.0609 11 11.0783 10.5786 11.8284 9.82843C12.5786 9.07828 13 8.06087 13 7C13 5.93913 12.5786 4.92172 11.8284 4.17157C11.0783 3.42143 10.0609 3 9 3C7.93913 3 6.92172 3.42143 6.17157 4.17157C5.42143 4.92172 5 5.93913 5 7Z M3 21V19C3 17.9391 3.42143 16.9217 4.17157 16.1716C4.92172 15.4214 5.93913 15 7 15H11C12.0609 15 13.0783 15.4214 13.8284 16.1716C14.5786 16.9217 15 17.9391 15 19V21 M16 3.13C16.8604 3.35031 17.623 3.85071 18.1676 4.55232C18.7122 5.25392 19.0078 6.11683 19.0078 7.005C19.0078 7.89318 18.7122 8.75608 18.1676 9.45769C17.623 10.1593 16.8604 10.6597 16 10.88 M21 21V19C20.9949 18.1172 20.6979 17.2608 20.1553 16.5644C19.6126 15.868 18.8548 15.3707 18 15.15"
|
||||
Stroke="{DynamicResource NewRollCallWindowPrimaryButtonForeground}"
|
||||
StrokeThickness="2"
|
||||
Fill="Transparent"
|
||||
Width="20" Height="20"
|
||||
Stretch="Uniform"
|
||||
Margin="0,0,8,0"/>
|
||||
<TextBlock Text="开始点名" FontSize="18" FontWeight="Bold"
|
||||
Foreground="{DynamicResource NewRollCallWindowPrimaryButtonForeground}"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
|
||||
<!-- 停止点名按钮 -->
|
||||
<Button x:Name="StopRollCallBtn" Width="100" Height="60" Background="{DynamicResource NewRollCallWindowButtonBackground}"
|
||||
BorderThickness="0" Click="StopRollCall_Click" Cursor="Hand" Margin="0,0,20,0" Visibility="Collapsed">
|
||||
<Button.Template>
|
||||
<ControlTemplate TargetType="Button">
|
||||
<Border Background="{TemplateBinding Background}" CornerRadius="30">
|
||||
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Button.Template>
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
||||
<Path Data="M6 6l12 12 M18 6l-12 12"
|
||||
Stroke="{DynamicResource NewRollCallWindowButtonForeground}"
|
||||
StrokeThickness="2"
|
||||
StrokeLineJoin="Round"
|
||||
Fill="Transparent"
|
||||
Width="20" Height="20"
|
||||
Stretch="Uniform"
|
||||
Margin="0,0,8,0"/>
|
||||
<TextBlock Text="停止" FontSize="18" FontWeight="Bold"
|
||||
Foreground="{DynamicResource NewRollCallWindowButtonForeground}"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
|
||||
<!-- 重置按钮 -->
|
||||
<Button x:Name="ResetBtn" Width="140" Height="60" Background="{DynamicResource NewRollCallWindowButtonBackground}"
|
||||
BorderThickness="0" Click="Reset_Click" Cursor="Hand">
|
||||
<Button.Template>
|
||||
<ControlTemplate TargetType="Button">
|
||||
<Border Background="{TemplateBinding Background}" CornerRadius="30">
|
||||
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Button.Template>
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
||||
<Path Data="M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4 M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4"
|
||||
Stroke="{DynamicResource NewRollCallWindowButtonForeground}"
|
||||
StrokeThickness="2"
|
||||
StrokeLineJoin="Round"
|
||||
Fill="Transparent"
|
||||
Width="20" Height="20"
|
||||
Stretch="Uniform"
|
||||
Margin="0,0,8,0"/>
|
||||
<TextBlock Text="重置" FontSize="18" FontWeight="Bold"
|
||||
Foreground="{DynamicResource NewRollCallWindowButtonForeground}"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Viewbox>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Window>
|
||||
Reference in New Issue
Block a user