mirror of
https://github.com/Tichau/FileConverter.git
synced 2026-11-20 09:32:54 +01:00
101 lines
5.7 KiB
XML
101 lines
5.7 KiB
XML
<Window x:Class="FileConverter.Views.UpgradeWindow"
|
|
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:project="clr-namespace:FileConverter.Properties"
|
|
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
|
|
xmlns:command="http://www.galasoft.ch/mvvmlight"
|
|
mc:Ignorable="d"
|
|
Title="{x:Static project:Resources.UpgradeWindowTitle}"
|
|
WindowStartupLocation="CenterScreen" Icon="/FileConverter;component/Resources/ApplicationIcon.ico"
|
|
MinHeight="300" MinWidth="450"
|
|
Height="450" Width="450" WindowStyle="ToolWindow"
|
|
DataContext="{Binding Upgrade, Source={StaticResource Locator}}">
|
|
<i:Interaction.Triggers>
|
|
<i:EventTrigger EventName="Closing">
|
|
<command:EventToCommand Command="{Binding CloseCommand}" PassEventArgsToCommand="True" />
|
|
</i:EventTrigger>
|
|
</i:Interaction.Triggers>
|
|
<Window.Resources>
|
|
</Window.Resources>
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<TextBlock Margin="5"
|
|
Text="{x:Static project:Resources.UpgradeAvailable}" TextWrapping="Wrap"/>
|
|
|
|
<FlowDocumentScrollViewer Grid.Row="2" Margin="5" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
|
|
Document="{Binding UpgradeVersionDescription.ChangeLog, Source={StaticResource Upgrade}, Converter={StaticResource ChangelogToMarkdown}}"/>
|
|
|
|
<!-- Download button -->
|
|
<Button Background="WhiteSmoke" Grid.Row="3" Padding="10,5,10,5" Margin="5" HorizontalContentAlignment="Left" Command="{Binding DownloadInstallerCommand}"
|
|
Visibility="{Binding UpgradeVersionDescription.InstallerDownloadNotStarted, Source={StaticResource Upgrade}, Converter={StaticResource BoolToVisibility}, ConverterParameter=Collapsed}">
|
|
<Button.Content>
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="64"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<Image Source="/FileConverter;component/Resources/DownloadIcon.png" Stretch="Fill"/>
|
|
<Grid Grid.Column="1" Margin="10,0,0,0">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
<Label Grid.Row="0" Content="{x:Static project:Resources.DownloadAndInstallButtonTitle}" FontSize="14.667"/>
|
|
<TextBlock Grid.Row="1" Text="{x:Static project:Resources.DownloadAndInstallButtonDescription}" TextWrapping="Wrap" FontSize="10.667"/>
|
|
</Grid>
|
|
</Grid>
|
|
</Button.Content>
|
|
</Button>
|
|
|
|
<!-- Download in progress -->
|
|
<Grid Grid.Row="3" Margin="5"
|
|
Visibility="{Binding UpgradeVersionDescription.InstallerDownloadInProgress, Source={StaticResource Upgrade}, Converter={StaticResource BoolToVisibility}, ConverterParameter=Collapsed}">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="64"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<Image Source="/FileConverter;component/Resources/DownloadIcon.png" Stretch="Fill"/>
|
|
<Grid Grid.Column="1" Margin="10,0,0,0">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
<Label Grid.Row="0" Content="{x:Static project:Resources.UpgradeDownloadInProgress}" FontSize="14.667"/>
|
|
<ProgressBar Grid.Row="1" Margin="5" Height="30" Foreground="#004B82" Minimum="0" Maximum="100"
|
|
Value="{Binding UpgradeVersionDescription.InstallerDownloadProgress, Source={StaticResource Upgrade}}"/>
|
|
</Grid>
|
|
</Grid>
|
|
|
|
<!-- Install button -->
|
|
<Button Background="WhiteSmoke" Grid.Row="3" Padding="10,5,10,5" Margin="5" HorizontalContentAlignment="Left" Command="{Binding LaunchInstallerCommand}"
|
|
Visibility="{Binding UpgradeVersionDescription.InstallerDownloadDone, Source={StaticResource Upgrade}, Converter={StaticResource BoolToVisibility}, ConverterParameter=Collapsed}">
|
|
<Button.Content>
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="64"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<Image Source="/FileConverter;component/Resources/ApplicationIcon.png" Stretch="Fill"/>
|
|
<Grid Grid.Column="1" Margin="10,0,0,0">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
<Label Grid.Row="0" Content="{x:Static project:Resources.InstallButtonTitle}" FontSize="14.667"/>
|
|
<TextBlock Grid.Row="1" Text="{x:Static project:Resources.InstallButtonDescription}" TextWrapping="Wrap" FontSize="10.667"/>
|
|
</Grid>
|
|
</Grid>
|
|
</Button.Content>
|
|
</Button>
|
|
</Grid>
|
|
</Window>
|