Files
romrepomgr/RomRepoMgr/Views/SplashWindow.axaml

170 lines
7.2 KiB
XML

<Window xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="clr-namespace:RomRepoMgr.ViewModels;assembly=RomRepoMgr"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:svg="clr-namespace:Avalonia.Svg.Skia;assembly=Avalonia.Svg.Skia"
xmlns:resources="clr-namespace:RomRepoMgr.Resources"
mc:Ignorable="d"
x:Class="RomRepoMgr.Views.SplashWindow"
Icon="/Assets/avalonia-logo.ico"
Title="ROM Repository Manager"
SystemDecorations="BorderOnly"
WindowStartupLocation="CenterScreen"
Width="320"
Height="240">
<Design.DataContext>
<vm:SplashWindowViewModel />
</Design.DataContext>
<!-- Icons from KDE's Breeze-->
<StackPanel HorizontalAlignment="Stretch"
VerticalAlignment="Top"
Orientation="Vertical"
Margin="16"
Spacing="8">
<TextBlock Text="{Binding LoadingText, Mode=OneWay}"
FontWeight="Bold"
HorizontalAlignment="Center"
VerticalAlignment="Top" />
<StackPanel HorizontalAlignment="Left"
Spacing="8"
Orientation="Horizontal">
<Image MaxWidth="24"
MaxHeight="24"
IsVisible="{Binding LoadingSettingsOk, Mode=OneWay}">
<Image.Source>
<svg:SvgImage Source="/Assets/emblem-checked.svg" />
</Image.Source>
</Image>
<Image MaxWidth="24"
MaxHeight="24"
IsVisible="{Binding LoadingSettingsError, Mode=OneWay}">
<Image.Source>
<svg:SvgImage Source="/Assets/emblem-error.svg" />
</Image.Source>
</Image>
<Image MaxWidth="24"
MaxHeight="24"
IsVisible="{Binding LoadingSettingsUnknown, Mode=OneWay}">
<Image.Source>
<svg:SvgImage Source="/Assets/emblem-question.svg" />
</Image.Source>
</Image>
<TextBlock Text="{x:Static resources:Localization.LoadingSettingsText}"
VerticalAlignment="Center" />
</StackPanel>
<StackPanel HorizontalAlignment="Left"
Spacing="8"
Orientation="Horizontal">
<Image MaxWidth="24"
MaxHeight="24"
IsVisible="{Binding CheckingUnArOk, Mode=OneWay}">
<Image.Source>
<svg:SvgImage Source="/Assets/emblem-checked.svg" />
</Image.Source>
</Image>
<Image MaxWidth="24"
MaxHeight="24"
IsVisible="{Binding CheckingUnArError, Mode=OneWay}">
<Image.Source>
<svg:SvgImage Source="/Assets/emblem-error.svg" />
</Image.Source>
</Image>
<Image MaxWidth="24"
MaxHeight="24"
IsVisible="{Binding CheckingUnArUnknown, Mode=OneWay}">
<Image.Source>
<svg:SvgImage Source="/Assets/emblem-question.svg" />
</Image.Source>
</Image>
<TextBlock Text="{x:Static resources:Localization.CheckingUnArText}"
VerticalAlignment="Center" />
</StackPanel>
<StackPanel HorizontalAlignment="Left"
Spacing="8"
Orientation="Horizontal">
<Image MaxWidth="24"
MaxHeight="24"
IsVisible="{Binding LoadingDatabaseOk, Mode=OneWay}">
<Image.Source>
<svg:SvgImage Source="/Assets/emblem-checked.svg" />
</Image.Source>
</Image>
<Image MaxWidth="24"
MaxHeight="24"
IsVisible="{Binding LoadingDatabaseError, Mode=OneWay}">
<Image.Source>
<svg:SvgImage Source="/Assets/emblem-error.svg" />
</Image.Source>
</Image>
<Image MaxWidth="24"
MaxHeight="24"
IsVisible="{Binding LoadingDatabaseUnknown, Mode=OneWay}">
<Image.Source>
<svg:SvgImage Source="/Assets/emblem-question.svg" />
</Image.Source>
</Image>
<TextBlock Text="{x:Static resources:Localization.LoadingDatabaseText}"
VerticalAlignment="Center" />
</StackPanel>
<StackPanel HorizontalAlignment="Left"
Spacing="8"
Orientation="Horizontal">
<Image MaxWidth="24"
MaxHeight="24"
IsVisible="{Binding MigratingDatabaseOk, Mode=OneWay}">
<Image.Source>
<svg:SvgImage Source="/Assets/emblem-checked.svg" />
</Image.Source>
</Image>
<Image MaxWidth="24"
MaxHeight="24"
IsVisible="{Binding MigratingDatabaseError, Mode=OneWay}">
<Image.Source>
<svg:SvgImage Source="/Assets/emblem-error.svg" />
</Image.Source>
</Image>
<Image MaxWidth="24"
MaxHeight="24"
IsVisible="{Binding MigratingDatabaseUnknown, Mode=OneWay}">
<Image.Source>
<svg:SvgImage Source="/Assets/emblem-question.svg" />
</Image.Source>
</Image>
<TextBlock Text="{x:Static resources:Localization.MigratingDatabaseText}"
VerticalAlignment="Center" />
</StackPanel>
<StackPanel HorizontalAlignment="Left"
Spacing="8"
Orientation="Horizontal">
<Image MaxWidth="24"
MaxHeight="24"
IsVisible="{Binding LoadingRomSetsOk, Mode=OneWay}">
<Image.Source>
<svg:SvgImage Source="/Assets/emblem-checked.svg" />
</Image.Source>
</Image>
<Image MaxWidth="24"
MaxHeight="24"
IsVisible="{Binding LoadingRomSetsError, Mode=OneWay}">
<Image.Source>
<svg:SvgImage Source="/Assets/emblem-error.svg" />
</Image.Source>
</Image>
<Image MaxWidth="24"
MaxHeight="24"
IsVisible="{Binding LoadingRomSetsUnknown, Mode=OneWay}">
<Image.Source>
<svg:SvgImage Source="/Assets/emblem-question.svg" />
</Image.Source>
</Image>
<TextBlock Text="{x:Static resources:Localization.LoadingRomSetsText}"
VerticalAlignment="Center" />
</StackPanel>
<Button Command="{Binding ExitCommand}"
IsVisible="{Binding ExitVisible}"
HorizontalAlignment="Right">
<TextBlock Text="{x:Static resources:Localization.ExitButtonText}" />
</Button>
</StackPanel>
</Window>