|
|
|
@ -12,7 +12,8 @@
|
|
|
|
|
xmlns:system="clr-namespace:System;assembly=System.Runtime" |
|
|
|
|
xmlns:converters="clr-namespace:StabilityMatrix.Avalonia.Converters" |
|
|
|
|
xmlns:avalonia="clr-namespace:SpacedGridControl.Avalonia;assembly=SpacedGridControl.Avalonia" |
|
|
|
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" |
|
|
|
|
xmlns:markupExtensions="clr-namespace:StabilityMatrix.Avalonia.MarkupExtensions" |
|
|
|
|
mc:Ignorable="d" d:DesignWidth="1000" d:DesignHeight="450" |
|
|
|
|
x:DataType="viewModels:PackageManagerViewModel" |
|
|
|
|
x:CompileBindings="True" |
|
|
|
|
d:DataContext="{x:Static designData:DesignData.PackageManagerViewModel}" |
|
|
|
@ -32,6 +33,7 @@
|
|
|
|
|
<ItemsRepeater.ItemTemplate> |
|
|
|
|
<DataTemplate DataType="{x:Type packageManager:PackageCardViewModel}"> |
|
|
|
|
<controls:Card Padding="8" |
|
|
|
|
MinWidth="400" |
|
|
|
|
CornerRadius="8"> |
|
|
|
|
<controls:Card.Background> |
|
|
|
|
<MultiBinding Converter="{StaticResource BoolChoiceMultiConverter}"> |
|
|
|
@ -40,15 +42,55 @@
|
|
|
|
|
<DynamicResource ResourceKey="ButtonBackground" /> |
|
|
|
|
</MultiBinding> |
|
|
|
|
</controls:Card.Background> |
|
|
|
|
<Grid RowDefinitions="Auto, Auto, Auto, Auto" |
|
|
|
|
ColumnDefinitions="*,Auto"> |
|
|
|
|
|
|
|
|
|
<TextBlock Grid.Row="0" |
|
|
|
|
<Grid ColumnDefinitions="Auto, *"> |
|
|
|
|
<controls:BetterAdvancedImage |
|
|
|
|
Grid.Column="0" |
|
|
|
|
Height="150" |
|
|
|
|
Width="150" |
|
|
|
|
Margin="4, 8" |
|
|
|
|
CornerRadius="8" |
|
|
|
|
HorizontalAlignment="Center" |
|
|
|
|
VerticalContentAlignment="Top" |
|
|
|
|
HorizontalContentAlignment="Center" |
|
|
|
|
Source="{Binding CardImageSource}" |
|
|
|
|
IsVisible="{Binding !IsUnknownPackage}" |
|
|
|
|
Stretch="UniformToFill" /> |
|
|
|
|
<Border |
|
|
|
|
Grid.Column="0" |
|
|
|
|
ToolTip.Tip="{Binding Package.DisplayName, FallbackValue=''}" |
|
|
|
|
Text="{Binding Package.DisplayName, FallbackValue=''}" |
|
|
|
|
TextTrimming="WordEllipsis" |
|
|
|
|
TextAlignment="Left" /> |
|
|
|
|
Height="150" |
|
|
|
|
Width="150" |
|
|
|
|
Margin="4, 8" |
|
|
|
|
CornerRadius="8" |
|
|
|
|
HorizontalAlignment="Center" |
|
|
|
|
IsVisible="{Binding IsUnknownPackage}" |
|
|
|
|
Background="#202020"> |
|
|
|
|
<TextBlock |
|
|
|
|
TextAlignment="Center" |
|
|
|
|
VerticalAlignment="Center" |
|
|
|
|
FontSize="18" |
|
|
|
|
TextWrapping="Wrap" |
|
|
|
|
Text="{x:Static lang:Resources.Label_UnknownPackage}" /> |
|
|
|
|
</Border> |
|
|
|
|
<Grid Grid.Column="1" RowDefinitions="Auto, Auto, Auto, *" |
|
|
|
|
ColumnDefinitions="Auto, *"> |
|
|
|
|
<TextBlock Grid.Column="0" |
|
|
|
|
Grid.Row="0" |
|
|
|
|
Text="{Binding Package.DisplayName}" |
|
|
|
|
Margin="8,0,8,0" |
|
|
|
|
FontWeight="SemiBold" |
|
|
|
|
MaxWidth="200" |
|
|
|
|
TextWrapping="NoWrap" |
|
|
|
|
TextTrimming="CharacterEllipsis" |
|
|
|
|
ToolTip.Tip="{Binding Package.DisplayName}" |
|
|
|
|
FontSize="16" /> |
|
|
|
|
<TextBlock Grid.Column="0" |
|
|
|
|
Grid.Row="1" |
|
|
|
|
FontSize="13" |
|
|
|
|
Foreground="{DynamicResource TextControlPlaceholderForeground}" |
|
|
|
|
Margin="8,0,8,0" |
|
|
|
|
VerticalAlignment="Center" |
|
|
|
|
Text="{Binding InstalledVersion}" /> |
|
|
|
|
|
|
|
|
|
<Button |
|
|
|
|
Grid.Row="0" |
|
|
|
|
Grid.Column="1" |
|
|
|
@ -56,7 +98,7 @@
|
|
|
|
|
HorizontalAlignment="Right" |
|
|
|
|
VerticalContentAlignment="Top" |
|
|
|
|
VerticalAlignment="Top" |
|
|
|
|
Padding="4,1" |
|
|
|
|
Padding="4" |
|
|
|
|
Margin="4,0,0,0" |
|
|
|
|
Classes="transparent" |
|
|
|
|
Width="24" |
|
|
|
@ -111,7 +153,8 @@
|
|
|
|
|
|
|
|
|
|
<Separator IsVisible="{Binding CanUseSharedOutput}" /> |
|
|
|
|
|
|
|
|
|
<MenuItem Header="{x:Static lang:Resources.Label_SharedModelStrategyShort}" |
|
|
|
|
<MenuItem |
|
|
|
|
Header="{x:Static lang:Resources.Label_SharedModelStrategyShort}" |
|
|
|
|
IsVisible="{Binding !IsUnknownPackage}"> |
|
|
|
|
<MenuItem.Icon> |
|
|
|
|
<ui:SymbolIcon Symbol="FolderLink" /> |
|
|
|
@ -186,82 +229,68 @@
|
|
|
|
|
</Button.Flyout> |
|
|
|
|
</Button> |
|
|
|
|
|
|
|
|
|
<TextBlock Grid.Row="1" |
|
|
|
|
Grid.Column="0" |
|
|
|
|
Grid.ColumnSpan="2" |
|
|
|
|
Margin="2,0,0,0" |
|
|
|
|
VerticalAlignment="Center" |
|
|
|
|
Text="{Binding InstalledVersion}" /> |
|
|
|
|
|
|
|
|
|
<Border Grid.Row="2" |
|
|
|
|
<StackPanel Grid.Row="2" |
|
|
|
|
Grid.Column="0" |
|
|
|
|
Grid.ColumnSpan="2" |
|
|
|
|
Margin="0,8" |
|
|
|
|
Background="#AA000000" |
|
|
|
|
IsVisible="{Binding IsRunning}" |
|
|
|
|
CornerRadius="4" |
|
|
|
|
ZIndex="1"> |
|
|
|
|
<Button Classes="danger" |
|
|
|
|
FontSize="16" |
|
|
|
|
MinWidth="100" |
|
|
|
|
MinHeight="40" |
|
|
|
|
Command="{Binding StopCommand}" |
|
|
|
|
HorizontalAlignment="Center" |
|
|
|
|
HorizontalContentAlignment="Center"> |
|
|
|
|
<StackPanel Orientation="Horizontal"> |
|
|
|
|
<icons:Icon Value="fa-solid fa-stop" |
|
|
|
|
FontSize="20" |
|
|
|
|
Margin="0,0,8,0"/> |
|
|
|
|
<TextBlock Text="{x:Static lang:Resources.Action_Stop}"/> |
|
|
|
|
</StackPanel> |
|
|
|
|
Margin="0,4,0,0" |
|
|
|
|
Orientation="Horizontal"> |
|
|
|
|
<Button Classes="transparent-full" |
|
|
|
|
Margin="4,4,0,0" |
|
|
|
|
Padding="4" |
|
|
|
|
ToolTip.Tip="{x:Static lang:Resources.Action_CheckForUpdates}" |
|
|
|
|
Command="{Binding OnLoadedAsync}" |
|
|
|
|
> |
|
|
|
|
<Button.IsVisible> |
|
|
|
|
<MultiBinding Converter="{x:Static BoolConverters.And}"> |
|
|
|
|
<Binding Path="!IsUnknownPackage" /> |
|
|
|
|
<Binding Path="!IsUpdateAvailable" /> |
|
|
|
|
</MultiBinding> |
|
|
|
|
</Button.IsVisible> |
|
|
|
|
<ui:SymbolIcon Symbol="Refresh" |
|
|
|
|
FontSize="20"/> |
|
|
|
|
</Button> |
|
|
|
|
</Border> |
|
|
|
|
|
|
|
|
|
<!-- Normal packages shows image --> |
|
|
|
|
<controls:BetterAdvancedImage |
|
|
|
|
Grid.Row="2" |
|
|
|
|
Grid.Column="0" |
|
|
|
|
Grid.ColumnSpan="2" |
|
|
|
|
Margin="0,8,0,8" |
|
|
|
|
Height="180" |
|
|
|
|
Width="225" |
|
|
|
|
CornerRadius="4" |
|
|
|
|
HorizontalAlignment="Center" |
|
|
|
|
VerticalContentAlignment="Top" |
|
|
|
|
HorizontalContentAlignment="Center" |
|
|
|
|
Source="{Binding CardImageSource}" |
|
|
|
|
<Button Classes="transparent-full" |
|
|
|
|
Margin="4,4,0,0" |
|
|
|
|
Padding="4" |
|
|
|
|
IsEnabled="{Binding !IsRunning}" |
|
|
|
|
ToolTip.Tip="{x:Static lang:Resources.Label_UpdateAvailable}" |
|
|
|
|
markupExtensions:ShowDisabledTooltipExtension.ShowOnDisabled="True" |
|
|
|
|
Command="{Binding Update}"> |
|
|
|
|
<Button.IsVisible> |
|
|
|
|
<MultiBinding Converter="{x:Static BoolConverters.And}"> |
|
|
|
|
<Binding Path="!IsUnknownPackage" /> |
|
|
|
|
<Binding Path="IsUpdateAvailable" /> |
|
|
|
|
</MultiBinding> |
|
|
|
|
</Button.IsVisible> |
|
|
|
|
<ui:SymbolIcon Symbol="CloudDownload" |
|
|
|
|
IsEnabled="{Binding !IsRunning}" |
|
|
|
|
FontSize="24"> |
|
|
|
|
<ui:SymbolIcon.Styles> |
|
|
|
|
<Style Selector="ui|SymbolIcon"> |
|
|
|
|
<Setter Property="Foreground" Value="Lime" /> |
|
|
|
|
</Style> |
|
|
|
|
<Style Selector="ui|SymbolIcon:disabled"> |
|
|
|
|
<Setter Property="Foreground" Value="Gray" /> |
|
|
|
|
</Style> |
|
|
|
|
</ui:SymbolIcon.Styles> |
|
|
|
|
</ui:SymbolIcon> |
|
|
|
|
</Button> |
|
|
|
|
<Button Classes="transparent-full" |
|
|
|
|
Margin="4,4,0,0" |
|
|
|
|
Padding="4" |
|
|
|
|
ToolTip.Tip="Launch Options" |
|
|
|
|
IsVisible="{Binding !IsUnknownPackage}" |
|
|
|
|
Stretch="UniformToFill" /> |
|
|
|
|
|
|
|
|
|
<!-- Unknown packages panel --> |
|
|
|
|
<Border |
|
|
|
|
Grid.Row="2" |
|
|
|
|
Grid.Column="0" |
|
|
|
|
Command="{Binding ShowLaunchOptionsCommand}"> |
|
|
|
|
<ui:SymbolIcon Symbol="SettingsFilled" |
|
|
|
|
FontSize="20"/> |
|
|
|
|
</Button> |
|
|
|
|
</StackPanel> |
|
|
|
|
<UniformGrid Grid.Column="0" |
|
|
|
|
Grid.ColumnSpan="2" |
|
|
|
|
Margin="0,8,0,8" |
|
|
|
|
Height="180" |
|
|
|
|
Width="225" |
|
|
|
|
CornerRadius="4" |
|
|
|
|
HorizontalAlignment="Center" |
|
|
|
|
IsVisible="{Binding IsUnknownPackage}" |
|
|
|
|
Background="#202020"> |
|
|
|
|
<TextBlock |
|
|
|
|
TextAlignment="Center" |
|
|
|
|
VerticalAlignment="Center" |
|
|
|
|
FontSize="18" |
|
|
|
|
TextWrapping="Wrap" |
|
|
|
|
Text="{x:Static lang:Resources.Label_UnknownPackage}" /> |
|
|
|
|
</Border> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<Grid |
|
|
|
|
Grid.Row="3" |
|
|
|
|
Grid.Column="0" |
|
|
|
|
Grid.ColumnSpan="2" |
|
|
|
|
IsVisible="{Binding !IsUnknownPackage}" |
|
|
|
|
ColumnDefinitions="*,Auto"> |
|
|
|
|
<!-- Launch and update buttons --> |
|
|
|
|
<Button Grid.Column="0" Classes="accent" |
|
|
|
|
VerticalAlignment="Bottom" |
|
|
|
|
Margin="8,8,8,0"> |
|
|
|
|
<Button Classes="accent" |
|
|
|
|
VerticalAlignment="Bottom" |
|
|
|
|
HorizontalAlignment="Stretch" |
|
|
|
|
Command="{Binding Launch}"> |
|
|
|
@ -278,25 +307,34 @@
|
|
|
|
|
<TextBlock Text="{x:Static lang:Resources.Action_Launch}" /> |
|
|
|
|
</StackPanel> |
|
|
|
|
</Button> |
|
|
|
|
<Button Grid.Column="1" Classes="accent" |
|
|
|
|
<Button Classes="borderless-danger" |
|
|
|
|
VerticalAlignment="Bottom" |
|
|
|
|
HorizontalAlignment="Stretch" |
|
|
|
|
Command="{Binding Update}"> |
|
|
|
|
<Button.IsVisible> |
|
|
|
|
<MultiBinding Converter="{x:Static BoolConverters.And}"> |
|
|
|
|
<Binding Path="IsUpdateAvailable" /> |
|
|
|
|
<Binding Path="!IsRunning" /> |
|
|
|
|
</MultiBinding> |
|
|
|
|
</Button.IsVisible> |
|
|
|
|
IsVisible="{Binding IsRunning}" |
|
|
|
|
Command="{Binding StopCommand}"> |
|
|
|
|
<StackPanel Orientation="Horizontal" |
|
|
|
|
Margin="10,2"> |
|
|
|
|
<icons:Icon Value="fa-solid fa-download" |
|
|
|
|
Margin="0,2"> |
|
|
|
|
<icons:Icon Value="fa-solid fa-stop" |
|
|
|
|
Margin="0,0,8,0" |
|
|
|
|
FontSize="14" /> |
|
|
|
|
<TextBlock Text="{x:Static lang:Resources.Action_Update}" /> |
|
|
|
|
<TextBlock Text="{x:Static lang:Resources.Action_Stop}" /> |
|
|
|
|
</StackPanel> |
|
|
|
|
</Button> |
|
|
|
|
<Button Grid.Column="0" Classes="accent" |
|
|
|
|
<Button Classes="borderless-info" |
|
|
|
|
BorderBrush="Transparent" |
|
|
|
|
VerticalAlignment="Bottom" |
|
|
|
|
HorizontalAlignment="Stretch" |
|
|
|
|
IsVisible="{Binding IsRunning}" |
|
|
|
|
Command="{Binding RestartCommand}"> |
|
|
|
|
<StackPanel Orientation="Horizontal" |
|
|
|
|
Margin="0,2"> |
|
|
|
|
<icons:Icon Value="fa-solid fa-arrow-rotate-left" |
|
|
|
|
Margin="0,0,8,0" |
|
|
|
|
FontSize="14" /> |
|
|
|
|
<TextBlock Text="{x:Static lang:Resources.Action_Restart}" /> |
|
|
|
|
</StackPanel> |
|
|
|
|
</Button> |
|
|
|
|
<Button Classes="accent" |
|
|
|
|
VerticalAlignment="Bottom" |
|
|
|
|
HorizontalAlignment="Stretch" |
|
|
|
|
IsVisible="{Binding IsRunning}" |
|
|
|
@ -309,7 +347,7 @@
|
|
|
|
|
<TextBlock Text="Console" /> |
|
|
|
|
</StackPanel> |
|
|
|
|
</Button> |
|
|
|
|
<Button Grid.Column="1" Classes="accent" |
|
|
|
|
<Button Classes="accent" |
|
|
|
|
VerticalAlignment="Bottom" |
|
|
|
|
HorizontalAlignment="Stretch" |
|
|
|
|
IsVisible="{Binding ShowWebUiButton}" |
|
|
|
@ -321,11 +359,7 @@
|
|
|
|
|
<TextBlock Text="Web UI" /> |
|
|
|
|
</StackPanel> |
|
|
|
|
</Button> |
|
|
|
|
</Grid> |
|
|
|
|
|
|
|
|
|
<!-- Import button (for unknown) --> |
|
|
|
|
<Button Grid.Row="3" Grid.Column="0" Classes="transparent-info" |
|
|
|
|
Grid.ColumnSpan="2" |
|
|
|
|
<Button Classes="transparent-info" |
|
|
|
|
VerticalAlignment="Bottom" |
|
|
|
|
HorizontalAlignment="Stretch" |
|
|
|
|
Command="{Binding Import}" |
|
|
|
@ -337,29 +371,28 @@
|
|
|
|
|
<TextBlock Text="{x:Static lang:Resources.Action_Import}" /> |
|
|
|
|
</StackPanel> |
|
|
|
|
</Button> |
|
|
|
|
|
|
|
|
|
</UniformGrid> |
|
|
|
|
</Grid> |
|
|
|
|
<!-- Update overlay --> |
|
|
|
|
<Border |
|
|
|
|
Grid.Row="0" Grid.RowSpan="4" |
|
|
|
|
Grid.Column="0" |
|
|
|
|
Grid.ColumnSpan="2" |
|
|
|
|
Background="#DD000000" |
|
|
|
|
CornerRadius="4" |
|
|
|
|
CornerRadius="8" |
|
|
|
|
HorizontalAlignment="Stretch" |
|
|
|
|
VerticalAlignment="Stretch" |
|
|
|
|
IsVisible="{Binding IsProgressVisible}"/> |
|
|
|
|
<Grid Grid.Row="0" Grid.RowSpan="4" |
|
|
|
|
Grid.Column="0" |
|
|
|
|
<Grid Grid.Column="0" |
|
|
|
|
Grid.ColumnSpan="2" |
|
|
|
|
HorizontalAlignment="Center" |
|
|
|
|
VerticalAlignment="Center" |
|
|
|
|
RowDefinitions="Auto, *" |
|
|
|
|
IsVisible="{Binding IsProgressVisible}"> |
|
|
|
|
IsVisible="{Binding IsProgressVisible}" |
|
|
|
|
RowDefinitions="Auto, *"> |
|
|
|
|
<controls:ProgressRing |
|
|
|
|
HorizontalAlignment="Center" |
|
|
|
|
IsIndeterminate="{Binding IsIndeterminate}" |
|
|
|
|
Width="150" |
|
|
|
|
Height="150" |
|
|
|
|
Width="120" |
|
|
|
|
Height="120" |
|
|
|
|
StartAngle="90" |
|
|
|
|
EndAngle="450" |
|
|
|
|
Value="{Binding Value}" |
|
|
|
|