|
|
@ -1,17 +1,17 @@ |
|
|
|
<Page |
|
|
|
<Page |
|
|
|
|
|
|
|
Background="{DynamicResource ApplicationBackgroundBrush}" |
|
|
|
|
|
|
|
Foreground="{DynamicResource TextFillColorPrimaryBrush}" |
|
|
|
|
|
|
|
Loaded="InstallPage_OnLoaded" |
|
|
|
|
|
|
|
d:DesignHeight="450" |
|
|
|
|
|
|
|
d:DesignWidth="700" |
|
|
|
|
|
|
|
mc:Ignorable="d" |
|
|
|
x:Class="StabilityMatrix.PackageManagerPage" |
|
|
|
x:Class="StabilityMatrix.PackageManagerPage" |
|
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|
|
|
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:d="http://schemas.microsoft.com/expression/blend/2008" |
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
|
|
|
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml" |
|
|
|
|
|
|
|
xmlns:models="clr-namespace:StabilityMatrix.Models" |
|
|
|
xmlns:models="clr-namespace:StabilityMatrix.Models" |
|
|
|
d:DesignHeight="450" |
|
|
|
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml" |
|
|
|
d:DesignWidth="700" |
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> |
|
|
|
Loaded="InstallPage_OnLoaded" |
|
|
|
|
|
|
|
Background="{DynamicResource ApplicationBackgroundBrush}" |
|
|
|
|
|
|
|
Foreground="{DynamicResource TextFillColorPrimaryBrush}" |
|
|
|
|
|
|
|
mc:Ignorable="d"> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<Grid Margin="16"> |
|
|
|
<Grid Margin="16"> |
|
|
|
<Grid.RowDefinitions> |
|
|
|
<Grid.RowDefinitions> |
|
|
@ -19,37 +19,50 @@ |
|
|
|
<RowDefinition Height="*" /> |
|
|
|
<RowDefinition Height="*" /> |
|
|
|
</Grid.RowDefinitions> |
|
|
|
</Grid.RowDefinitions> |
|
|
|
|
|
|
|
|
|
|
|
<StackPanel Grid.Row="0" Orientation="Vertical" |
|
|
|
<StackPanel |
|
|
|
|
|
|
|
Grid.Row="0" |
|
|
|
|
|
|
|
Orientation="Vertical" |
|
|
|
Visibility="{Binding ProgressBarVisibility, FallbackValue=Visible}"> |
|
|
|
Visibility="{Binding ProgressBarVisibility, FallbackValue=Visible}"> |
|
|
|
|
|
|
|
|
|
|
|
<ProgressBar Value="{Binding ProgressValue, FallbackValue=10}" |
|
|
|
<ProgressBar |
|
|
|
IsIndeterminate="{Binding IsIndeterminate, FallbackValue=False}" |
|
|
|
IsIndeterminate="{Binding IsIndeterminate, FallbackValue=False}" |
|
|
|
Maximum="100" Width="500" /> |
|
|
|
Maximum="100" |
|
|
|
<TextBlock Text="{Binding ProgressText, FallbackValue=Installing...}" |
|
|
|
Value="{Binding ProgressValue, FallbackValue=10}" |
|
|
|
HorizontalAlignment="Center" Padding="8" /> |
|
|
|
Width="500" /> |
|
|
|
|
|
|
|
<TextBlock |
|
|
|
|
|
|
|
HorizontalAlignment="Center" |
|
|
|
|
|
|
|
Padding="8" |
|
|
|
|
|
|
|
Text="{Binding ProgressText, FallbackValue=Installing...}" /> |
|
|
|
</StackPanel> |
|
|
|
</StackPanel> |
|
|
|
|
|
|
|
|
|
|
|
<StackPanel Grid.Row="1" Orientation="Horizontal" |
|
|
|
<StackPanel |
|
|
|
Margin="16" HorizontalAlignment="Left"> |
|
|
|
Grid.Row="1" |
|
|
|
|
|
|
|
HorizontalAlignment="Left" |
|
|
|
|
|
|
|
Margin="16" |
|
|
|
|
|
|
|
Orientation="Horizontal"> |
|
|
|
<StackPanel Orientation="Vertical"> |
|
|
|
<StackPanel Orientation="Vertical"> |
|
|
|
<ui:Button Command="{Binding ShowInstallWindowCommand}" |
|
|
|
<ui:Button |
|
|
|
IsEnabled="{Binding InstallButtonEnabled, FallbackValue=true}" |
|
|
|
Background="Green" |
|
|
|
|
|
|
|
Command="{Binding ShowInstallWindowCommand}" |
|
|
|
|
|
|
|
Foreground="{ui:ThemeResource TextFillColorPrimaryBrush}" |
|
|
|
Height="40" |
|
|
|
Height="40" |
|
|
|
HorizontalAlignment="Stretch" |
|
|
|
HorizontalAlignment="Stretch" |
|
|
|
Foreground="{ui:ThemeResource TextFillColorPrimaryBrush}" |
|
|
|
IsEnabled="{Binding InstallButtonEnabled, FallbackValue=true}" |
|
|
|
Margin="0,0,0,16" |
|
|
|
Margin="0,0,0,16" |
|
|
|
VerticalContentAlignment="Center" |
|
|
|
VerticalContentAlignment="Center"> |
|
|
|
Background="Green"> |
|
|
|
|
|
|
|
<StackPanel Orientation="Horizontal"> |
|
|
|
<StackPanel Orientation="Horizontal"> |
|
|
|
<ui:SymbolIcon Symbol="Add24" /> |
|
|
|
<ui:SymbolIcon Symbol="Add24" /> |
|
|
|
<Label Margin="8,4,0,0" |
|
|
|
<Label |
|
|
|
Content="Add Package" VerticalContentAlignment="Center" /> |
|
|
|
Content="Add Package" |
|
|
|
|
|
|
|
Margin="8,4,0,0" |
|
|
|
|
|
|
|
VerticalContentAlignment="Center" /> |
|
|
|
</StackPanel> |
|
|
|
</StackPanel> |
|
|
|
</ui:Button> |
|
|
|
</ui:Button> |
|
|
|
|
|
|
|
|
|
|
|
<ListView ItemsSource="{Binding Packages}" |
|
|
|
<ListView |
|
|
|
Visibility="{Binding InstallButtonVisibility, FallbackValue=Visible}" |
|
|
|
ItemsSource="{Binding Packages}" |
|
|
|
SelectedItem="{Binding SelectedPackage, Mode=TwoWay}"> |
|
|
|
SelectedItem="{Binding SelectedPackage, Mode=TwoWay}" |
|
|
|
|
|
|
|
Visibility="{Binding InstallButtonVisibility, FallbackValue=Visible}"> |
|
|
|
|
|
|
|
|
|
|
|
<ListView.Style> |
|
|
|
<ListView.Style> |
|
|
|
<Style TargetType="ListView"> |
|
|
|
<Style TargetType="ListView"> |
|
|
@ -59,8 +72,10 @@ |
|
|
|
|
|
|
|
|
|
|
|
<ListView.Template> |
|
|
|
<ListView.Template> |
|
|
|
<ControlTemplate> |
|
|
|
<ControlTemplate> |
|
|
|
<Border CornerRadius="5" BorderThickness="1" |
|
|
|
<Border |
|
|
|
BorderBrush="{ui:ThemeResource KeyboardFocusBorderColorBrush}"> |
|
|
|
BorderBrush="{ui:ThemeResource KeyboardFocusBorderColorBrush}" |
|
|
|
|
|
|
|
BorderThickness="1" |
|
|
|
|
|
|
|
CornerRadius="5"> |
|
|
|
<ItemsPresenter /> |
|
|
|
<ItemsPresenter /> |
|
|
|
</Border> |
|
|
|
</Border> |
|
|
|
</ControlTemplate> |
|
|
|
</ControlTemplate> |
|
|
@ -68,39 +83,47 @@ |
|
|
|
|
|
|
|
|
|
|
|
<ListView.ItemTemplate> |
|
|
|
<ListView.ItemTemplate> |
|
|
|
<DataTemplate DataType="{x:Type models:InstalledPackage}"> |
|
|
|
<DataTemplate DataType="{x:Type models:InstalledPackage}"> |
|
|
|
<StackPanel VerticalAlignment="Top" Margin="8"> |
|
|
|
<StackPanel Margin="8" VerticalAlignment="Top"> |
|
|
|
<TextBlock Text="{Binding Name}" Margin="0,5,0,5" /> |
|
|
|
<TextBlock Margin="0,5,0,5" Text="{Binding DisplayName}" /> |
|
|
|
<TextBlock Text="{Binding PackageVersion}" Margin="0,0,0,5" /> |
|
|
|
<TextBlock Margin="0,0,0,5" Text="{Binding PackageVersion}" /> |
|
|
|
</StackPanel> |
|
|
|
</StackPanel> |
|
|
|
</DataTemplate> |
|
|
|
</DataTemplate> |
|
|
|
</ListView.ItemTemplate> |
|
|
|
</ListView.ItemTemplate> |
|
|
|
</ListView> |
|
|
|
</ListView> |
|
|
|
</StackPanel> |
|
|
|
</StackPanel> |
|
|
|
|
|
|
|
|
|
|
|
<StackPanel Orientation="Vertical" Margin="32,0,0,0"> |
|
|
|
<StackPanel Margin="32,0,0,0" Orientation="Vertical"> |
|
|
|
<TextBlock Text="{Binding SelectedPackage.Name, FallbackValue=Stable Diffusion Web UI}" |
|
|
|
<TextBlock |
|
|
|
FontSize="24" FontWeight="Bold" /> |
|
|
|
FontSize="24" |
|
|
|
|
|
|
|
FontWeight="Bold" |
|
|
|
|
|
|
|
Text="{Binding SelectedPackage.Name, FallbackValue=Stable Diffusion Web UI}" /> |
|
|
|
<TextBlock FontSize="12" Margin="0,5,0,5"> |
|
|
|
<TextBlock FontSize="12" Margin="0,5,0,5"> |
|
|
|
<Run Text="{Binding SelectedPackage.PackageName, FallbackValue=stable-diffusion-webui}" /> |
|
|
|
<Run Text="{Binding SelectedPackage.PackageName, FallbackValue=stable-diffusion-webui}" /> |
|
|
|
<Run Text="{Binding SelectedPackage.PackageVersion, FallbackValue=v1.3.37}" /> |
|
|
|
<Run Text="{Binding SelectedPackage.PackageVersion, FallbackValue=v1.3.37}" /> |
|
|
|
</TextBlock> |
|
|
|
</TextBlock> |
|
|
|
<TextBlock Text="{Binding SelectedPackage.Path, FallbackValue=C:\Users\Example\Downloads}" |
|
|
|
<TextBlock |
|
|
|
FontSize="12" Margin="0,5, 0, 5" /> |
|
|
|
FontSize="12" |
|
|
|
<StackPanel Orientation="Horizontal" Margin="0,16,0,0"> |
|
|
|
Margin="0,5,0,5" |
|
|
|
<ui:Button Content="{Binding InstallButtonText, FallbackValue=Install}" |
|
|
|
Text="{Binding SelectedPackage.Path, FallbackValue=C:\Users\Example\Downloads}" /> |
|
|
|
|
|
|
|
<StackPanel Margin="0,16,0,0" Orientation="Horizontal"> |
|
|
|
|
|
|
|
<ui:Button |
|
|
|
|
|
|
|
Background="Green" |
|
|
|
Command="{Binding InstallCommand}" |
|
|
|
Command="{Binding InstallCommand}" |
|
|
|
Visibility="{Binding InstallButtonVisibility, FallbackValue=Visible}" |
|
|
|
Content="{Binding InstallButtonText, FallbackValue=Install}" |
|
|
|
|
|
|
|
Height="50" |
|
|
|
IsEnabled="{Binding InstallButtonEnabled, FallbackValue=true}" |
|
|
|
IsEnabled="{Binding InstallButtonEnabled, FallbackValue=true}" |
|
|
|
Width="100" Height="50" |
|
|
|
VerticalAlignment="Top" |
|
|
|
Background="Green" |
|
|
|
|
|
|
|
VerticalAlignment="Top" /> |
|
|
|
|
|
|
|
<ui:Button Content="Uninstall" |
|
|
|
|
|
|
|
Command="{Binding UninstallCommand}" |
|
|
|
|
|
|
|
Visibility="{Binding InstallButtonVisibility, FallbackValue=Visible}" |
|
|
|
Visibility="{Binding InstallButtonVisibility, FallbackValue=Visible}" |
|
|
|
Width="100" Height="50" |
|
|
|
Width="100" /> |
|
|
|
|
|
|
|
<ui:Button |
|
|
|
Background="DarkRed" |
|
|
|
Background="DarkRed" |
|
|
|
|
|
|
|
Command="{Binding UninstallCommand}" |
|
|
|
|
|
|
|
Content="Uninstall" |
|
|
|
|
|
|
|
Height="50" |
|
|
|
Margin="16,0,0,0" |
|
|
|
Margin="16,0,0,0" |
|
|
|
VerticalAlignment="Top" /> |
|
|
|
VerticalAlignment="Top" |
|
|
|
|
|
|
|
Visibility="{Binding InstallButtonVisibility, FallbackValue=Visible}" |
|
|
|
|
|
|
|
Width="100" /> |
|
|
|
</StackPanel> |
|
|
|
</StackPanel> |
|
|
|
</StackPanel> |
|
|
|
</StackPanel> |
|
|
|
</StackPanel> |
|
|
|
</StackPanel> |
|
|
|