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

103 lines
5.2 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"
xmlns:cc="using:SPTInstaller.CustomControls"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="SPTInstaller.Views.PreChecksView">
<!-- main UI grid -->
<Grid RowDefinitions="10, *, 10, Auto, 10" ColumnDefinitions="10, *, Auto, 10">
<!-- info card -->
<Border Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" BoxShadow="1 1 10 0 black" CornerRadius="15">
<!-- main information grid -->
<Grid RowDefinitions="10, Auto, *, Auto, 10" ColumnDefinitions="10, 2*, Auto,*, 10">
<Label Grid.Row="1" Grid.Column="1" HorizontalAlignment="Center"
Content="Details" FontSize="20"
/>
<!-- selected precheck details grid -->
<cc:PreCheckDetails Grid.Row="2" Grid.Column="1"
PreChecks="{Binding PreChecks}"
SelectedIndex="{Binding SelectedPreCheckIndex}"
/>
<!-- info card vertical separator -->
<Rectangle Grid.Row="1" Grid.RowSpan="2" Grid.Column="2" VerticalAlignment="Stretch"
Fill="black" Width="1" Margin="10 0"
/>
<!-- precheck list -->
<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>
<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>
<!-- cache info -->
<cc:CacheInfo Grid.Row="2" Grid.Column="3" Padding="10"
VerticalAlignment="Bottom" HorizontalAlignment="Left"
InfoText="{Binding CacheInfoText}" State="{Binding CacheCheckState}"
/>
</Grid>
</Border>
<!-- Install path info -->
<StackPanel Grid.Row="3" Grid.Column="1" >
<Label Content="Install Path" FontSize="20" />
<TextBlock TextWrapping="Wrap" Margin="3 0"
Text="{Binding InstallPath}"
Foreground="DodgerBlue" FontWeight="SemiBold"
/>
</StackPanel>
<!-- Start install button -->
<Button Grid.Column="2" Grid.Row="3" Padding="20 10"
FontSize="15" FontWeight="SemiBold"
Classes="yellow"
IsEnabled="{Binding AllowInstall}"
Command="{Binding StartInstallCommand}"
CornerRadius="15"
>
2023-10-18 20:43:23 -04:00
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding InstallButtonText}" VerticalAlignment="Center" Foreground="Black"/>
<cc:StatusSpinner State="{Binding InstallButtonCheckState}" Margin="2" IsVisible="{Binding !AllowInstall}"/>
</StackPanel>
</Button>
2024-03-24 21:44:14 -04:00
<cc:UpdateInfoCard Grid.Row="1" Grid.RowSpan="5" Grid.ColumnSpan="5" Padding="10"
VerticalAlignment="Center" HorizontalAlignment="Center"
InfoText="{Binding UpdateInfo.UpdateInfoText}"
ShowUpdateCard="{Binding UpdateInfo.ShowCard}"
NotNowCommand="{Binding DismissUpdateCommand}"
UpdateInstallerCommand="{Binding UpdateInstallerCommand}"
Updating="{Binding UpdateInfo.Updating}"
DownloadProgress="{Binding UpdateInfo.DownloadProgress}"
IndeterminateProgress="{Binding UpdateInfo.CheckingForUpdates}"
UpdateAvailable="{Binding UpdateInfo.UpdateAvailable}"
/>
</Grid>
2023-05-11 23:11:39 -04:00
</UserControl>