| 1 | <Window x:Class="Updater.MainWindow" |
| 2 | xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
| 3 | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| 4 | xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
| 5 | xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
| 6 | xmlns:local="clr-namespace:Updater" |
| 7 | mc:Ignorable="d" |
| 8 | Title="Tai 升级程序" ResizeMode="NoResize" Height="310" Width="435" WindowStartupLocation="CenterScreen"> |
| 9 | <Grid Margin="10"> |
| 10 | <Grid.RowDefinitions> |
| 11 | <RowDefinition Height="*"/> |
| 12 | <RowDefinition Height="50"/> |
| 13 | |
| 14 | </Grid.RowDefinitions> |
| 15 | <StackPanel> |
| 16 | <Border Background="#f3f3f3" Padding="10" CornerRadius="2"> |
| 17 | <TextBlock x:Name="StatusLabel" Foreground="Gray" TextWrapping="WrapWithOverflow"/> |
| 18 | </Border> |
| 19 | <ProgressBar x:Name="ProgressBar" Height="10" Margin="0,10,0,10" Maximum="100" Value="{Binding ProcessValue}"/> |
| 20 | <StackPanel x:Name="NewVersionSP" Margin="10"> |
| 21 | <StackPanel Orientation="Horizontal"> |
| 22 | <TextBlock VerticalAlignment="Center"><Run>版本号</Run> <Run x:Name="Version" Foreground="Gray"/></TextBlock> |
| 23 | <Border x:Name="PreTag" ToolTip="预览版表示开发者没有进行过多的测试,相较于正式版可能会多一些bug,但也并不是一定" Background="OrangeRed" Padding="5,2" CornerRadius="4" VerticalAlignment="Center" Margin="10,0,0,0"> |
| 24 | <TextBlock Text="预览版" Foreground="White" FontSize="10" VerticalAlignment="Center" HorizontalAlignment="Center"/> |
| 25 | </Border> |
| 26 | </StackPanel> |
| 27 | <TextBlock Margin="0,10,0,0" ToolTip="版本简介"><Run x:Name="VersionTitle" Foreground="Gray"/></TextBlock> |
| 28 | <TextBlock Margin="0,10,0,0" ToolTip="在浏览器中打开"><Hyperlink Click="Hyperlink_Click">查看详细更新内容</Hyperlink></TextBlock> |
| 29 | |
| 30 | </StackPanel> |
| 31 | </StackPanel> |
| 32 | <StackPanel Orientation="Horizontal" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Left"> |
| 33 | <Button x:Name="UpdateBtn" Padding="10,8" Margin="0,0,10,0" Click="UpdateBtn_Click">升级到此新版本</Button> |
| 34 | <Button x:Name="ReCheckBtn" Padding="10,8" Click="ReCheckBtn_Click">重新检查</Button> |
| 35 | |
| 36 | </StackPanel> |
| 37 | <TextBlock Grid.Row="1" VerticalAlignment="Bottom" HorizontalAlignment="Right"> |
| 38 | <Run>当前版本号:</Run><Run Text="{Binding Version}"/> |
| 39 | </TextBlock> |
| 40 | |
| 41 | </Grid> |
| 42 | </Window> |