SPT-AKI-Installer/SPTInstaller/Views/PreChecksView.axaml

98 lines
5.0 KiB
Plaintext
Raw Normal View History

<UserControl xmlns="https://github.com/avaloniaui"
2023-05-11 23:11:39 -04:00
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"
2024-05-01 10:31:55 -04:00
xmlns:cc="using:SPTInstaller.CustomControls"
2023-05-11 23:11:39 -04:00
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="SPTInstaller.Views.PreChecksView">
2024-05-01 10:31:55 -04:00
<!-- main UI grid -->
<Grid RowDefinitions="10, *, 10, Auto, 10" ColumnDefinitions="10, *, Auto, 10">
2024-05-01 10:31:55 -04:00
<!-- info card -->
<Border Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" BoxShadow="1 1 10 0 black" CornerRadius="15">
2024-05-01 10:31:55 -04:00
<!-- main information grid -->
<Grid RowDefinitions="10, Auto, *, Auto, 10" ColumnDefinitions="10, 2*, Auto,*, 10">
2024-05-01 10:31:55 -04:00
<Label Grid.Row="1" Grid.Column="1" HorizontalAlignment="Center"
Content="Details" FontSize="20" />
<!-- selected precheck details grid -->
2024-05-01 10:31:55 -04:00
<cc:PreCheckDetails Grid.Row="2" Grid.Column="1"
PreChecks="{Binding PreChecks}"
2024-05-01 10:31:55 -04:00
HasSelection="{Binding HasPreCheckSelected}" />
<!-- info card vertical separator -->
<Rectangle Grid.Row="1" Grid.RowSpan="2" Grid.Column="2" VerticalAlignment="Stretch"
2024-05-01 10:31:55 -04:00
Fill="black" Width="1" Margin="10 0" />
<!-- precheck list -->
2024-05-01 10:31:55 -04:00
<Label Grid.Row="1" Grid.Column="3" HorizontalAlignment="Center"
Content="Pre-Checks" FontSize="20" />
<ItemsControl ItemsSource="{Binding PreChecks}" Grid.Row="2" Grid.Column="3">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Spacing="5" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
2024-05-01 10:31:55 -04:00
<cc:PreCheckItem PreCheckName="{Binding Name}"
IsRequired="{Binding IsRequired}"
IsSelected="{Binding IsSelected}"
State="{Binding State}"
SelectCommand="{Binding $parent[ItemsControl].DataContext.SelectPreCheckCommand}"
HorizontalAlignment="Stretch" />
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
2024-05-01 10:31:55 -04:00
<!-- cache info -->
<cc:CacheInfo Grid.Row="2" Grid.Column="3" Padding="10"
VerticalAlignment="Bottom" HorizontalAlignment="Left"
2024-05-01 10:31:55 -04:00
InfoText="{Binding CacheInfoText}" State="{Binding CacheCheckState}" />
</Grid>
</Border>
2024-05-01 10:31:55 -04:00
<!-- Install path info -->
2024-05-01 10:31:55 -04:00
<StackPanel Grid.Row="3" Grid.Column="1">
<Label Content="Install Path" FontSize="20" />
2024-05-01 10:31:55 -04:00
<TextBlock TextWrapping="Wrap" Margin="3 0"
Text="{Binding InstallPath}"
2024-05-01 10:31:55 -04:00
Foreground="DodgerBlue" FontWeight="SemiBold" />
</StackPanel>
2024-05-01 10:31:55 -04:00
<!-- Start install button -->
<Button Grid.Column="2" Grid.Row="3" Padding="20 10"
2024-03-27 09:26:11 -04:00
IsVisible="{Binding !UpdateInfo.Show}"
IsEnabled="{Binding AllowInstall}"
FontSize="15" FontWeight="SemiBold"
Classes="yellow"
Command="{Binding StartInstallCommand}"
2024-05-01 10:31:55 -04:00
CornerRadius="15">
2023-10-18 20:43:23 -04:00
<StackPanel Orientation="Horizontal">
2024-05-01 10:31:55 -04:00
<TextBlock Text="{Binding InstallButtonText}" VerticalAlignment="Center" Foreground="Black" />
<cc:StatusSpinner State="{Binding InstallButtonCheckState}" Margin="2"
IsVisible="{Binding !AllowInstall}" />
2023-10-18 20:43:23 -04:00
</StackPanel>
</Button>
2024-05-01 10:31:55 -04:00
2024-03-26 16:11:14 -04:00
<!-- Update installer button -->
2024-03-27 09:26:11 -04:00
<cc:UpdateButton Grid.Column="2" Grid.Row="3"
IsVisible="{Binding UpdateInfo.Show}"
IsEnabled="{Binding UpdateInfo.Show}"
IsIndeterminate="{Binding UpdateInfo.CheckingForUpdates}"
InfoText="{Binding UpdateInfo.UpdateInfoText}"
Updating="{Binding UpdateInfo.Updating}"
DismissCommand="{Binding DismissUpdateCommand}"
UpdateCommand="{Binding UpdateInstallerCommand}"
2024-05-01 12:00:30 -04:00
WhatsNewCommand="{Binding WhatsNewCommand}"
2024-03-27 09:26:11 -04:00
DownloadProgress="{Binding UpdateInfo.DownloadProgress}"
UpdateAvailable="{Binding UpdateInfo.UpdateAvailable}"
2024-05-01 10:31:55 -04:00
CheckingForUpdate="{Binding UpdateInfo.CheckingForUpdates}" />
</Grid>
2024-05-01 10:31:55 -04:00
</UserControl>