-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUpdateCheckWindow.xaml
More file actions
124 lines (118 loc) · 7.22 KB
/
Copy pathUpdateCheckWindow.xaml
File metadata and controls
124 lines (118 loc) · 7.22 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
<Window x:Class="ClamHub.UpdateCheckWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:shell="clr-namespace:System.Windows.Shell;assembly=PresentationFramework"
Title="Check for updates" Height="448" Width="560"
MinHeight="448" MinWidth="560" ShowInTaskbar="True"
WindowStartupLocation="CenterOwner" WindowStyle="None" ResizeMode="CanResize"
Background="{StaticResource BgBrush}">
<shell:WindowChrome.WindowChrome>
<shell:WindowChrome CaptionHeight="36" ResizeBorderThickness="6"
CornerRadius="0" GlassFrameThickness="0"
UseAeroCaptionButtons="False"/>
</shell:WindowChrome.WindowChrome>
<Border BorderBrush="{StaticResource WindowBorderBrush}" BorderThickness="1">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="36"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!-- Title bar -->
<Grid Grid.Row="0" Background="{StaticResource TitleBarBrush}">
<TextBlock Text="Check for updates" FontWeight="SemiBold"
VerticalAlignment="Center" Margin="14,0,0,0"/>
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal"
shell:WindowChrome.IsHitTestVisibleInChrome="True">
<Button Style="{StaticResource CaptionButton}" Click="Minimize_Click" ToolTip="Minimize">
<Rectangle Width="11" Height="1" Fill="{StaticResource TextBrush}"/>
</Button>
<Button Style="{StaticResource CloseCaptionButton}" Click="Close_Click" ToolTip="Close">
<Path Data="M0,0 L10,10 M0,10 L10,0" Stroke="{StaticResource TextBrush}"
StrokeThickness="1"/>
</Button>
</StackPanel>
</Grid>
<!-- Body: one card per project -->
<StackPanel Grid.Row="1" Margin="20,16,20,8">
<TextBlock TextWrapping="Wrap" Foreground="{StaticResource MutedTextBrush}"
Margin="0,0,0,14"
Text="Latest releases on GitHub."/>
<!-- ClamHub -->
<Border Background="{StaticResource PanelBrush}" CornerRadius="8" Padding="14"
Margin="0,0,0,12">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0">
<StackPanel Orientation="Horizontal">
<TextBlock Text="ClamHub" FontWeight="SemiBold" FontSize="15"/>
<Ellipse x:Name="ClamHubDot" Width="7" Height="7" Margin="8,2,0,0"
VerticalAlignment="Center" Fill="{StaticResource WarnBrush}"
Visibility="Collapsed"
ToolTip="An update is available"/>
</StackPanel>
<TextBlock x:Name="ClamHubInstalled" Foreground="{StaticResource MutedTextBrush}"
Margin="0,4,0,0"/>
<TextBlock x:Name="ClamHubLatest" Margin="0,2,0,0" TextWrapping="Wrap"/>
</StackPanel>
<Button Grid.Column="1" x:Name="ClamHubButton" Content="Release Page"
VerticalAlignment="Center" Height="30" Padding="14,0" Margin="12,0,0,0"
Click="ClamHubRelease_Click" IsEnabled="False"
ToolTipService.ShowOnDisabled="True"/>
</Grid>
</Border>
<!-- ClamAV -->
<Border Background="{StaticResource PanelBrush}" CornerRadius="8" Padding="14">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0">
<StackPanel Orientation="Horizontal">
<TextBlock Text="ClamAV engine" FontWeight="SemiBold" FontSize="15"/>
<Ellipse x:Name="ClamAvDot" Width="7" Height="7" Margin="8,2,0,0"
VerticalAlignment="Center" Fill="{StaticResource WarnBrush}"
Visibility="Collapsed"
ToolTip="An update is available"/>
</StackPanel>
<TextBlock x:Name="ClamAvInstalled" Foreground="{StaticResource MutedTextBrush}"
Margin="0,4,0,0"/>
<TextBlock x:Name="ClamAvLatest" Margin="0,2,0,0" TextWrapping="Wrap"/>
</StackPanel>
<Button Grid.Column="1" x:Name="ClamAvButton" Content="Download & Set Up"
VerticalAlignment="Center" Height="30" Padding="14,0" Margin="12,0,0,0"
Click="ClamAvInstall_Click" IsEnabled="False"
ToolTipService.ShowOnDisabled="True"/>
</Grid>
</Border>
</StackPanel>
<!-- Footer: progress, status, actions -->
<StackPanel Grid.Row="2" Margin="20,4,20,16">
<ProgressBar x:Name="BusyBar" IsIndeterminate="True" Height="4"
Margin="0,0,0,10" Visibility="Collapsed"
Foreground="{StaticResource AccentBrush}"
Background="{StaticResource ControlBrush}" BorderThickness="0"/>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" x:Name="StatusText" VerticalAlignment="Center"
TextWrapping="Wrap" Margin="0,0,12,0"
Foreground="{StaticResource MutedTextBrush}"/>
<StackPanel Grid.Column="1" Orientation="Horizontal">
<Button x:Name="CancelButton" Content="Cancel" Width="90" Height="32"
Margin="0,0,10,0" Visibility="Collapsed" Click="CancelDownload_Click"/>
<Button x:Name="RefreshButton" Content="Refresh" Width="90" Height="32"
Margin="0,0,10,0" Click="Refresh_Click"/>
<Button Content="Close" Width="90" Height="32" Click="Close_Click"/>
</StackPanel>
</Grid>
</StackPanel>
</Grid>
</Border>
</Window>