-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUpdateDialogWindow.xaml
More file actions
188 lines (172 loc) · 10.7 KB
/
Copy pathUpdateDialogWindow.xaml
File metadata and controls
188 lines (172 loc) · 10.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
<Window x:Class="TaskbarInfo.UpdateDialogWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="检查更新"
Width="430"
SizeToContent="Height"
MaxHeight="680"
WindowStyle="None"
ResizeMode="NoResize"
ShowInTaskbar="False"
AllowsTransparency="False"
WindowStartupLocation="CenterOwner"
Background="Transparent"
FontFamily="Microsoft YaHei UI, Segoe UI, sans-serif"
UseLayoutRounding="True"
TextOptions.TextFormattingMode="Display">
<Window.Resources>
<FontFamily x:Key="Lucide">./Fonts/lucide.ttf#lucide</FontFamily>
<SolidColorBrush x:Key="SystemAccentColor" Color="#0067C0"/>
<SolidColorBrush x:Key="SystemAccentHoverColor" Color="#1975C5"/>
<SolidColorBrush x:Key="TextPrimaryColor" Color="#1B2530"/>
<SolidColorBrush x:Key="TextSecondaryColor" Color="#596675"/>
<SolidColorBrush x:Key="CardBackground" Color="#FFFFFF"/>
<SolidColorBrush x:Key="ControlBorder" Color="#D9E0E8"/>
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="{DynamicResource ThemePrimaryTextBrush}"/>
</Style>
<Style x:Key="BodyText" TargetType="TextBlock" BasedOn="{StaticResource {x:Type TextBlock}}">
<Setter Property="FontSize" Value="13"/>
<Setter Property="TextWrapping" Value="Wrap"/>
<Setter Property="Foreground" Value="{DynamicResource ThemeSecondaryTextBrush}"/>
</Style>
<Style TargetType="Button">
<Setter Property="Background" Value="{DynamicResource ThemeControlBackgroundBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource ThemeControlBorderBrush}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Padding" Value="14,7"/>
<Setter Property="FontSize" Value="13"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="8">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="border" Property="Background" Value="#FBFBFB"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="AccentButton" TargetType="Button" BasedOn="{StaticResource {x:Type Button}}">
<Setter Property="Background" Value="{StaticResource SystemAccentColor}"/>
<Setter Property="BorderBrush" Value="{StaticResource SystemAccentColor}"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="8">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" TextElement.Foreground="White"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="border" Property="Background" Value="{StaticResource SystemAccentHoverColor}"/>
<Setter TargetName="border" Property="BorderBrush" Value="{StaticResource SystemAccentHoverColor}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="WindowControlButton" TargetType="Button">
<Setter Property="Width" Value="34"/>
<Setter Property="Height" Value="32"/>
<Setter Property="Padding" Value="0"/>
<Setter Property="Foreground" Value="{DynamicResource ThemePrimaryTextBrush}"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="surface" Background="{TemplateBinding Background}" CornerRadius="6">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="surface" Property="Background" Value="#180F1720"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="surface" Property="Background" Value="#2B0F1720"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Window.Resources>
<Border x:Name="RootSurface" Background="{DynamicResource ThemeSurfaceBrush}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="40"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Border x:Name="TitleBar" Grid.Row="0" Background="Transparent" MouseLeftButtonDown="TitleBar_MouseLeftButtonDown">
<Grid Margin="12,4,8,4">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="34"/>
</Grid.ColumnDefinitions>
<TextBlock Text="检查更新" FontSize="13" FontWeight="SemiBold" VerticalAlignment="Center"/>
<Button Grid.Column="1" Style="{StaticResource WindowControlButton}" ToolTip="关闭" Click="Close_Click">
<TextBlock Text="" FontFamily="{StaticResource Lucide}" FontSize="12"/>
</Button>
</Grid>
</Border>
<Grid Grid.Row="1" Margin="24,8,24,22">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<StackPanel x:Name="ResultHeader" HorizontalAlignment="Center">
<Border x:Name="StatusGlyphBadge" Width="52" Height="52" CornerRadius="16" Background="#EAF4FF" HorizontalAlignment="Center">
<TextBlock x:Name="StatusGlyphText" Text="i" FontSize="26" FontWeight="Bold" Foreground="{StaticResource SystemAccentColor}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<TextBlock x:Name="TitleText" Margin="0,14,0,4" FontSize="21" FontWeight="SemiBold" HorizontalAlignment="Center" TextAlignment="Center"/>
<TextBlock x:Name="SummaryText" MaxWidth="350" Style="{StaticResource BodyText}" HorizontalAlignment="Center" TextAlignment="Center"/>
</StackPanel>
<Border Grid.Row="1" Margin="0,18,0,0" Background="{DynamicResource ThemeControlBackgroundBrush}" BorderBrush="{DynamicResource ThemeControlBorderBrush}" BorderThickness="1" CornerRadius="10" Padding="16">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="90"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="8"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="8"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock Text="当前版本" Foreground="{DynamicResource ThemeSecondaryTextBrush}"/>
<TextBlock x:Name="CurrentVersionText" Grid.Column="1" FontWeight="SemiBold"/>
<TextBlock Grid.Row="2" Text="最新版本" Foreground="{DynamicResource ThemeSecondaryTextBrush}"/>
<TextBlock x:Name="LatestVersionText" Grid.Row="2" Grid.Column="1" FontWeight="SemiBold"/>
<TextBlock Grid.Row="4" Text="发布时间" Foreground="{DynamicResource ThemeSecondaryTextBrush}"/>
<TextBlock x:Name="PublishedAtText" Grid.Row="4" Grid.Column="1"/>
</Grid>
</Border>
<Border x:Name="NotesPanel" Grid.Row="2" Margin="0,14,0,0" Background="{DynamicResource ThemeControlBackgroundBrush}" BorderBrush="{DynamicResource ThemeControlBorderBrush}" BorderThickness="1" CornerRadius="10" Padding="16" Visibility="Collapsed">
<StackPanel>
<TextBlock x:Name="NotesTitleText" Text="说明" FontWeight="SemiBold" FontSize="14"/>
<ScrollViewer Margin="0,10,0,0" MaxHeight="150" VerticalScrollBarVisibility="Auto">
<TextBlock x:Name="NotesText" Style="{StaticResource BodyText}"/>
</ScrollViewer>
</StackPanel>
</Border>
<StackPanel x:Name="UpdateProgressPanel" Grid.Row="3" Margin="0,18,0,0" Visibility="Collapsed">
<ProgressBar x:Name="UpdateProgressBar" Minimum="0" Maximum="1" Height="4"/>
<TextBlock x:Name="UpdateProgressText" Margin="0,8,0,0" Style="{StaticResource BodyText}" HorizontalAlignment="Center" TextAlignment="Center"/>
</StackPanel>
<Button x:Name="PrimaryButton" Grid.Row="4" Width="124" Margin="0,18,0,0" HorizontalAlignment="Center" Style="{StaticResource AccentButton}" Content="打开下载页" Click="Primary_Click" Visibility="Collapsed"/>
</Grid>
</Grid>
</Border>
</Window>