|
|
|
<controls:UserControlBase xmlns="https://github.com/avaloniaui"
|
|
|
|
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:vm="clr-namespace:StabilityMatrix.Avalonia.ViewModels"
|
|
|
|
xmlns:avaloniaEdit="clr-namespace:AvaloniaEdit;assembly=AvaloniaEdit"
|
|
|
|
xmlns:ui="using:FluentAvalonia.UI.Controls"
|
|
|
|
xmlns:mocks="clr-namespace:StabilityMatrix.Avalonia.DesignData"
|
|
|
|
xmlns:models="clr-namespace:StabilityMatrix.Core.Models;assembly=StabilityMatrix.Core"
|
|
|
|
xmlns:controls="clr-namespace:StabilityMatrix.Avalonia.Controls"
|
|
|
|
d:DataContext="{x:Static mocks:DesignData.LaunchPageViewModel}"
|
|
|
|
x:CompileBindings="True"
|
|
|
|
x:DataType="vm:LaunchPageViewModel"
|
|
|
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
|
|
|
x:Class="StabilityMatrix.Avalonia.Views.LaunchPageView">
|
|
|
|
|
|
|
|
<Grid RowDefinitions="Auto,*,Auto">
|
|
|
|
<Grid ColumnDefinitions="Auto,*">
|
|
|
|
<Grid ColumnDefinitions="0.8*,0.2*">
|
|
|
|
<!--<ui:Flyout
|
|
|
|
Background="{DynamicResource SystemAccentColorPrimaryBrush}"
|
|
|
|
FontSize="18"
|
|
|
|
Grid.Column="0"
|
|
|
|
Grid.Row="0"
|
|
|
|
IsOpen="{Binding IsLaunchTeachingTipsOpen, Mode=TwoWay}"
|
|
|
|
Margin="24,8,0,0"
|
|
|
|
Placement="Bottom">
|
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
|
<Grid HorizontalAlignment="Left">
|
|
|
|
<ui:SymbolIcon Symbol="ArrowCurveUpLeft20" />
|
|
|
|
</Grid>
|
|
|
|
<TextBlock
|
|
|
|
HorizontalAlignment="Left"
|
|
|
|
Text="Click Launch to get started!"
|
|
|
|
TextWrapping="WrapWithOverflow"
|
|
|
|
Width="280" />
|
|
|
|
</StackPanel>
|
|
|
|
</ui:Flyout>-->
|
|
|
|
|
|
|
|
<!-- Command="{Binding LaunchCommand}" -->
|
|
|
|
<!--Visibility="{Binding LaunchButtonVisibility, FallbackValue=Visible}"-->
|
|
|
|
<Button
|
|
|
|
Command="{Binding LaunchCommand}"
|
|
|
|
Content="Launch"
|
|
|
|
Grid.Column="0"
|
|
|
|
Grid.Row="0"
|
|
|
|
Classes="success"
|
|
|
|
HorizontalAlignment="Left"
|
|
|
|
Margin="24,8,0,0"
|
|
|
|
VerticalAlignment="Stretch"
|
|
|
|
Width="72"/>
|
|
|
|
<Button
|
|
|
|
Content="Stop"
|
|
|
|
Grid.Column="0"
|
|
|
|
Grid.Row="0"
|
|
|
|
Classes="danger"
|
|
|
|
HorizontalAlignment="Left"
|
|
|
|
Margin="24,8,0,0"
|
|
|
|
VerticalAlignment="Stretch"
|
|
|
|
Command="{Binding StopCommand}"
|
|
|
|
IsVisible="{Binding StopButtonVisibility, FallbackValue=True}"
|
|
|
|
Width="72"/>
|
|
|
|
<!--Command="{Binding ConfigCommand}"-->
|
|
|
|
<Button
|
|
|
|
FontSize="16"
|
|
|
|
Grid.Column="1"
|
|
|
|
Grid.Row="0"
|
|
|
|
HorizontalAlignment="Left"
|
|
|
|
Margin="8,8,0,0"
|
|
|
|
VerticalAlignment="Stretch"
|
|
|
|
Width="48">
|
|
|
|
<ui:SymbolIcon Symbol="Settings" FontSize="16"/>
|
|
|
|
<!--<ui:Button.Icon>
|
|
|
|
<ui:SymbolIcon Symbol="Settings32" />
|
|
|
|
</ui:Button.Icon>-->
|
|
|
|
</Button>
|
|
|
|
</Grid>
|
|
|
|
|
|
|
|
<ComboBox
|
|
|
|
Grid.Column="1"
|
|
|
|
Grid.Row="0"
|
|
|
|
HorizontalAlignment="Stretch"
|
|
|
|
Margin="8,8,24,0"
|
|
|
|
VerticalAlignment="Top"
|
|
|
|
ItemsSource="{Binding InstalledPackages}"
|
|
|
|
SelectedValue="{Binding SelectedPackage}"
|
|
|
|
x:Name="SelectPackageComboBox">
|
|
|
|
<ComboBox.Styles>
|
|
|
|
<Style Selector="ComboBox /template/ ContentControl#ContentPresenter > StackPanel > TextBlock:nth-child(2)">
|
|
|
|
<Setter Property="IsVisible" Value="False" />
|
|
|
|
</Style>
|
|
|
|
</ComboBox.Styles>
|
|
|
|
|
|
|
|
<ComboBox.ItemTemplate>
|
|
|
|
<DataTemplate DataType="{x:Type models:InstalledPackage}">
|
|
|
|
<StackPanel Margin="10,0,0,0" VerticalAlignment="Top">
|
|
|
|
<TextBlock
|
|
|
|
Margin="0,5,0,5"
|
|
|
|
Name="NameTextBlock"
|
|
|
|
Text="{Binding DisplayName, Mode=OneWay}" />
|
|
|
|
<TextBlock Text="{Binding FullPath, Mode=OneWay}"/>
|
|
|
|
</StackPanel>
|
|
|
|
</DataTemplate>
|
|
|
|
</ComboBox.ItemTemplate>
|
|
|
|
</ComboBox>
|
|
|
|
</Grid>
|
|
|
|
|
|
|
|
<avaloniaEdit:TextEditor
|
|
|
|
x:Name="Console"
|
|
|
|
Document="{Binding ConsoleDocument}"
|
|
|
|
IsReadOnly="True"
|
|
|
|
Grid.Row="1"
|
|
|
|
WordWrap="True"
|
|
|
|
Margin="16,8,16,10"
|
|
|
|
ShowLineNumbers="True"
|
|
|
|
LineNumbersForeground="DarkSlateGray"
|
|
|
|
VerticalScrollBarVisibility="Auto"
|
|
|
|
FontFamily="Cascadia Code,Consolas,Menlo,Monospace" />
|
|
|
|
|
|
|
|
<!--Command="{Binding LaunchWebUiCommand}"-->
|
|
|
|
<!--Visibility="{Binding ShowWebUiButton, Converter={StaticResource BoolToVisConverter}}"-->
|
|
|
|
<Button
|
|
|
|
Content="Open Web UI"
|
|
|
|
FontSize="12"
|
|
|
|
Classes="success"
|
|
|
|
Grid.ColumnSpan="2"
|
|
|
|
Grid.Row="2"
|
|
|
|
HorizontalAlignment="Stretch"
|
|
|
|
Margin="24,0,24,8"/>
|
|
|
|
</Grid>
|
|
|
|
|
|
|
|
</controls:UserControlBase>
|