improve:计时器

This commit is contained in:
2025-10-12 17:17:51 +08:00
parent 869dd045af
commit 04f98eb9e7
13 changed files with 548 additions and 225 deletions
+21 -3
View File
@@ -3305,13 +3305,31 @@
Toggled="ToggleSwitchUseLegacyTimerUI_Toggled" />
</ui:SimpleStackPanel>
<ui:SimpleStackPanel Orientation="Horizontal" HorizontalAlignment="Left">
<TextBlock Foreground="#fafafa" Text="启用仿希沃UI"
<TextBlock Foreground="#fafafa" Text="新计时器UI"
VerticalAlignment="Center" FontSize="14" Margin="0,0,16,0" />
<ui:ToggleSwitch OnContent="" OffContent=""
Name="ToggleSwitchUseSeewoStyleUI"
Name="ToggleSwitchUseNewStyleUI"
IsOn="False" FontFamily="Microsoft YaHei UI"
FontWeight="Bold"
Toggled="ToggleSwitchUseSeewoStyleUI_Toggled" />
Toggled="ToggleSwitchUseNewStyleUI_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="ToggleSwitchEnableOvertimeCountUp"
IsOn="False" FontFamily="Microsoft YaHei UI"
FontWeight="Bold"
Toggled="ToggleSwitchEnableOvertimeCountUp_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="ToggleSwitchEnableOvertimeRedText"
IsOn="True" FontFamily="Microsoft YaHei UI"
FontWeight="Bold"
Toggled="ToggleSwitchEnableOvertimeRedText_Toggled" />
</ui:SimpleStackPanel>
<ui:SimpleStackPanel Orientation="Horizontal" HorizontalAlignment="Left">
<TextBlock Foreground="#fafafa" Text="计时器提醒音量" VerticalAlignment="Center"
+33 -5
View File
@@ -2611,17 +2611,17 @@ namespace Ink_Canvas
Settings.RandSettings.UseLegacyTimerUI = ToggleSwitchUseLegacyTimerUI.IsOn;
if (ToggleSwitchUseLegacyTimerUI.IsOn)
{
ToggleSwitchUseSeewoStyleUI.IsOn = false;
Settings.RandSettings.UseSeewoStyleUI = false;
ToggleSwitchUseNewStyleUI.IsOn = false;
Settings.RandSettings.UseNewStyleUI = false;
}
SaveSettingsToFile();
}
private void ToggleSwitchUseSeewoStyleUI_Toggled(object sender, RoutedEventArgs e)
private void ToggleSwitchUseNewStyleUI_Toggled(object sender, RoutedEventArgs e)
{
if (!isLoaded) return;
Settings.RandSettings.UseSeewoStyleUI = ToggleSwitchUseSeewoStyleUI.IsOn;
if (ToggleSwitchUseSeewoStyleUI.IsOn)
Settings.RandSettings.UseNewStyleUI = ToggleSwitchUseNewStyleUI.IsOn;
if (ToggleSwitchUseNewStyleUI.IsOn)
{
ToggleSwitchUseLegacyTimerUI.IsOn = false;
Settings.RandSettings.UseLegacyTimerUI = false;
@@ -2629,6 +2629,34 @@ namespace Ink_Canvas
SaveSettingsToFile();
}
private void ToggleSwitchEnableOvertimeCountUp_Toggled(object sender, RoutedEventArgs e)
{
if (!isLoaded) return;
Settings.RandSettings.EnableOvertimeCountUp = ToggleSwitchEnableOvertimeCountUp.IsOn;
if (!ToggleSwitchEnableOvertimeCountUp.IsOn)
{
ToggleSwitchEnableOvertimeRedText.IsOn = false;
Settings.RandSettings.EnableOvertimeRedText = false;
}
SaveSettingsToFile();
}
private void ToggleSwitchEnableOvertimeRedText_Toggled(object sender, RoutedEventArgs e)
{
if (!isLoaded) return;
if (ToggleSwitchEnableOvertimeRedText.IsOn && !ToggleSwitchEnableOvertimeCountUp.IsOn)
{
ToggleSwitchEnableOvertimeRedText.IsOn = false;
return;
}
Settings.RandSettings.EnableOvertimeRedText = ToggleSwitchEnableOvertimeRedText.IsOn;
SaveSettingsToFile();
}
private void TimerVolumeSlider_ValueChanged(object sender, RoutedEventArgs e)
{
if (!isLoaded) return;
+20 -2
View File
@@ -883,7 +883,16 @@ namespace Ink_Canvas
// 计时器设置
ToggleSwitchUseLegacyTimerUI.IsOn = Settings.RandSettings.UseLegacyTimerUI;
ToggleSwitchUseSeewoStyleUI.IsOn = Settings.RandSettings.UseSeewoStyleUI;
ToggleSwitchUseNewStyleUI.IsOn = Settings.RandSettings.UseNewStyleUI;
ToggleSwitchEnableOvertimeCountUp.IsOn = Settings.RandSettings.EnableOvertimeCountUp;
bool canEnableRedText = Settings.RandSettings.EnableOvertimeCountUp && Settings.RandSettings.EnableOvertimeRedText;
ToggleSwitchEnableOvertimeRedText.IsOn = canEnableRedText;
if (!canEnableRedText)
{
Settings.RandSettings.EnableOvertimeRedText = false;
}
TimerVolumeSlider.Value = Settings.RandSettings.TimerVolume;
// 加载自定义点名背景
@@ -905,7 +914,16 @@ namespace Ink_Canvas
ToggleSwitchExternalCaller.IsOn = Settings.RandSettings.DirectCallCiRand;
ComboBoxExternalCallerType.SelectedIndex = Settings.RandSettings.ExternalCallerType;
ToggleSwitchUseLegacyTimerUI.IsOn = Settings.RandSettings.UseLegacyTimerUI;
ToggleSwitchUseSeewoStyleUI.IsOn = Settings.RandSettings.UseSeewoStyleUI;
ToggleSwitchUseNewStyleUI.IsOn = Settings.RandSettings.UseNewStyleUI;
ToggleSwitchEnableOvertimeCountUp.IsOn = Settings.RandSettings.EnableOvertimeCountUp;
bool canEnableRedText = Settings.RandSettings.EnableOvertimeCountUp && Settings.RandSettings.EnableOvertimeRedText;
ToggleSwitchEnableOvertimeRedText.IsOn = canEnableRedText;
if (!canEnableRedText)
{
Settings.RandSettings.EnableOvertimeRedText = false;
}
TimerVolumeSlider.Value = Settings.RandSettings.TimerVolume;
}
+6 -2
View File
@@ -631,12 +631,16 @@ namespace Ink_Canvas
public List<CustomPickNameBackground> CustomPickNameBackgrounds { get; set; } = new List<CustomPickNameBackground>();
[JsonProperty("useLegacyTimerUI")]
public bool UseLegacyTimerUI { get; set; } = false;
[JsonProperty("useSeewoStyleUI")]
public bool UseSeewoStyleUI { get; set; } = true;
[JsonProperty("useNewStyleUI")]
public bool UseNewStyleUI { get; set; } = true;
[JsonProperty("timerVolume")]
public double TimerVolume { get; set; } = 1.0;
[JsonProperty("customTimerSoundPath")]
public string CustomTimerSoundPath { get; set; } = "";
[JsonProperty("enableOvertimeCountUp")]
public bool EnableOvertimeCountUp { get; set; } = false;
[JsonProperty("enableOvertimeRedText")]
public bool EnableOvertimeRedText { get; set; } = false;
}
public class CustomPickNameBackground
+9 -9
View File
@@ -113,15 +113,15 @@
<BitmapImage x:Key="TimerWindowClockIcon" UriSource="/Resources/Icons-Fluent/ic_fluent_timer_24_regular-light.png"/>
<!-- 倒计时窗口主题颜色 -->
<SolidColorBrush x:Key="SeewoTimerWindowBackground" Color="#1f1f1f"/>
<SolidColorBrush x:Key="SeewoTimerWindowBorderBrush" Color="#E0E0E0"/>
<SolidColorBrush x:Key="SeewoTimerWindowTextForeground" Color="White"/>
<SolidColorBrush x:Key="SeewoTimerWindowButtonBackground" Color="#2a2a2a"/>
<SolidColorBrush x:Key="SeewoTimerWindowButtonForeground" Color="White"/>
<SolidColorBrush x:Key="SeewoTimerWindowDigitForeground" Color="White"/>
<SolidColorBrush x:Key="SeewoTimerWindowTitleForeground" Color="White"/>
<SolidColorBrush x:Key="SeewoTimerWindowPrimaryButtonBackground" Color="#4CAF50"/>
<SolidColorBrush x:Key="SeewoTimerWindowPrimaryButtonForeground" Color="White"/>
<SolidColorBrush x:Key="NewTimerWindowBackground" Color="#1f1f1f"/>
<SolidColorBrush x:Key="NewTimerWindowBorderBrush" Color="#E0E0E0"/>
<SolidColorBrush x:Key="NewTimerWindowTextForeground" Color="White"/>
<SolidColorBrush x:Key="NewTimerWindowButtonBackground" Color="#2a2a2a"/>
<SolidColorBrush x:Key="NewTimerWindowButtonForeground" Color="White"/>
<SolidColorBrush x:Key="NewTimerWindowDigitForeground" Color="White"/>
<SolidColorBrush x:Key="NewTimerWindowTitleForeground" Color="White"/>
<SolidColorBrush x:Key="NewTimerWindowPrimaryButtonBackground" Color="#4CAF50"/>
<SolidColorBrush x:Key="NewTimerWindowPrimaryButtonForeground" Color="White"/>
<!-- 说明书窗口主题颜色 -->
<SolidColorBrush x:Key="OperatingGuideWindowBackground" Color="#1f1f1f"/>
+9 -9
View File
@@ -113,15 +113,15 @@
<BitmapImage x:Key="TimerWindowClockIcon" UriSource="/Resources/Icons-Fluent/ic_fluent_timer_24_regular.png"/>
<!-- 倒计时窗口主题颜色 -->
<SolidColorBrush x:Key="SeewoTimerWindowBackground" Color="White"/>
<SolidColorBrush x:Key="SeewoTimerWindowBorderBrush" Color="#E0E0E0"/>
<SolidColorBrush x:Key="SeewoTimerWindowTextForeground" Color="#333333"/>
<SolidColorBrush x:Key="SeewoTimerWindowButtonBackground" Color="#F0F0F0"/>
<SolidColorBrush x:Key="SeewoTimerWindowButtonForeground" Color="#666666"/>
<SolidColorBrush x:Key="SeewoTimerWindowDigitForeground" Color="#333333"/>
<SolidColorBrush x:Key="SeewoTimerWindowTitleForeground" Color="#333333"/>
<SolidColorBrush x:Key="SeewoTimerWindowPrimaryButtonBackground" Color="#4CAF50"/>
<SolidColorBrush x:Key="SeewoTimerWindowPrimaryButtonForeground" Color="White"/>
<SolidColorBrush x:Key="NewTimerWindowBackground" Color="White"/>
<SolidColorBrush x:Key="NewTimerWindowBorderBrush" Color="#E0E0E0"/>
<SolidColorBrush x:Key="NewTimerWindowTextForeground" Color="#333333"/>
<SolidColorBrush x:Key="NewTimerWindowButtonBackground" Color="#F0F0F0"/>
<SolidColorBrush x:Key="NewTimerWindowButtonForeground" Color="#666666"/>
<SolidColorBrush x:Key="NewTimerWindowDigitForeground" Color="#333333"/>
<SolidColorBrush x:Key="NewTimerWindowTitleForeground" Color="#333333"/>
<SolidColorBrush x:Key="NewTimerWindowPrimaryButtonBackground" Color="#4CAF50"/>
<SolidColorBrush x:Key="NewTimerWindowPrimaryButtonForeground" Color="White"/>
<!-- 说明书窗口主题颜色 -->
<SolidColorBrush x:Key="OperatingGuideWindowBackground" Color="#F0F3F9"/>
@@ -8,7 +8,7 @@
<Setter Property="Width" Value="46" />
<Setter Property="Height" Value="32" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="Foreground" Value="{DynamicResource SeewoTimerWindowButtonForeground}" />
<Setter Property="Foreground" Value="{DynamicResource NewTimerWindowButtonForeground}" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="Template">
+67 -32
View File
@@ -29,9 +29,9 @@ namespace Ink_Canvas
public static Window CreateTimerWindow()
{
if (MainWindow.Settings.RandSettings?.UseSeewoStyleUI == true)
if (MainWindow.Settings.RandSettings?.UseNewStyleUI == true)
{
return new SeewoStyleTimerWindow();
return new NewStyleTimerWindow();
}
else
{
@@ -49,46 +49,72 @@ namespace Ink_Canvas
TimeSpan timeSpan = DateTime.Now - startTime;
TimeSpan totalTimeSpan = new TimeSpan(hour, minute, second);
TimeSpan leftTimeSpan = totalTimeSpan - timeSpan;
if (leftTimeSpan.Milliseconds > 0) leftTimeSpan += new TimeSpan(0, 0, 1);
double spentTimePercent = timeSpan.TotalMilliseconds / (totalSeconds * 1000.0);
Application.Current.Dispatcher.Invoke(() =>
{
ProcessBarTime.CurrentValue = 1 - spentTimePercent;
TextBlockHour.Text = leftTimeSpan.Hours.ToString("00");
TextBlockMinute.Text = leftTimeSpan.Minutes.ToString("00");
TextBlockSecond.Text = leftTimeSpan.Seconds.ToString("00");
TbCurrentTime.Text = leftTimeSpan.ToString(@"hh\:mm\:ss");
if (spentTimePercent >= 1)
if (!isOvertimeMode)
{
ProcessBarTime.CurrentValue = 0;
TextBlockHour.Text = "00";
TextBlockMinute.Text = "00";
TextBlockSecond.Text = "00";
timer.Stop();
isTimerRunning = false;
SymbolIconStart.Symbol = iNKORE.UI.WPF.Modern.Controls.Symbol.Play;
BtnStartCover.Visibility = Visibility.Visible;
var textForeground = Application.Current.FindResource("TimerWindowTextForeground") as SolidColorBrush;
if (textForeground != null)
TimeSpan leftTimeSpan = totalTimeSpan - timeSpan;
if (leftTimeSpan.Milliseconds > 0) leftTimeSpan += new TimeSpan(0, 0, 1);
ProcessBarTime.CurrentValue = 1 - spentTimePercent;
TextBlockHour.Text = leftTimeSpan.Hours.ToString("00");
TextBlockMinute.Text = leftTimeSpan.Minutes.ToString("00");
TextBlockSecond.Text = leftTimeSpan.Seconds.ToString("00");
TbCurrentTime.Text = leftTimeSpan.ToString(@"hh\:mm\:ss");
if (spentTimePercent >= 1 && MainWindow.Settings.RandSettings?.EnableOvertimeCountUp == true)
{
TextBlockHour.Foreground = textForeground;
isOvertimeMode = true;
ProcessBarTime.CurrentValue = 0;
ProcessBarTime.Visibility = Visibility.Collapsed;
BorderStopTime.Visibility = Visibility.Collapsed;
// 播放提醒音
PlayTimerSound();
}
else
else if (spentTimePercent >= 1)
{
TextBlockHour.Foreground = new SolidColorBrush(StringToColor("#FF5B5D5F"));
ProcessBarTime.CurrentValue = 0;
TextBlockHour.Text = "00";
TextBlockMinute.Text = "00";
TextBlockSecond.Text = "00";
timer.Stop();
isTimerRunning = false;
SymbolIconStart.Symbol = iNKORE.UI.WPF.Modern.Controls.Symbol.Play;
BtnStartCover.Visibility = Visibility.Visible;
var textForeground = Application.Current.FindResource("TimerWindowTextForeground") as SolidColorBrush;
if (textForeground != null)
{
TextBlockHour.Foreground = textForeground;
}
else
{
TextBlockHour.Foreground = new SolidColorBrush(StringToColor("#FF5B5D5F"));
}
BorderStopTime.Visibility = Visibility.Collapsed;
// 播放提醒音
PlayTimerSound();
}
}
else
{
TimeSpan overtimeSpan = timeSpan - totalTimeSpan;
TextBlockHour.Text = overtimeSpan.Hours.ToString("00");
TextBlockMinute.Text = overtimeSpan.Minutes.ToString("00");
TextBlockSecond.Text = overtimeSpan.Seconds.ToString("00");
TbCurrentTime.Text = overtimeSpan.ToString(@"hh\:mm\:ss");
if (MainWindow.Settings.RandSettings?.EnableOvertimeRedText == true)
{
TextBlockHour.Foreground = Brushes.Red;
TextBlockMinute.Foreground = Brushes.Red;
TextBlockSecond.Foreground = Brushes.Red;
}
BorderStopTime.Visibility = Visibility.Collapsed;
}
});
if (spentTimePercent >= 1)
{
Application.Current.Dispatcher.Invoke(() =>
{
//Play sound
PlayTimerSound();
});
}
}
SoundPlayer player = new SoundPlayer();
@@ -105,6 +131,7 @@ namespace Ink_Canvas
bool isTimerRunning = false;
bool isPaused = false;
bool useLegacyUI = false;
bool isOvertimeMode = false;
Timer timer = new Timer();
@@ -268,6 +295,9 @@ namespace Ink_Canvas
TextBlockHour.Foreground = textForeground3;
else
TextBlockHour.Foreground = new SolidColorBrush(StringToColor("#FF5B5D5F"));
isOvertimeMode = false;
ProcessBarTime.Visibility = Visibility.Visible;
}
else if (isTimerRunning && isPaused)
{
@@ -288,6 +318,9 @@ namespace Ink_Canvas
isPaused = false;
ProcessBarTime.CurrentValue = 0;
ProcessBarTime.IsPaused = false;
isOvertimeMode = false;
ProcessBarTime.Visibility = Visibility.Visible;
}
else
{
@@ -390,6 +423,8 @@ namespace Ink_Canvas
isPaused = false;
isTimerRunning = true;
isOvertimeMode = false;
ProcessBarTime.Visibility = Visibility.Visible;
timer.Start();
UpdateStopTime();
BorderStopTime.Visibility = Visibility.Visible;
@@ -13,10 +13,10 @@ namespace Ink_Canvas
/// </summary>
public partial class FullscreenTimerWindow : Window
{
private SeewoStyleTimerWindow parentWindow;
private NewStyleTimerWindow parentWindow;
private System.Timers.Timer updateTimer;
public FullscreenTimerWindow(SeewoStyleTimerWindow parent)
public FullscreenTimerWindow(NewStyleTimerWindow parent)
{
InitializeComponent();
parentWindow = parent;
@@ -37,14 +37,45 @@ namespace Ink_Canvas
private void UpdateTimer_Elapsed(object sender, ElapsedEventArgs e)
{
if (parentWindow != null && parentWindow.IsTimerRunning)
if (parentWindow != null)
{
Application.Current.Dispatcher.Invoke(() =>
{
if (ShouldCloseWindow())
{
this.Close();
return;
}
UpdateTimeDisplay();
});
}
}
private bool ShouldCloseWindow()
{
if (parentWindow == null) return true;
if (MainWindow.Settings.RandSettings?.EnableOvertimeCountUp == true)
{
if (parentWindow.IsTimerRunning)
{
return false;
}
var remainingTime = parentWindow.GetRemainingTime();
if (remainingTime.HasValue && remainingTime.Value.TotalSeconds < 0)
{
return false;
}
return true;
}
else
{
return !parentWindow.IsTimerRunning;
}
}
private void UpdateTimeDisplay()
{
@@ -55,21 +86,56 @@ namespace Ink_Canvas
if (remainingTime.HasValue)
{
var timeSpan = remainingTime.Value;
int hours = (int)timeSpan.TotalHours;
int minutes = timeSpan.Minutes;
int seconds = timeSpan.Seconds;
bool isOvertimeMode = timeSpan.TotalSeconds < 0;
bool shouldShowRed = isOvertimeMode && MainWindow.Settings.RandSettings?.EnableOvertimeRedText == true;
int hours, minutes, seconds;
if (isOvertimeMode)
{
var totalTimeSpan = parentWindow.GetTotalTimeSpan();
if (totalTimeSpan.HasValue)
{
var elapsedTime = parentWindow.GetElapsedTime();
if (elapsedTime.HasValue)
{
var overtimeSpan = elapsedTime.Value - totalTimeSpan.Value;
hours = (int)overtimeSpan.TotalHours;
minutes = overtimeSpan.Minutes;
seconds = overtimeSpan.Seconds;
}
else
{
hours = 0;
minutes = 0;
seconds = 0;
}
}
else
{
hours = 0;
minutes = 0;
seconds = 0;
}
}
else
{
hours = (int)timeSpan.TotalHours;
minutes = timeSpan.Minutes;
seconds = timeSpan.Seconds;
}
// 更新小时显示
SetDigitDisplay("FullHour1Display", hours / 10);
SetDigitDisplay("FullHour2Display", hours % 10);
SetDigitDisplay("FullHour1Display", hours / 10, shouldShowRed);
SetDigitDisplay("FullHour2Display", hours % 10, shouldShowRed);
// 更新分钟显示
SetDigitDisplay("FullMinute1Display", minutes / 10);
SetDigitDisplay("FullMinute2Display", minutes % 10);
SetDigitDisplay("FullMinute1Display", minutes / 10, shouldShowRed);
SetDigitDisplay("FullMinute2Display", minutes % 10, shouldShowRed);
// 更新秒显示
SetDigitDisplay("FullSecond1Display", seconds / 10);
SetDigitDisplay("FullSecond2Display", seconds % 10);
SetDigitDisplay("FullSecond1Display", seconds / 10, shouldShowRed);
SetDigitDisplay("FullSecond2Display", seconds % 10, shouldShowRed);
}
}
@@ -81,7 +147,7 @@ namespace Ink_Canvas
});
}
private void SetDigitDisplay(string pathName, int digit)
private void SetDigitDisplay(string pathName, int digit, bool isRed = false)
{
var path = this.FindName(pathName) as Path;
if (path != null)
@@ -92,6 +158,16 @@ namespace Ink_Canvas
{
path.Data = geometry;
}
// 设置颜色
if (isRed)
{
path.Fill = Brushes.Red;
}
else
{
path.Fill = Brushes.White;
}
}
}
+11 -11
View File
@@ -19,10 +19,10 @@
</ResourceDictionary>
</Window.Resources>
<Border x:Name="MainBorder" Background="{DynamicResource SeewoTimerWindowBackground}"
<Border x:Name="MainBorder" Background="{DynamicResource NewTimerWindowBackground}"
CornerRadius="15"
BorderThickness="1"
BorderBrush="{DynamicResource SeewoTimerWindowBorderBrush}"
BorderBrush="{DynamicResource NewTimerWindowBorderBrush}"
Margin="0"
UseLayoutRounding="True"
SnapsToDevicePixels="True">
@@ -32,14 +32,14 @@
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<!-- 小时 -->
<Path x:Name="MinHour1Display" Data="{StaticResource Digit0}"
Fill="{DynamicResource SeewoTimerWindowDigitForeground}"
Fill="{DynamicResource NewTimerWindowDigitForeground}"
Width="72" Height="72"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Stretch="Uniform"
Margin="0,0,12,0"/>
<Path x:Name="MinHour2Display" Data="{StaticResource Digit0}"
Fill="{DynamicResource SeewoTimerWindowDigitForeground}"
Fill="{DynamicResource NewTimerWindowDigitForeground}"
Width="72" Height="72"
HorizontalAlignment="Center"
VerticalAlignment="Center"
@@ -48,20 +48,20 @@
<!-- 冒号 -->
<TextBlock Text=":" FontSize="48" FontWeight="Bold"
Foreground="{DynamicResource SeewoTimerWindowDigitForeground}"
Foreground="{DynamicResource NewTimerWindowDigitForeground}"
HorizontalAlignment="Center" VerticalAlignment="Center"
Margin="0,0,12,0"/>
<!-- 分钟 -->
<Path x:Name="MinMinute1Display" Data="{StaticResource Digit0}"
Fill="{DynamicResource SeewoTimerWindowDigitForeground}"
Fill="{DynamicResource NewTimerWindowDigitForeground}"
Width="72" Height="72"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Stretch="Uniform"
Margin="0,0,12,0"/>
<Path x:Name="MinMinute2Display" Data="{StaticResource Digit0}"
Fill="{DynamicResource SeewoTimerWindowDigitForeground}"
Fill="{DynamicResource NewTimerWindowDigitForeground}"
Width="72" Height="72"
HorizontalAlignment="Center"
VerticalAlignment="Center"
@@ -70,20 +70,20 @@
<!-- 冒号 -->
<TextBlock Text=":" FontSize="48" FontWeight="Bold"
Foreground="{DynamicResource SeewoTimerWindowDigitForeground}"
Foreground="{DynamicResource NewTimerWindowDigitForeground}"
HorizontalAlignment="Center" VerticalAlignment="Center"
Margin="0,0,12,0"/>
<!-- 秒 -->
<Path x:Name="MinSecond1Display" Data="{StaticResource Digit0}"
Fill="{DynamicResource SeewoTimerWindowDigitForeground}"
Fill="{DynamicResource NewTimerWindowDigitForeground}"
Width="72" Height="72"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Stretch="Uniform"
Margin="0,0,12,0"/>
<Path x:Name="MinSecond2Display" Data="{StaticResource Digit0}"
Fill="{DynamicResource SeewoTimerWindowDigitForeground}"
Fill="{DynamicResource NewTimerWindowDigitForeground}"
Width="72" Height="72"
HorizontalAlignment="Center"
VerticalAlignment="Center"
@@ -117,7 +117,7 @@
</ControlTemplate>
</Button.Template>
<TextBlock Text="✕" FontSize="12" FontWeight="Bold"
Foreground="{DynamicResource SeewoTimerWindowButtonForeground}"
Foreground="{DynamicResource NewTimerWindowButtonForeground}"
HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Button>
</Grid>
+98 -13
View File
@@ -13,13 +13,13 @@ namespace Ink_Canvas
/// </summary>
public partial class MinimizedTimerWindow : Window
{
private SeewoStyleTimerWindow parentWindow;
private NewStyleTimerWindow parentWindow;
private System.Timers.Timer updateTimer;
private bool isMouseOver = false;
private bool isDragging = false;
private Point lastMousePosition;
public MinimizedTimerWindow(SeewoStyleTimerWindow parent)
public MinimizedTimerWindow(NewStyleTimerWindow parent)
{
InitializeComponent();
parentWindow = parent;
@@ -41,14 +41,45 @@ namespace Ink_Canvas
private void UpdateTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
if (parentWindow != null && parentWindow.IsTimerRunning)
if (parentWindow != null)
{
Application.Current.Dispatcher.Invoke(() =>
{
if (ShouldCloseWindow())
{
this.Close();
return;
}
UpdateTimeDisplay();
});
}
}
private bool ShouldCloseWindow()
{
if (parentWindow == null) return true;
if (MainWindow.Settings.RandSettings?.EnableOvertimeCountUp == true)
{
if (parentWindow.IsTimerRunning)
{
return false;
}
var remainingTime = parentWindow.GetRemainingTime();
if (remainingTime.HasValue && remainingTime.Value.TotalSeconds < 0)
{
return false;
}
return true;
}
else
{
return !parentWindow.IsTimerRunning;
}
}
private void UpdateTimeDisplay()
{
@@ -59,21 +90,56 @@ namespace Ink_Canvas
if (remainingTime.HasValue)
{
var timeSpan = remainingTime.Value;
int hours = (int)timeSpan.TotalHours;
int minutes = timeSpan.Minutes;
int seconds = timeSpan.Seconds;
bool isOvertimeMode = timeSpan.TotalSeconds < 0;
bool shouldShowRed = isOvertimeMode && MainWindow.Settings.RandSettings?.EnableOvertimeRedText == true;
int hours, minutes, seconds;
if (isOvertimeMode)
{
var totalTimeSpan = parentWindow.GetTotalTimeSpan();
if (totalTimeSpan.HasValue)
{
var elapsedTime = parentWindow.GetElapsedTime();
if (elapsedTime.HasValue)
{
var overtimeSpan = elapsedTime.Value - totalTimeSpan.Value;
hours = (int)overtimeSpan.TotalHours;
minutes = overtimeSpan.Minutes;
seconds = overtimeSpan.Seconds;
}
else
{
hours = 0;
minutes = 0;
seconds = 0;
}
}
else
{
hours = 0;
minutes = 0;
seconds = 0;
}
}
else
{
hours = (int)timeSpan.TotalHours;
minutes = timeSpan.Minutes;
seconds = timeSpan.Seconds;
}
// 更新小时显示
SetDigitDisplay("MinHour1Display", hours / 10);
SetDigitDisplay("MinHour2Display", hours % 10);
SetDigitDisplay("MinHour1Display", hours / 10, shouldShowRed);
SetDigitDisplay("MinHour2Display", hours % 10, shouldShowRed);
// 更新分钟显示
SetDigitDisplay("MinMinute1Display", minutes / 10);
SetDigitDisplay("MinMinute2Display", minutes % 10);
SetDigitDisplay("MinMinute1Display", minutes / 10, shouldShowRed);
SetDigitDisplay("MinMinute2Display", minutes % 10, shouldShowRed);
// 更新秒显示
SetDigitDisplay("MinSecond1Display", seconds / 10);
SetDigitDisplay("MinSecond2Display", seconds % 10);
SetDigitDisplay("MinSecond1Display", seconds / 10, shouldShowRed);
SetDigitDisplay("MinSecond2Display", seconds % 10, shouldShowRed);
}
}
@@ -85,7 +151,7 @@ namespace Ink_Canvas
});
}
private void SetDigitDisplay(string pathName, int digit)
private void SetDigitDisplay(string pathName, int digit, bool isRed = false)
{
var path = this.FindName(pathName) as Path;
if (path != null)
@@ -96,6 +162,25 @@ namespace Ink_Canvas
{
path.Data = geometry;
}
// 设置颜色
if (isRed)
{
path.Fill = Brushes.Red;
}
else
{
var defaultBrush = this.FindResource("NewTimerWindowDigitForeground") as Brush;
if (defaultBrush != null)
{
path.Fill = defaultBrush;
}
else
{
bool isLightTheme = IsLightTheme();
path.Fill = isLightTheme ? Brushes.Black : Brushes.White;
}
}
}
}
@@ -11,11 +11,11 @@ using System.Windows.Shapes;
namespace Ink_Canvas
{
/// <summary>
/// 仿希沃风格的倒计时器窗口
/// 新计时器UI风格的倒计时器窗口
/// </summary>
public partial class SeewoStyleTimerWindow : Window
public partial class NewStyleTimerWindow : Window
{
public SeewoStyleTimerWindow()
public NewStyleTimerWindow()
{
InitializeComponent();
AnimationsHelper.ShowWithSlideFromBottomAndFade(this, 0.25);
@@ -44,38 +44,65 @@ namespace Ink_Canvas
TimeSpan timeSpan = DateTime.Now - startTime;
TimeSpan totalTimeSpan = new TimeSpan(hour, minute, second);
TimeSpan leftTimeSpan = totalTimeSpan - timeSpan;
if (leftTimeSpan.Milliseconds > 0) leftTimeSpan += new TimeSpan(0, 0, 1);
double spentTimePercent = timeSpan.TotalMilliseconds / (totalTimeSpan.TotalMilliseconds);
Application.Current.Dispatcher.Invoke(() =>
{
int totalHours = (int)leftTimeSpan.TotalHours;
int displayHours = totalHours;
if (displayHours > 99) displayHours = 99;
SetDigitDisplay("Digit1Display", displayHours / 10);
SetDigitDisplay("Digit2Display", displayHours % 10);
SetDigitDisplay("Digit3Display", leftTimeSpan.Minutes / 10);
SetDigitDisplay("Digit4Display", leftTimeSpan.Minutes % 10);
SetDigitDisplay("Digit5Display", leftTimeSpan.Seconds / 10);
SetDigitDisplay("Digit6Display", leftTimeSpan.Seconds % 10);
if (leftTimeSpan.TotalSeconds <= 0)
if (!isOvertimeMode)
{
SetDigitDisplay("Digit1Display", 0);
SetDigitDisplay("Digit2Display", 0);
SetDigitDisplay("Digit3Display", 0);
SetDigitDisplay("Digit4Display", 0);
SetDigitDisplay("Digit5Display", 0);
SetDigitDisplay("Digit6Display", 0);
timer.Stop();
isTimerRunning = false;
StartPauseIcon.Data = Geometry.Parse(PlayIconData);
PlayTimerSound();
TimeSpan leftTimeSpan = totalTimeSpan - timeSpan;
if (leftTimeSpan.Milliseconds > 0) leftTimeSpan += new TimeSpan(0, 0, 1);
TimerCompleted?.Invoke(this, EventArgs.Empty);
HandleTimerCompletion();
int totalHours = (int)leftTimeSpan.TotalHours;
int displayHours = totalHours;
if (displayHours > 99) displayHours = 99;
SetDigitDisplay("Digit1Display", displayHours / 10);
SetDigitDisplay("Digit2Display", displayHours % 10);
SetDigitDisplay("Digit3Display", leftTimeSpan.Minutes / 10);
SetDigitDisplay("Digit4Display", leftTimeSpan.Minutes % 10);
SetDigitDisplay("Digit5Display", leftTimeSpan.Seconds / 10);
SetDigitDisplay("Digit6Display", leftTimeSpan.Seconds % 10);
if (leftTimeSpan.TotalSeconds <= 0 && MainWindow.Settings.RandSettings?.EnableOvertimeCountUp == true)
{
isOvertimeMode = true;
PlayTimerSound();
}
else if (leftTimeSpan.TotalSeconds <= 0)
{
SetDigitDisplay("Digit1Display", 0);
SetDigitDisplay("Digit2Display", 0);
SetDigitDisplay("Digit3Display", 0);
SetDigitDisplay("Digit4Display", 0);
SetDigitDisplay("Digit5Display", 0);
SetDigitDisplay("Digit6Display", 0);
timer.Stop();
isTimerRunning = false;
StartPauseIcon.Data = Geometry.Parse(PlayIconData);
PlayTimerSound();
TimerCompleted?.Invoke(this, EventArgs.Empty);
HandleTimerCompletion();
}
}
else
{
TimeSpan overtimeSpan = timeSpan - totalTimeSpan;
int totalHours = (int)overtimeSpan.TotalHours;
int displayHours = totalHours;
if (displayHours > 99) displayHours = 99;
bool shouldShowRed = MainWindow.Settings.RandSettings?.EnableOvertimeRedText == true;
SetDigitDisplay("Digit1Display", displayHours / 10, shouldShowRed);
SetDigitDisplay("Digit2Display", displayHours % 10, shouldShowRed);
SetDigitDisplay("Digit3Display", overtimeSpan.Minutes / 10, shouldShowRed);
SetDigitDisplay("Digit4Display", overtimeSpan.Minutes % 10, shouldShowRed);
SetDigitDisplay("Digit5Display", overtimeSpan.Seconds / 10, shouldShowRed);
SetDigitDisplay("Digit6Display", overtimeSpan.Seconds % 10, shouldShowRed);
}
});
}
@@ -92,6 +119,7 @@ namespace Ink_Canvas
bool isTimerRunning = false;
bool isPaused = false;
bool isOvertimeMode = false;
TimeSpan remainingTime = TimeSpan.Zero;
Timer timer = new Timer();
@@ -100,7 +128,18 @@ namespace Ink_Canvas
private DateTime lastActivityTime;
private bool isFullscreenMode = false;
private FullscreenTimerWindow fullscreenWindow;
public event EventHandler TimerCompleted;
public event EventHandler TimerCompleted;
public TimeSpan? GetTotalTimeSpan()
{
return new TimeSpan(hour, minute, second);
}
public TimeSpan? GetElapsedTime()
{
if (isPaused) return null;
return DateTime.Now - startTime;
}
// 最近计时记录
private string recentTimer1 = "--:--";
@@ -111,12 +150,12 @@ namespace Ink_Canvas
private string recentTimer6 = "--:--";
// 最近计时记录的注册表键名
private const string RecentTimer1Key = "SeewoTimer_RecentTimer1";
private const string RecentTimer2Key = "SeewoTimer_RecentTimer2";
private const string RecentTimer3Key = "SeewoTimer_RecentTimer3";
private const string RecentTimer4Key = "SeewoTimer_RecentTimer4";
private const string RecentTimer5Key = "SeewoTimer_RecentTimer5";
private const string RecentTimer6Key = "SeewoTimer_RecentTimer6";
private const string RecentTimer1Key = "NewTimer_RecentTimer1";
private const string RecentTimer2Key = "NewTimer_RecentTimer2";
private const string RecentTimer3Key = "NewTimer_RecentTimer3";
private const string RecentTimer4Key = "NewTimer_RecentTimer4";
private const string RecentTimer5Key = "NewTimer_RecentTimer5";
private const string RecentTimer6Key = "NewTimer_RecentTimer6";
private void InitializeUI()
{
@@ -169,7 +208,7 @@ namespace Ink_Canvas
}
catch (Exception ex)
{
LogHelper.WriteLogToFile($"应用仿希沃倒计时窗口主题出错: {ex.Message}", LogHelper.LogType.Error);
LogHelper.WriteLogToFile($"应用新计时器UI倒计时窗口主题出错: {ex.Message}", LogHelper.LogType.Error);
}
}
@@ -202,7 +241,7 @@ namespace Ink_Canvas
}
catch (Exception ex)
{
LogHelper.WriteLogToFile($"应用仿希沃倒计时窗口主题出错: {ex.Message}", LogHelper.LogType.Error);
LogHelper.WriteLogToFile($"应用新计时器UI倒计时窗口主题出错: {ex.Message}", LogHelper.LogType.Error);
}
}
@@ -351,13 +390,12 @@ namespace Ink_Canvas
public TimeSpan? GetRemainingTime()
{
if (!isTimerRunning || isPaused) return null;
if (isPaused) return null;
var elapsed = DateTime.Now - startTime;
var totalSeconds = hour * 3600 + minute * 60 + second;
var remaining = totalSeconds - elapsed.TotalSeconds;
if (remaining <= 0) return TimeSpan.Zero;
return TimeSpan.FromSeconds(remaining);
}
@@ -383,7 +421,8 @@ namespace Ink_Canvas
/// </summary>
/// <param name="pathName">Path控件的名称</param>
/// <param name="digit">要显示的数字(0-9)</param>
private void SetDigitDisplay(string pathName, int digit)
/// <param name="isRed">是否显示为红色</param>
private void SetDigitDisplay(string pathName, int digit, bool isRed = false)
{
var path = this.FindName(pathName) as Path;
if (path != null)
@@ -394,6 +433,23 @@ namespace Ink_Canvas
{
path.Data = geometry;
}
if (isRed)
{
path.Fill = Brushes.Red;
}
else
{
var defaultBrush = this.FindResource("NewTimerWindowDigitForeground") as Brush;
if (defaultBrush != null)
{
path.Fill = defaultBrush;
}
else
{
path.Fill = Brushes.White;
}
}
}
}
@@ -636,6 +692,7 @@ namespace Ink_Canvas
StartPauseIcon.Data = Geometry.Parse(PauseIconData);
isPaused = false;
isTimerRunning = true;
isOvertimeMode = false;
timer.Start();
// 启动隐藏定时器
@@ -651,6 +708,7 @@ namespace Ink_Canvas
if (!isTimerRunning)
{
UpdateDigitDisplays();
isOvertimeMode = false;
}
else if (isTimerRunning && isPaused)
{
@@ -659,6 +717,7 @@ namespace Ink_Canvas
isTimerRunning = false;
timer.Stop();
isPaused = false;
isOvertimeMode = false;
}
else
{
@@ -1050,7 +1109,7 @@ namespace Ink_Canvas
{
try
{
using (var key = Microsoft.Win32.Registry.CurrentUser.CreateSubKey(@"Software\InkCanvas\SeewoTimer"))
using (var key = Microsoft.Win32.Registry.CurrentUser.CreateSubKey(@"Software\InkCanvas\NewTimer"))
{
if (key != null)
{
@@ -1080,7 +1139,7 @@ namespace Ink_Canvas
{
try
{
using (var key = Microsoft.Win32.Registry.CurrentUser.CreateSubKey(@"Software\InkCanvas\SeewoTimer"))
using (var key = Microsoft.Win32.Registry.CurrentUser.CreateSubKey(@"Software\InkCanvas\NewTimer"))
{
if (key != null)
{
@@ -1,4 +1,4 @@
<Window x:Class="Ink_Canvas.SeewoStyleTimerWindow"
<Window x:Class="Ink_Canvas.NewStyleTimerWindow"
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"
@@ -21,7 +21,7 @@
</ResourceDictionary>
</Window.Resources>
<Border Background="{DynamicResource SeewoTimerWindowBackground}" CornerRadius="15" BorderThickness="1" BorderBrush="{DynamicResource SeewoTimerWindowBorderBrush}" Margin="10" x:Name="MainBorder" MouseLeftButtonDown="WindowDragMove">
<Border Background="{DynamicResource NewTimerWindowBackground}" CornerRadius="15" BorderThickness="1" BorderBrush="{DynamicResource NewTimerWindowBorderBrush}" Margin="10" x:Name="MainBorder" MouseLeftButtonDown="WindowDragMove">
<Grid>
<controls:WinUI3CloseButton x:Name="CloseButton"
HorizontalAlignment="Right" VerticalAlignment="Top"
@@ -33,11 +33,11 @@
<Viewbox x:Name="MainViewController" Margin="20,20,20,20">
<Grid Height="400" Width="900">
<!-- 顶部标题栏 -->
<Grid Height="50" Background="{DynamicResource SeewoTimerWindowBackground}" x:Name="TitleBar" VerticalAlignment="Top" MouseLeftButtonDown="WindowDragMove" Margin="0,0,450,0">
<Grid Height="50" Background="{DynamicResource NewTimerWindowBackground}" 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 13a7 7 0 1 0 14 0a7 7 0 0 0 -14 0z M14.5 10.5l-2.5 2.5 M17 8l1 -1 M14 3h-4"
Stroke="{DynamicResource SeewoTimerWindowTitleForeground}"
Stroke="{DynamicResource NewTimerWindowTitleForeground}"
StrokeThickness="2"
StrokeLineJoin="Round"
Fill="Transparent"
@@ -46,7 +46,7 @@
Margin="0,0,8,0"/>
<!-- 计时文字 -->
<TextBlock Text="计时" FontSize="28" FontWeight="Bold"
Foreground="{DynamicResource SeewoTimerWindowTitleForeground}" x:Name="TitleText"/>
Foreground="{DynamicResource NewTimerWindowTitleForeground}" x:Name="TitleText"/>
</StackPanel>
</Grid>
<!-- 主要内容区域 - 分为左右两部分 -->
@@ -65,7 +65,7 @@
<Grid Margin="0,0,15,0">
<StackPanel Orientation="Vertical" HorizontalAlignment="Center">
<!-- 上方+按钮 -->
<Button x:Name="Digit1PlusBtn" Width="40" Height="40" Background="{DynamicResource SeewoTimerWindowButtonBackground}"
<Button x:Name="Digit1PlusBtn" Width="40" Height="40" Background="{DynamicResource NewTimerWindowButtonBackground}"
BorderThickness="0" Click="Digit1Plus_Click" Cursor="Hand" Margin="0,0,0,15" HorizontalAlignment="Center">
<Button.Template>
<ControlTemplate TargetType="Button">
@@ -75,7 +75,7 @@
</ControlTemplate>
</Button.Template>
<Path Data="M12 5l0 14 M5 12l14 0"
Stroke="{DynamicResource SeewoTimerWindowButtonForeground}"
Stroke="{DynamicResource NewTimerWindowButtonForeground}"
StrokeThickness="2"
StrokeStartLineCap="Round"
StrokeEndLineCap="Round"
@@ -86,14 +86,14 @@
</Button>
<!-- 数字显示 -->
<Path x:Name="Digit1Display" Data="{StaticResource Digit0}"
Fill="{DynamicResource SeewoTimerWindowDigitForeground}"
Fill="{DynamicResource NewTimerWindowDigitForeground}"
Width="48" Height="48"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Stretch="Uniform"
Margin="0,0,0,15"/>
<!-- 下方-按钮 -->
<Button x:Name="Digit1MinusBtn" Width="40" Height="40" Background="{DynamicResource SeewoTimerWindowButtonBackground}"
<Button x:Name="Digit1MinusBtn" Width="40" Height="40" Background="{DynamicResource NewTimerWindowButtonBackground}"
BorderThickness="0" Click="Digit1Minus_Click" Cursor="Hand" HorizontalAlignment="Center">
<Button.Template>
<ControlTemplate TargetType="Button">
@@ -103,7 +103,7 @@
</ControlTemplate>
</Button.Template>
<Path Data="M5 12l14 0"
Stroke="{DynamicResource SeewoTimerWindowButtonForeground}"
Stroke="{DynamicResource NewTimerWindowButtonForeground}"
StrokeThickness="2"
StrokeStartLineCap="Round"
StrokeEndLineCap="Round"
@@ -119,7 +119,7 @@
<Grid>
<StackPanel Orientation="Vertical" HorizontalAlignment="Center">
<!-- 上方+按钮 -->
<Button x:Name="Digit2PlusBtn" Width="40" Height="40" Background="{DynamicResource SeewoTimerWindowButtonBackground}"
<Button x:Name="Digit2PlusBtn" Width="40" Height="40" Background="{DynamicResource NewTimerWindowButtonBackground}"
BorderThickness="0" Click="Digit2Plus_Click" Cursor="Hand" Margin="0,0,0,15" HorizontalAlignment="Center">
<Button.Template>
<ControlTemplate TargetType="Button">
@@ -129,7 +129,7 @@
</ControlTemplate>
</Button.Template>
<Path Data="M12 5l0 14 M5 12l14 0"
Stroke="{DynamicResource SeewoTimerWindowButtonForeground}"
Stroke="{DynamicResource NewTimerWindowButtonForeground}"
StrokeThickness="2"
StrokeStartLineCap="Round"
StrokeEndLineCap="Round"
@@ -140,14 +140,14 @@
</Button>
<!-- 数字显示 -->
<Path x:Name="Digit2Display" Data="{StaticResource Digit0}"
Fill="{DynamicResource SeewoTimerWindowDigitForeground}"
Fill="{DynamicResource NewTimerWindowDigitForeground}"
Width="48" Height="48"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Stretch="Uniform"
Margin="0,0,0,15"/>
<!-- 下方-按钮 -->
<Button x:Name="Digit2MinusBtn" Width="40" Height="40" Background="{DynamicResource SeewoTimerWindowButtonBackground}"
<Button x:Name="Digit2MinusBtn" Width="40" Height="40" Background="{DynamicResource NewTimerWindowButtonBackground}"
BorderThickness="0" Click="Digit2Minus_Click" Cursor="Hand" HorizontalAlignment="Center">
<Button.Template>
<ControlTemplate TargetType="Button">
@@ -157,7 +157,7 @@
</ControlTemplate>
</Button.Template>
<Path Data="M5 12l14 0"
Stroke="{DynamicResource SeewoTimerWindowButtonForeground}"
Stroke="{DynamicResource NewTimerWindowButtonForeground}"
StrokeThickness="2"
StrokeStartLineCap="Round"
StrokeEndLineCap="Round"
@@ -174,7 +174,7 @@
<!-- 冒号分隔符 -->
<TextBlock Text=":" FontSize="48" FontWeight="Bold"
HorizontalAlignment="Center" VerticalAlignment="Center"
Foreground="{DynamicResource SeewoTimerWindowDigitForeground}"
Foreground="{DynamicResource NewTimerWindowDigitForeground}"
Margin="-20,0,0,0"/>
<!-- 分钟组(十位和个位) -->
@@ -184,7 +184,7 @@
<Grid Margin="0,0,15,0">
<StackPanel Orientation="Vertical" HorizontalAlignment="Center">
<!-- 上方+按钮 -->
<Button x:Name="Digit3PlusBtn" Width="40" Height="40" Background="{DynamicResource SeewoTimerWindowButtonBackground}"
<Button x:Name="Digit3PlusBtn" Width="40" Height="40" Background="{DynamicResource NewTimerWindowButtonBackground}"
BorderThickness="0" Click="Digit3Plus_Click" Cursor="Hand" Margin="0,0,0,15" HorizontalAlignment="Center">
<Button.Template>
<ControlTemplate TargetType="Button">
@@ -194,7 +194,7 @@
</ControlTemplate>
</Button.Template>
<Path Data="M12 5l0 14 M5 12l14 0"
Stroke="{DynamicResource SeewoTimerWindowButtonForeground}"
Stroke="{DynamicResource NewTimerWindowButtonForeground}"
StrokeThickness="2"
StrokeStartLineCap="Round"
StrokeEndLineCap="Round"
@@ -205,14 +205,14 @@
</Button>
<!-- 数字显示 -->
<Path x:Name="Digit3Display" Data="{StaticResource Digit0}"
Fill="{DynamicResource SeewoTimerWindowDigitForeground}"
Fill="{DynamicResource NewTimerWindowDigitForeground}"
Width="48" Height="48"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Stretch="Uniform"
Margin="0,0,0,15"/>
<!-- 下方-按钮 -->
<Button x:Name="Digit3MinusBtn" Width="40" Height="40" Background="{DynamicResource SeewoTimerWindowButtonBackground}"
<Button x:Name="Digit3MinusBtn" Width="40" Height="40" Background="{DynamicResource NewTimerWindowButtonBackground}"
BorderThickness="0" Click="Digit3Minus_Click" Cursor="Hand" HorizontalAlignment="Center">
<Button.Template>
<ControlTemplate TargetType="Button">
@@ -222,7 +222,7 @@
</ControlTemplate>
</Button.Template>
<Path Data="M5 12l14 0"
Stroke="{DynamicResource SeewoTimerWindowButtonForeground}"
Stroke="{DynamicResource NewTimerWindowButtonForeground}"
StrokeThickness="2"
StrokeStartLineCap="Round"
StrokeEndLineCap="Round"
@@ -238,7 +238,7 @@
<Grid>
<StackPanel Orientation="Vertical" HorizontalAlignment="Center">
<!-- 上方+按钮 -->
<Button x:Name="Digit4PlusBtn" Width="40" Height="40" Background="{DynamicResource SeewoTimerWindowButtonBackground}"
<Button x:Name="Digit4PlusBtn" Width="40" Height="40" Background="{DynamicResource NewTimerWindowButtonBackground}"
BorderThickness="0" Click="Digit4Plus_Click" Cursor="Hand" Margin="0,0,0,15" HorizontalAlignment="Center">
<Button.Template>
<ControlTemplate TargetType="Button">
@@ -248,7 +248,7 @@
</ControlTemplate>
</Button.Template>
<Path Data="M12 5l0 14 M5 12l14 0"
Stroke="{DynamicResource SeewoTimerWindowButtonForeground}"
Stroke="{DynamicResource NewTimerWindowButtonForeground}"
StrokeThickness="2"
StrokeStartLineCap="Round"
StrokeEndLineCap="Round"
@@ -259,14 +259,14 @@
</Button>
<!-- 数字显示 -->
<Path x:Name="Digit4Display" Data="{StaticResource Digit0}"
Fill="{DynamicResource SeewoTimerWindowDigitForeground}"
Fill="{DynamicResource NewTimerWindowDigitForeground}"
Width="48" Height="48"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Stretch="Uniform"
Margin="0,0,0,15"/>
<!-- 下方-按钮 -->
<Button x:Name="Digit4MinusBtn" Width="40" Height="40" Background="{DynamicResource SeewoTimerWindowButtonBackground}"
<Button x:Name="Digit4MinusBtn" Width="40" Height="40" Background="{DynamicResource NewTimerWindowButtonBackground}"
BorderThickness="0" Click="Digit4Minus_Click" Cursor="Hand" HorizontalAlignment="Center">
<Button.Template>
<ControlTemplate TargetType="Button">
@@ -276,7 +276,7 @@
</ControlTemplate>
</Button.Template>
<Path Data="M5 12l14 0"
Stroke="{DynamicResource SeewoTimerWindowButtonForeground}"
Stroke="{DynamicResource NewTimerWindowButtonForeground}"
StrokeThickness="2"
StrokeStartLineCap="Round"
StrokeEndLineCap="Round"
@@ -293,7 +293,7 @@
<!-- 冒号分隔符 -->
<TextBlock Text=":" FontSize="48" FontWeight="Bold"
HorizontalAlignment="Center" VerticalAlignment="Center"
Foreground="{DynamicResource SeewoTimerWindowDigitForeground}"
Foreground="{DynamicResource NewTimerWindowDigitForeground}"
Margin="-20,0,0,0"/>
<!-- 秒组(十位和个位) -->
@@ -303,7 +303,7 @@
<Grid Margin="0,0,15,0">
<StackPanel Orientation="Vertical" HorizontalAlignment="Center">
<!-- 上方+按钮 -->
<Button x:Name="Digit5PlusBtn" Width="40" Height="40" Background="{DynamicResource SeewoTimerWindowButtonBackground}"
<Button x:Name="Digit5PlusBtn" Width="40" Height="40" Background="{DynamicResource NewTimerWindowButtonBackground}"
BorderThickness="0" Click="Digit5Plus_Click" Cursor="Hand" Margin="0,0,0,15" HorizontalAlignment="Center">
<Button.Template>
<ControlTemplate TargetType="Button">
@@ -313,7 +313,7 @@
</ControlTemplate>
</Button.Template>
<Path Data="M12 5l0 14 M5 12l14 0"
Stroke="{DynamicResource SeewoTimerWindowButtonForeground}"
Stroke="{DynamicResource NewTimerWindowButtonForeground}"
StrokeThickness="2"
StrokeStartLineCap="Round"
StrokeEndLineCap="Round"
@@ -324,14 +324,14 @@
</Button>
<!-- 数字显示 -->
<Path x:Name="Digit5Display" Data="{StaticResource Digit0}"
Fill="{DynamicResource SeewoTimerWindowDigitForeground}"
Fill="{DynamicResource NewTimerWindowDigitForeground}"
Width="48" Height="48"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Stretch="Uniform"
Margin="0,0,0,15"/>
<!-- 下方-按钮 -->
<Button x:Name="Digit5MinusBtn" Width="40" Height="40" Background="{DynamicResource SeewoTimerWindowButtonBackground}"
<Button x:Name="Digit5MinusBtn" Width="40" Height="40" Background="{DynamicResource NewTimerWindowButtonBackground}"
BorderThickness="0" Click="Digit5Minus_Click" Cursor="Hand" HorizontalAlignment="Center">
<Button.Template>
<ControlTemplate TargetType="Button">
@@ -341,7 +341,7 @@
</ControlTemplate>
</Button.Template>
<Path Data="M5 12l14 0"
Stroke="{DynamicResource SeewoTimerWindowButtonForeground}"
Stroke="{DynamicResource NewTimerWindowButtonForeground}"
StrokeThickness="2"
StrokeStartLineCap="Round"
StrokeEndLineCap="Round"
@@ -357,7 +357,7 @@
<Grid>
<StackPanel Orientation="Vertical" HorizontalAlignment="Center">
<!-- 上方+按钮 -->
<Button x:Name="Digit6PlusBtn" Width="40" Height="40" Background="{DynamicResource SeewoTimerWindowButtonBackground}"
<Button x:Name="Digit6PlusBtn" Width="40" Height="40" Background="{DynamicResource NewTimerWindowButtonBackground}"
BorderThickness="0" Click="Digit6Plus_Click" Cursor="Hand" Margin="0,0,0,15" HorizontalAlignment="Center">
<Button.Template>
<ControlTemplate TargetType="Button">
@@ -367,7 +367,7 @@
</ControlTemplate>
</Button.Template>
<Path Data="M12 5l0 14 M5 12l14 0"
Stroke="{DynamicResource SeewoTimerWindowButtonForeground}"
Stroke="{DynamicResource NewTimerWindowButtonForeground}"
StrokeThickness="2"
StrokeStartLineCap="Round"
StrokeEndLineCap="Round"
@@ -378,14 +378,14 @@
</Button>
<!-- 数字显示 -->
<Path x:Name="Digit6Display" Data="{StaticResource Digit0}"
Fill="{DynamicResource SeewoTimerWindowDigitForeground}"
Fill="{DynamicResource NewTimerWindowDigitForeground}"
Width="48" Height="48"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Stretch="Uniform"
Margin="0,0,0,15"/>
<!-- 下方-按钮 -->
<Button x:Name="Digit6MinusBtn" Width="40" Height="40" Background="{DynamicResource SeewoTimerWindowButtonBackground}"
<Button x:Name="Digit6MinusBtn" Width="40" Height="40" Background="{DynamicResource NewTimerWindowButtonBackground}"
BorderThickness="0" Click="Digit6Minus_Click" Cursor="Hand" HorizontalAlignment="Center">
<Button.Template>
<ControlTemplate TargetType="Button">
@@ -395,7 +395,7 @@
</ControlTemplate>
</Button.Template>
<Path Data="M5 12l14 0"
Stroke="{DynamicResource SeewoTimerWindowButtonForeground}"
Stroke="{DynamicResource NewTimerWindowButtonForeground}"
StrokeThickness="2"
StrokeStartLineCap="Round"
StrokeEndLineCap="Round"
@@ -412,7 +412,7 @@
</Grid>
<!-- 分割线 -->
<Border Width="2" Background="{DynamicResource SeewoTimerWindowButtonForeground}"
<Border Width="2" Background="{DynamicResource NewTimerWindowButtonForeground}"
Opacity="0.3" HorizontalAlignment="Left" VerticalAlignment="Stretch"
Margin="465,0,0,0"/>
@@ -422,7 +422,7 @@
<StackPanel Orientation="Vertical" HorizontalAlignment="Center">
<!-- Segmented Control -->
<Grid Margin="0,0,0,20">
<Border Background="{DynamicResource SeewoTimerWindowButtonBackground}"
<Border Background="{DynamicResource NewTimerWindowButtonBackground}"
CornerRadius="8"
BorderThickness="1"
BorderBrush="#616161"
@@ -430,7 +430,7 @@
<Grid>
<!-- 背景指示器 -->
<Border x:Name="SegmentedIndicator"
Background="{DynamicResource SeewoTimerWindowPrimaryButtonBackground}"
Background="{DynamicResource NewTimerWindowPrimaryButtonBackground}"
CornerRadius="7.5,0,0,7.5"
Width="120" Height="38"
HorizontalAlignment="Left"
@@ -447,7 +447,7 @@
Cursor="Hand"
HorizontalAlignment="Left">
<TextBlock x:Name="CommonTabText" Text="常用" FontSize="16" FontWeight="Bold"
Foreground="{DynamicResource SeewoTimerWindowButtonForeground}"/>
Foreground="{DynamicResource NewTimerWindowButtonForeground}"/>
</Button>
<Button x:Name="RecentTabBtn"
Width="120" Height="40"
@@ -457,7 +457,7 @@
Cursor="Hand"
HorizontalAlignment="Right">
<TextBlock x:Name="RecentTabText" Text="最近" FontSize="16" FontWeight="Normal"
Foreground="{DynamicResource SeewoTimerWindowButtonForeground}" Opacity="0.6"/>
Foreground="{DynamicResource NewTimerWindowButtonForeground}" Opacity="0.6"/>
</Button>
</Grid>
</Grid>
@@ -469,7 +469,7 @@
<StackPanel Orientation="Vertical" HorizontalAlignment="Center">
<!-- 第一排:5分钟, 10分钟, 15分钟 -->
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,0,0,10">
<Button x:Name="Common5MinBtn" Width="100" Height="55" Background="{DynamicResource SeewoTimerWindowButtonBackground}"
<Button x:Name="Common5MinBtn" Width="100" Height="55" Background="{DynamicResource NewTimerWindowButtonBackground}"
BorderThickness="0" Click="Common5Min_Click" Cursor="Hand" Margin="0,0,15,0">
<Button.Template>
<ControlTemplate TargetType="Button">
@@ -480,7 +480,7 @@
</Button.Template>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<Path Data="M10 15h2a1.5 1.5 0 0 0 0 -3h-2v-3h3.5 M3 12v.01 M21 12v.01 M12 21v.01 M7.5 4.2v.01 M16.5 19.8v.01 M7.5 19.8v.01 M4.2 16.5v.01 M19.8 16.5v.01 M19.8 7.5v.01 M4.2 7.5v.01 M16.5 4.206a9.042 9.042 0 0 0 -4.5 -1.206"
Stroke="{DynamicResource SeewoTimerWindowButtonForeground}"
Stroke="{DynamicResource NewTimerWindowButtonForeground}"
StrokeThickness="2"
StrokeStartLineCap="Round"
StrokeEndLineCap="Round"
@@ -490,10 +490,10 @@
Stretch="Uniform"
Margin="0,0,8,0"/>
<TextBlock Text="05:00" FontSize="16" FontWeight="Bold"
Foreground="{DynamicResource SeewoTimerWindowButtonForeground}"/>
Foreground="{DynamicResource NewTimerWindowButtonForeground}"/>
</StackPanel>
</Button>
<Button x:Name="Common10MinBtn" Width="100" Height="55" Background="{DynamicResource SeewoTimerWindowButtonBackground}"
<Button x:Name="Common10MinBtn" Width="100" Height="55" Background="{DynamicResource NewTimerWindowButtonBackground}"
BorderThickness="0" Click="Common10Min_Click" Cursor="Hand" Margin="0,0,15,0">
<Button.Template>
<ControlTemplate TargetType="Button">
@@ -504,7 +504,7 @@
</Button.Template>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<Path Data="M9 9v6 M12 11v2a2 2 0 1 0 4 0v-2a2 2 0 1 0 -4 0z M3 12v.01 M21 12v.01 M12 21v.01 M7.5 4.2v.01 M16.5 19.8v.01 M7.5 19.8v.01 M4.2 16.5v.01 M19.8 16.5v.01 M4.2 7.5v.01 M19.81 7.527a8.994 8.994 0 0 0 -7.81 -4.527"
Stroke="{DynamicResource SeewoTimerWindowButtonForeground}"
Stroke="{DynamicResource NewTimerWindowButtonForeground}"
StrokeThickness="2"
StrokeStartLineCap="Round"
StrokeEndLineCap="Round"
@@ -514,10 +514,10 @@
Stretch="Uniform"
Margin="0,0,8,0"/>
<TextBlock Text="10:00" FontSize="16" FontWeight="Bold"
Foreground="{DynamicResource SeewoTimerWindowButtonForeground}"/>
Foreground="{DynamicResource NewTimerWindowButtonForeground}"/>
</StackPanel>
</Button>
<Button x:Name="Common15MinBtn" Width="100" Height="55" Background="{DynamicResource SeewoTimerWindowButtonBackground}"
<Button x:Name="Common15MinBtn" Width="100" Height="55" Background="{DynamicResource NewTimerWindowButtonBackground}"
BorderThickness="0" Click="Common15Min_Click" Cursor="Hand">
<Button.Template>
<ControlTemplate TargetType="Button">
@@ -528,7 +528,7 @@
</Button.Template>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<Path Data="M12 15h2a1 1 0 0 0 1 -1v-1a1 1 0 0 0 -1 -1h-2v-3h3 M9 9v6 M3 12v.01 M12 21v.01 M7.5 4.2v.01 M16.5 19.8v.01 M7.5 19.8v.01 M4.2 16.5v.01 M19.8 16.5v.01 M4.2 7.5v.01 M21 12a9 9 0 0 0 -9 -9"
Stroke="{DynamicResource SeewoTimerWindowButtonForeground}"
Stroke="{DynamicResource NewTimerWindowButtonForeground}"
StrokeThickness="2"
StrokeStartLineCap="Round"
StrokeEndLineCap="Round"
@@ -538,14 +538,14 @@
Stretch="Uniform"
Margin="0,0,8,0"/>
<TextBlock Text="15:00" FontSize="16" FontWeight="Bold"
Foreground="{DynamicResource SeewoTimerWindowButtonForeground}"/>
Foreground="{DynamicResource NewTimerWindowButtonForeground}"/>
</StackPanel>
</Button>
</StackPanel>
<!-- 第二排:30分钟, 45分钟, 60分钟 -->
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<Button x:Name="Common30MinBtn" Width="100" Height="55" Background="{DynamicResource SeewoTimerWindowButtonBackground}"
<Button x:Name="Common30MinBtn" Width="100" Height="55" Background="{DynamicResource NewTimerWindowButtonBackground}"
BorderThickness="0" Click="Common30Min_Click" Cursor="Hand" Margin="0,0,15,0">
<Button.Template>
<ControlTemplate TargetType="Button">
@@ -556,7 +556,7 @@
</Button.Template>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<Path Data="M14 10.5v3a1.5 1.5 0 0 0 3 0v-3a1.5 1.5 0 0 0 -3 0z M8 9h1.5a1.5 1.5 0 0 1 0 3h-.5h.5a1.5 1.5 0 0 1 0 3h-1.5 M3 12v.01 M7.5 4.2v.01 M7.5 19.8v.01 M4.2 16.5v.01 M4.2 7.5v.01 M12 21a9 9 0 0 0 0 -18"
Stroke="{DynamicResource SeewoTimerWindowButtonForeground}"
Stroke="{DynamicResource NewTimerWindowButtonForeground}"
StrokeThickness="2"
StrokeStartLineCap="Round"
StrokeEndLineCap="Round"
@@ -566,10 +566,10 @@
Stretch="Uniform"
Margin="0,0,8,0"/>
<TextBlock Text="30:00" FontSize="16" FontWeight="Bold"
Foreground="{DynamicResource SeewoTimerWindowButtonForeground}"/>
Foreground="{DynamicResource NewTimerWindowButtonForeground}"/>
</StackPanel>
</Button>
<Button x:Name="Common45MinBtn" Width="100" Height="55" Background="{DynamicResource SeewoTimerWindowButtonBackground}"
<Button x:Name="Common45MinBtn" Width="100" Height="55" Background="{DynamicResource NewTimerWindowButtonBackground}"
BorderThickness="0" Click="Common45Min_Click" Cursor="Hand" Margin="0,0,15,0">
<Button.Template>
<ControlTemplate TargetType="Button">
@@ -580,7 +580,7 @@
</Button.Template>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<Path Data="M13 15h2a1 1 0 0 0 1 -1v-1a1 1 0 0 0 -1 -1h-2v-3h3 M7 9v2a1 1 0 0 0 1 1h1 M10 9v6 M7.5 4.2v.01 M4.2 7.5v.01 M3 12a9 9 0 1 0 9 -9"
Stroke="{DynamicResource SeewoTimerWindowButtonForeground}"
Stroke="{DynamicResource NewTimerWindowButtonForeground}"
StrokeThickness="2"
StrokeStartLineCap="Round"
StrokeEndLineCap="Round"
@@ -590,10 +590,10 @@
Stretch="Uniform"
Margin="0,0,8,0"/>
<TextBlock Text="45:00" FontSize="16" FontWeight="Bold"
Foreground="{DynamicResource SeewoTimerWindowButtonForeground}"/>
Foreground="{DynamicResource NewTimerWindowButtonForeground}"/>
</StackPanel>
</Button>
<Button x:Name="Common60MinBtn" Width="100" Height="55" Background="{DynamicResource SeewoTimerWindowButtonBackground}"
<Button x:Name="Common60MinBtn" Width="100" Height="55" Background="{DynamicResource NewTimerWindowButtonBackground}"
BorderThickness="0" Click="Common60Min_Click" Cursor="Hand">
<Button.Template>
<ControlTemplate TargetType="Button">
@@ -604,7 +604,7 @@
</Button.Template>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<Path Data="M14 10.5v3a1.5 1.5 0 0 0 3 0v-3a1.5 1.5 0 0 0 -3 0z M11 9h-2a1 1 0 0 0 -1 1v4a1 1 0 0 0 1 1h1a1 1 0 0 0 1 -1v-1a1 1 0 0 0 -1 -1h-2 M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0"
Stroke="{DynamicResource SeewoTimerWindowButtonForeground}"
Stroke="{DynamicResource NewTimerWindowButtonForeground}"
StrokeThickness="2"
StrokeStartLineCap="Round"
StrokeEndLineCap="Round"
@@ -614,7 +614,7 @@
Stretch="Uniform"
Margin="0,0,8,0"/>
<TextBlock Text="60:00" FontSize="16" FontWeight="Bold"
Foreground="{DynamicResource SeewoTimerWindowButtonForeground}"/>
Foreground="{DynamicResource NewTimerWindowButtonForeground}"/>
</StackPanel>
</Button>
</StackPanel>
@@ -626,7 +626,7 @@
<StackPanel Orientation="Vertical" HorizontalAlignment="Center">
<!-- 第一排:最近3个 -->
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,0,0,10">
<Button x:Name="RecentTimer1Btn" Width="100" Height="55" Background="{DynamicResource SeewoTimerWindowButtonBackground}"
<Button x:Name="RecentTimer1Btn" Width="100" Height="55" Background="{DynamicResource NewTimerWindowButtonBackground}"
BorderThickness="0" Click="RecentTimer1_Click" Cursor="Hand" Margin="0,0,15,0">
<Button.Template>
<ControlTemplate TargetType="Button">
@@ -636,9 +636,9 @@
</ControlTemplate>
</Button.Template>
<TextBlock x:Name="RecentTimer1Text" Text="--:--" FontSize="16" FontWeight="Bold"
Foreground="{DynamicResource SeewoTimerWindowButtonForeground}"/>
Foreground="{DynamicResource NewTimerWindowButtonForeground}"/>
</Button>
<Button x:Name="RecentTimer2Btn" Width="100" Height="55" Background="{DynamicResource SeewoTimerWindowButtonBackground}"
<Button x:Name="RecentTimer2Btn" Width="100" Height="55" Background="{DynamicResource NewTimerWindowButtonBackground}"
BorderThickness="0" Click="RecentTimer2_Click" Cursor="Hand" Margin="0,0,15,0">
<Button.Template>
<ControlTemplate TargetType="Button">
@@ -648,9 +648,9 @@
</ControlTemplate>
</Button.Template>
<TextBlock x:Name="RecentTimer2Text" Text="--:--" FontSize="16" FontWeight="Bold"
Foreground="{DynamicResource SeewoTimerWindowButtonForeground}"/>
Foreground="{DynamicResource NewTimerWindowButtonForeground}"/>
</Button>
<Button x:Name="RecentTimer3Btn" Width="100" Height="55" Background="{DynamicResource SeewoTimerWindowButtonBackground}"
<Button x:Name="RecentTimer3Btn" Width="100" Height="55" Background="{DynamicResource NewTimerWindowButtonBackground}"
BorderThickness="0" Click="RecentTimer3_Click" Cursor="Hand">
<Button.Template>
<ControlTemplate TargetType="Button">
@@ -660,13 +660,13 @@
</ControlTemplate>
</Button.Template>
<TextBlock x:Name="RecentTimer3Text" Text="--:--" FontSize="16" FontWeight="Bold"
Foreground="{DynamicResource SeewoTimerWindowButtonForeground}"/>
Foreground="{DynamicResource NewTimerWindowButtonForeground}"/>
</Button>
</StackPanel>
<!-- 第二排:最近3个 -->
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<Button x:Name="RecentTimer4Btn" Width="100" Height="55" Background="{DynamicResource SeewoTimerWindowButtonBackground}"
<Button x:Name="RecentTimer4Btn" Width="100" Height="55" Background="{DynamicResource NewTimerWindowButtonBackground}"
BorderThickness="0" Click="RecentTimer4_Click" Cursor="Hand" Margin="0,0,15,0">
<Button.Template>
<ControlTemplate TargetType="Button">
@@ -676,9 +676,9 @@
</ControlTemplate>
</Button.Template>
<TextBlock x:Name="RecentTimer4Text" Text="--:--" FontSize="16" FontWeight="Bold"
Foreground="{DynamicResource SeewoTimerWindowButtonForeground}"/>
Foreground="{DynamicResource NewTimerWindowButtonForeground}"/>
</Button>
<Button x:Name="RecentTimer5Btn" Width="100" Height="55" Background="{DynamicResource SeewoTimerWindowButtonBackground}"
<Button x:Name="RecentTimer5Btn" Width="100" Height="55" Background="{DynamicResource NewTimerWindowButtonBackground}"
BorderThickness="0" Click="RecentTimer5_Click" Cursor="Hand" Margin="0,0,15,0">
<Button.Template>
<ControlTemplate TargetType="Button">
@@ -688,9 +688,9 @@
</ControlTemplate>
</Button.Template>
<TextBlock x:Name="RecentTimer5Text" Text="--:--" FontSize="16" FontWeight="Bold"
Foreground="{DynamicResource SeewoTimerWindowButtonForeground}"/>
Foreground="{DynamicResource NewTimerWindowButtonForeground}"/>
</Button>
<Button x:Name="RecentTimer6Btn" Width="100" Height="55" Background="{DynamicResource SeewoTimerWindowButtonBackground}"
<Button x:Name="RecentTimer6Btn" Width="100" Height="55" Background="{DynamicResource NewTimerWindowButtonBackground}"
BorderThickness="0" Click="RecentTimer6_Click" Cursor="Hand">
<Button.Template>
<ControlTemplate TargetType="Button">
@@ -700,7 +700,7 @@
</ControlTemplate>
</Button.Template>
<TextBlock x:Name="RecentTimer6Text" Text="--:--" FontSize="16" FontWeight="Bold"
Foreground="{DynamicResource SeewoTimerWindowButtonForeground}"/>
Foreground="{DynamicResource NewTimerWindowButtonForeground}"/>
</Button>
</StackPanel>
</StackPanel>
@@ -713,7 +713,7 @@
<Grid HorizontalAlignment="Center" VerticalAlignment="Bottom" Margin="0,0,0,20">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<!-- 全屏按钮 -->
<Button x:Name="FullscreenBtn" Width="80" Height="40" Background="{DynamicResource SeewoTimerWindowButtonBackground}"
<Button x:Name="FullscreenBtn" Width="80" Height="40" Background="{DynamicResource NewTimerWindowButtonBackground}"
BorderThickness="0" Click="Fullscreen_Click" Cursor="Hand" Margin="0,0,30,0">
<Button.Template>
<ControlTemplate TargetType="Button">
@@ -724,19 +724,19 @@
</Button.Template>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<Path Data="M4 8v-2a2 2 0 0 1 2 -2h2 M4 16v2a2 2 0 0 0 2 2h2 M16 4h2a2 2 0 0 1 2 2v2 M16 20h2a2 2 0 0 0 2 -2v-2"
Stroke="{DynamicResource SeewoTimerWindowButtonForeground}"
Stroke="{DynamicResource NewTimerWindowButtonForeground}"
StrokeThickness="2"
StrokeLineJoin="Round"
Fill="Transparent"
Width="20" Height="20"
Stretch="Uniform"
Margin="0,0,5,0"/>
<TextBlock Text="全屏" FontSize="16" Foreground="{DynamicResource SeewoTimerWindowButtonForeground}"/>
<TextBlock Text="全屏" FontSize="16" Foreground="{DynamicResource NewTimerWindowButtonForeground}"/>
</StackPanel>
</Button>
<!-- 开始/暂停按钮 -->
<Button x:Name="StartPauseBtn" Width="80" Height="80" Background="{DynamicResource SeewoTimerWindowPrimaryButtonBackground}"
<Button x:Name="StartPauseBtn" Width="80" Height="80" Background="{DynamicResource NewTimerWindowPrimaryButtonBackground}"
BorderThickness="0" Click="StartPause_Click" Cursor="Hand" Margin="0,0,30,0">
<Button.Template>
<ControlTemplate TargetType="Button">
@@ -746,13 +746,13 @@
</ControlTemplate>
</Button.Template>
<Path x:Name="StartPauseIcon" Data="M6.5 4.00004V20C6.49995 20.178 6.54737 20.3527 6.63738 20.5062C6.72739 20.6597 6.85672 20.7864 7.01202 20.8732C7.16733 20.96 7.34299 21.0038 7.52088 21.0001C7.69878 20.9964 7.87245 20.9453 8.024 20.852L21.024 12.852C21.1696 12.7626 21.2898 12.6373 21.3733 12.4881C21.4567 12.339 21.5005 12.1709 21.5005 12C21.5005 11.8291 21.4567 11.6611 21.3733 11.512C21.2898 11.3628 21.1696 11.2375 21.024 11.148L8.024 3.14804C7.87245 3.0548 7.69878 3.00369 7.52088 2.99997C7.34299 2.99626 7.16733 3.04007 7.01202 3.1269C6.85672 3.21372 6.72739 3.34042 6.63738 3.4939C6.54737 3.64739 6.49995 3.82211 6.5 4.00004Z"
Fill="{DynamicResource SeewoTimerWindowPrimaryButtonForeground}"
Fill="{DynamicResource NewTimerWindowPrimaryButtonForeground}"
Width="24" Height="24" Margin="2,0,0,0"
HorizontalAlignment="Center" VerticalAlignment="Center" Stretch="Fill"/>
</Button>
<!-- 重置按钮 -->
<Button x:Name="ResetBtn" Width="80" Height="40" Background="{DynamicResource SeewoTimerWindowButtonBackground}"
<Button x:Name="ResetBtn" Width="80" Height="40" Background="{DynamicResource NewTimerWindowButtonBackground}"
BorderThickness="0" Click="Reset_Click" Cursor="Hand">
<Button.Template>
<ControlTemplate TargetType="Button">
@@ -763,14 +763,14 @@
</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 SeewoTimerWindowButtonForeground}"
Stroke="{DynamicResource NewTimerWindowButtonForeground}"
StrokeThickness="2"
StrokeLineJoin="Round"
Fill="Transparent"
Width="20" Height="20"
Stretch="Uniform"
Margin="0,0,5,0"/>
<TextBlock Text="重置" FontSize="16" Foreground="{DynamicResource SeewoTimerWindowButtonForeground}"/>
<TextBlock Text="重置" FontSize="16" Foreground="{DynamicResource NewTimerWindowButtonForeground}"/>
</StackPanel>
</Button>
</StackPanel>
@@ -780,4 +780,4 @@
</Grid>
</Grid>
</Border>
</Window>
</Window>