Files
community/Ink Canvas/Windows/MinimizedTimerWindow.xaml
T

127 lines
6.6 KiB
XML
Raw Normal View History

2025-10-06 19:43:04 +08:00
<Window x:Class="Ink_Canvas.MinimizedTimerWindow"
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"
2025-10-06 20:33:50 +08:00
Topmost="True" Background="Transparent"
2025-10-06 19:43:04 +08:00
mc:Ignorable="d" WindowStyle="None" AllowsTransparency="True"
2025-11-15 21:14:08 +08:00
ResizeMode="NoResize"
2025-10-06 19:56:00 +08:00
WindowStartupLocation="Manual" Title="计时器" Height="200" Width="600"
2025-10-06 19:46:14 +08:00
MouseLeftButtonDown="Window_MouseLeftButtonDown" MouseLeftButtonUp="Window_MouseLeftButtonUp"
MouseEnter="Window_MouseEnter" MouseLeave="Window_MouseLeave" MouseMove="Window_MouseMove">
2025-10-06 19:43:04 +08:00
<Window.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="DigitResources.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Window.Resources>
2025-10-12 17:17:51 +08:00
<Border x:Name="MainBorder" Background="{DynamicResource NewTimerWindowBackground}"
2025-10-06 19:56:00 +08:00
CornerRadius="15"
2025-10-06 19:43:04 +08:00
BorderThickness="1"
2025-10-12 17:17:51 +08:00
BorderBrush="{DynamicResource NewTimerWindowBorderBrush}"
2025-10-06 19:56:00 +08:00
Margin="0"
UseLayoutRounding="True"
SnapsToDevicePixels="True">
2025-10-06 19:43:04 +08:00
<Grid>
<!-- 时间显示 -->
2025-10-06 19:56:00 +08:00
<Grid HorizontalAlignment="Center" VerticalAlignment="Center" Margin="20,20,20,20">
2025-10-06 19:43:04 +08:00
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<!-- 小时 -->
<Path x:Name="MinHour1Display" Data="{StaticResource Digit0}"
2025-10-12 17:17:51 +08:00
Fill="{DynamicResource NewTimerWindowDigitForeground}"
2025-10-06 19:56:00 +08:00
Width="72" Height="72"
2025-10-06 19:43:04 +08:00
HorizontalAlignment="Center"
VerticalAlignment="Center"
Stretch="Uniform"
2025-10-06 19:56:00 +08:00
Margin="0,0,12,0"/>
2025-10-06 19:43:04 +08:00
<Path x:Name="MinHour2Display" Data="{StaticResource Digit0}"
2025-10-12 17:17:51 +08:00
Fill="{DynamicResource NewTimerWindowDigitForeground}"
2025-10-06 19:56:00 +08:00
Width="72" Height="72"
2025-10-06 19:43:04 +08:00
HorizontalAlignment="Center"
VerticalAlignment="Center"
Stretch="Uniform"
2025-10-06 19:56:00 +08:00
Margin="0,0,12,0"/>
2025-10-06 19:43:04 +08:00
<!-- 冒号 -->
2025-10-18 16:15:19 +08:00
<TextBlock x:Name="MinColon1Display" Text=":" FontSize="48" FontWeight="Bold"
2025-10-12 17:17:51 +08:00
Foreground="{DynamicResource NewTimerWindowDigitForeground}"
2025-10-06 19:43:04 +08:00
HorizontalAlignment="Center" VerticalAlignment="Center"
2025-10-06 19:56:00 +08:00
Margin="0,0,12,0"/>
2025-10-06 19:43:04 +08:00
<!-- 分钟 -->
<Path x:Name="MinMinute1Display" Data="{StaticResource Digit0}"
2025-10-12 17:17:51 +08:00
Fill="{DynamicResource NewTimerWindowDigitForeground}"
2025-10-06 19:56:00 +08:00
Width="72" Height="72"
2025-10-06 19:43:04 +08:00
HorizontalAlignment="Center"
VerticalAlignment="Center"
Stretch="Uniform"
2025-10-06 19:56:00 +08:00
Margin="0,0,12,0"/>
2025-10-06 19:43:04 +08:00
<Path x:Name="MinMinute2Display" Data="{StaticResource Digit0}"
2025-10-12 17:17:51 +08:00
Fill="{DynamicResource NewTimerWindowDigitForeground}"
2025-10-06 19:56:00 +08:00
Width="72" Height="72"
2025-10-06 19:43:04 +08:00
HorizontalAlignment="Center"
VerticalAlignment="Center"
Stretch="Uniform"
2025-10-06 19:56:00 +08:00
Margin="0,0,12,0"/>
2025-10-06 19:43:04 +08:00
<!-- 冒号 -->
2025-10-18 16:15:19 +08:00
<TextBlock x:Name="MinColon2Display" Text=":" FontSize="48" FontWeight="Bold"
2025-10-12 17:17:51 +08:00
Foreground="{DynamicResource NewTimerWindowDigitForeground}"
2025-10-06 19:43:04 +08:00
HorizontalAlignment="Center" VerticalAlignment="Center"
2025-10-06 19:56:00 +08:00
Margin="0,0,12,0"/>
2025-10-06 19:43:04 +08:00
<!---->
<Path x:Name="MinSecond1Display" Data="{StaticResource Digit0}"
2025-10-12 17:17:51 +08:00
Fill="{DynamicResource NewTimerWindowDigitForeground}"
2025-10-06 19:56:00 +08:00
Width="72" Height="72"
2025-10-06 19:43:04 +08:00
HorizontalAlignment="Center"
VerticalAlignment="Center"
Stretch="Uniform"
2025-10-06 19:56:00 +08:00
Margin="0,0,12,0"/>
2025-10-06 19:43:04 +08:00
<Path x:Name="MinSecond2Display" Data="{StaticResource Digit0}"
2025-10-12 17:17:51 +08:00
Fill="{DynamicResource NewTimerWindowDigitForeground}"
2025-10-06 19:56:00 +08:00
Width="72" Height="72"
2025-10-06 19:43:04 +08:00
HorizontalAlignment="Center"
VerticalAlignment="Center"
Stretch="Uniform"
Margin="0,0,0,0"/>
</StackPanel>
</Grid>
<!-- 关闭按钮 -->
<Button x:Name="CloseButton"
2025-10-06 19:56:00 +08:00
Width="24" Height="24"
2025-10-06 19:43:04 +08:00
HorizontalAlignment="Right"
VerticalAlignment="Top"
2025-10-06 19:56:00 +08:00
Margin="0,8,8,0"
2025-10-06 19:43:04 +08:00
Background="Transparent"
BorderThickness="0"
Click="CloseButton_Click"
Cursor="Hand"
Opacity="0.7">
<Button.Template>
<ControlTemplate TargetType="Button">
2025-10-06 19:56:00 +08:00
<Border Background="{TemplateBinding Background}" CornerRadius="12">
2025-10-06 19:43:04 +08:00
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#E81123"/>
<Setter Property="Foreground" Value="White"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Button.Template>
<TextBlock Text="✕" FontSize="12" FontWeight="Bold"
2025-10-12 17:17:51 +08:00
Foreground="{DynamicResource NewTimerWindowButtonForeground}"
2025-10-06 19:43:04 +08:00
HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Button>
</Grid>
</Border>
</Window>