89 lines
No EOL
4.2 KiB
XML
89 lines
No EOL
4.2 KiB
XML
<Window 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="using:MetaforceInstaller.UI.ViewModels"
|
|
xmlns:lang="using:MetaforceInstaller.UI.Lang"
|
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
|
x:CompileBindings="True"
|
|
x:DataType="vm:MainWindowViewModel"
|
|
x:Class="MetaforceInstaller.UI.Windows.MainWindow"
|
|
Title="MetaforceInstaller">
|
|
|
|
<Window.Resources>
|
|
<ResourceDictionary>
|
|
<ResourceDictionary.ThemeDictionaries>
|
|
<ResourceDictionary x:Key="Light">
|
|
<SvgImage x:Key="Logo" Source="/Images/logo_red.svg" />
|
|
</ResourceDictionary>
|
|
|
|
<ResourceDictionary x:Key="Dark">
|
|
<SvgImage x:Key="Logo" Source="/Images/logo_red.svg" />
|
|
</ResourceDictionary>
|
|
</ResourceDictionary.ThemeDictionaries>
|
|
</ResourceDictionary>
|
|
</Window.Resources>
|
|
|
|
<Design.DataContext>
|
|
<vm:MainWindowViewModel />
|
|
</Design.DataContext>
|
|
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="96" />
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="24" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<Image Grid.Row="0"
|
|
Margin="20"
|
|
VerticalAlignment="Center"
|
|
Source="{DynamicResource Logo}"
|
|
HorizontalAlignment="Left">
|
|
</Image>
|
|
|
|
<Button Grid.Row="0" Name="NewInstallationButton" Margin="20" VerticalAlignment="Center"
|
|
HorizontalAlignment="Right">
|
|
<Button.Content>
|
|
<StackPanel Orientation="Horizontal" Spacing="4">
|
|
<TextBlock Text="+" />
|
|
<TextBlock Text="{x:Static lang:Resources.AddInstallation}" />
|
|
</StackPanel>
|
|
</Button.Content>
|
|
</Button>
|
|
|
|
<ScrollViewer Grid.Row="1">
|
|
<ItemsControl ItemsSource="{Binding Installations}">
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate>
|
|
<Expander Header="{Binding Title}" Margin="16, 8" HorizontalAlignment="Stretch">
|
|
<StackPanel Orientation="Vertical">
|
|
<Label Content="{Binding Id, StringFormat='ID: {0}'}" />
|
|
<Label Content="{Binding InstalledAt, StringFormat='Installed: {0}'}" />
|
|
<StackPanel Orientation="Horizontal" Spacing="8">
|
|
<Button Name="LaunchServerButton" Click="OnLaunchServerClick"
|
|
Content="{x:Static lang:Resources.LaunchServer}" />
|
|
<Button Name="LaunchPcAdminButton" Click="OnLaunchAdminClick"
|
|
Content="{x:Static lang:Resources.LaunchPCAdmin}" />
|
|
<Button Name="InstallVrClientButton"
|
|
Content="{x:Static lang:Resources.InstallVRClient}" />
|
|
<Button Name="InstallAndroidAdminButton"
|
|
Content="{x:Static lang:Resources.InstallAndroidAdmin}" />
|
|
<Button Name="DeleteButton" Click="OnDeleteInstallationClick"
|
|
Content="{x:Static lang:Resources.Delete}" />
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</Expander>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
</ScrollViewer>
|
|
|
|
<DockPanel Grid.Row="2">
|
|
<Border Name="StatusCircle" Margin="4" Width="16" Height="16" Background="{Binding StatusColor}"
|
|
CornerRadius="50" HorizontalAlignment="Left" />
|
|
<Label Name="SerialNumberLabel" Content="{Binding StatusText}" />
|
|
<Label Name="VersionLabel" HorizontalAlignment="Right" VerticalAlignment="Center" />
|
|
</DockPanel>
|
|
</Grid>
|
|
</Window> |