dtlauncher/launcher-client-avalonia/GUI/LauncherWindow.axaml

180 lines
7.5 KiB
XML

<Window x:Class="launcher_client_avalonia.GUI.LauncherWindow"
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:launcher_client_avalonia.GUI"
Title="Launcher"
Width="800"
Height="500"
MinWidth="800"
MinHeight="500"
Background="{DynamicResource MyBackgroundColor}">
<Grid ColumnDefinitions="5,*,5" RowDefinitions="5,40,5,*,5">
<Image x:Name="BackgroundImage"
Grid.RowSpan="5"
Grid.ColumnSpan="3"
HorizontalAlignment="Center"
Stretch="UniformToFill" />
<Grid x:Name="TopPanelGrid"
Grid.Row="1"
Grid.Column="1"
ColumnDefinitions="*,5,*,5,*,5,*">
<local:TabButton x:Name="LibraryButton"
Grid.Column="0"
Content="Library"
FontSize="18"
Classes="MyButtonStyle" />
<local:TabButton x:Name="DownloadsButton"
Grid.Column="2"
Content="Downloads"
FontSize="18"
Classes="MyButtonStyle" />
<local:TabButton x:Name="LogButton"
Grid.Column="4"
Content="Log"
FontSize="18"
Classes="MyButtonStyle" />
<local:TabButton x:Name="SettingsButton"
Grid.Column="6"
Content="Settings"
FontSize="18"
Classes="MyButtonStyle" />
</Grid>
<Grid x:Name="LibraryGrid"
Grid.Row="3"
Grid.Column="1"
ColumnDefinitions="220,5,*,5,220"
IsVisible="true">
<ScrollViewer Grid.Column="0"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
ScrollViewer.VerticalScrollBarVisibility="Auto"
Template="{DynamicResource myScrollViewer}">
<StackPanel x:Name="ProgramsPanel" />
</ScrollViewer>
<Grid x:Name="ProgramGrid"
Grid.Column="2"
RowDefinitions="35,5,35,5,70,5,*">
<Label x:Name="NameLabel"
Grid.Row="0"
Content="name"
FontSize="19"
FontWeight="Bold"
Classes="MyLabelStyle" />
<StackPanel Grid.Row="2"
HorizontalAlignment="Right"
ClipToBounds="True"
Orientation="Horizontal">
<Button x:Name="RemoveButton"
Width="100"
Margin="2,0"
Background="{DynamicResource MyRed}"
Content="Remove"
Classes="MyButtonStyle" />
<Button x:Name="InstallButton"
Width="100"
Margin="2,0"
Content="Install"
Classes="MyButtonStyle" />
<Button x:Name="UpdateButton"
Width="100"
Margin="2,0"
Content="Update"
Classes="MyButtonStyle" />
<Button x:Name="LaunchButton"
Width="100"
Margin="2,0"
Background="{DynamicResource MyGreen}"
Content="Launch"
Classes="MyButtonStyle" />
</StackPanel>
<TextBox x:Name="DescriptionBox"
Grid.Row="4"
ScrollViewer.VerticalScrollBarVisibility="Auto"
Classes="MyTextBoxStyle" />
<TextBox x:Name="ProgramLogBox"
Grid.Row="6"
ScrollViewer.VerticalScrollBarVisibility="Auto"
Classes="MyTextBoxStyle" />
</Grid>
<Grid Grid.Row="0"
Grid.Column="4"
RowDefinitions="95,*">
<Grid Grid.Row="0"
ColumnDefinitions="*,*"
RowDefinitions="30,30,30">
<Label Grid.Row="0"
Grid.Column="0"
Content="version:"
Classes="MyLabelStyle" />
<ComboBox Grid.Row="0"
Grid.Column="1"
Background="{DynamicResource MyDarkTr}"
Template="{DynamicResource MyComboBox}">
<ComboBoxItem IsSelected="True">
<Label Background="Transparent"
Content="v1"
Classes="MyLabelStyle" />
</ComboBoxItem>
</ComboBox>
<Label Grid.Row="1"
Grid.Column="0"
Content="directory:"
Classes="MyLabelStyle" />
<Label Name="ProgramDirectoryLabel"
Grid.Row="1"
Grid.Column="1"
Content="0"
Classes="MyLabelStyle" />
<Label Grid.Row="2"
Grid.Column="0"
Content="size:"
Classes="MyLabelStyle" />
<Label Name="ProgramSizeLabel"
Grid.Row="2"
Grid.Column="1"
Content="0"
Classes="MyLabelStyle" />
</Grid>
<ScrollViewer Name="ProgramSettingsViever"
Grid.Row="1"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
VerticalContentAlignment="Top"
Template="{DynamicResource myScrollViewer}" />
</Grid>
</Grid>
<Grid x:Name="DownloadsGrid"
Grid.Row="3"
Grid.Column="1"
IsVisible="false" />
<Grid x:Name="LogGrid"
Grid.Row="3"
Grid.Column="1"
IsVisible="false"
RowDefinitions="30,*">
<Label x:Name="LogfileLabel"
Grid.Row="0"
Grid.Column="0"
Content="logfile"
FontStyle="Italic"
Classes="MyLabelStyle" />
<TextBox x:Name="LogBox"
Grid.Row="1"
Grid.Column="0"
ScrollViewer.VerticalScrollBarVisibility="Auto"
Classes="MyTextBoxStyle" />
</Grid>
<Grid x:Name="SettingsGrid"
Grid.Row="3"
Grid.Column="1"
IsVisible="false" />
</Grid>
</Window>