|
|
|
|
<Window x:Class="Updater.MainWindow"
|
|
|
|
|
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:Updater"
|
|
|
|
|
mc:Ignorable="d"
|
|
|
|
|
WindowStartupLocation="CenterScreen"
|
|
|
|
|
Icon="update.ico"
|
|
|
|
|
Title="STranslate 升级程序" ResizeMode="NoResize" Height="300" Width="420">
|
|
|
|
|
<Grid Margin="10">
|
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
|
<RowDefinition Height="*"/>
|
|
|
|
|
<RowDefinition Height="50"/>
|
|
|
|
|
|
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
<StackPanel>
|
|
|
|
|
<Border Background="#f3f3f3" Padding="10" CornerRadius="2">
|
|
|
|
|
<TextBlock x:Name="StatusLabel" Foreground="Gray" TextWrapping="WrapWithOverflow"/>
|
|
|
|
|
</Border>
|
|
|
|
|
<ProgressBar x:Name="ProgressBar" Height="10" Margin="0,10,0,10" Maximum="100"
|
|
|
|
|
Value="{Binding ProcessValue}"/>
|
|
|
|
|
|
|
|
|
|
<StackPanel x:Name="NewVersionSP" Margin="10">
|
|
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
|
|
<TextBlock VerticalAlignment="Center">
|
|
|
|
|
<Run>版本号</Run>
|
|
|
|
|
<Run x:Name="Version" Foreground="Gray"/>
|
|
|
|
|
</TextBlock>
|
|
|
|
|
<Border x:Name="PreTag"
|
|
|
|
|
ToolTip="预览版表示开发者没有进行过多的测试,相较于正式版可能会多一些bug,但也并不是一定"
|
|
|
|
|
Background="OrangeRed"
|
|
|
|
|
Padding="5,2"
|
|
|
|
|
CornerRadius="4"
|
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
|
Margin="10,0,0,0">
|
|
|
|
|
|
|
|
|
|
<TextBlock Text="预览版" Foreground="White" FontSize="10" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
|
|
|
|
|
|
|
|
|
</Border>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
<TextBlock Margin="0,10,0,0" ToolTip="版本简介"><Run x:Name="VersionTitle" Foreground="Gray"/></TextBlock>
|
|
|
|
|
<TextBlock Margin="0,10,0,0" ToolTip="在浏览器中打开"><Hyperlink Click="Hyperlink_Click">查看详细更新内容</Hyperlink></TextBlock>
|
|
|
|
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
<StackPanel Orientation="Horizontal" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Left">
|
|
|
|
|
<Button x:Name="UpdateBtn" Padding="10,8" Margin="0,0,10,0" Click="UpdateBtn_Click">升级到此新版本</Button>
|
|
|
|
|
<Button x:Name="ReCheckBtn" Padding="10,8" Click="ReCheckBtn_Click">重新检查</Button>
|
|
|
|
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
<TextBlock Grid.Row="1" VerticalAlignment="Bottom" HorizontalAlignment="Right">
|
|
|
|
|
<Run>当前版本号:</Run><Run Text="{Binding Version}"/>
|
|
|
|
|
</TextBlock>
|
|
|
|
|
|
|
|
|
|
</Grid>
|
|
|
|
|
</Window>
|