ps2_manager/PS2_Manager/MainWindow.axaml
WeeXnes b891f62d34
Some checks failed
Java CI / test (push) Has been cancelled
ui rework
2025-04-26 12:21:08 +02:00

129 lines
8.2 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<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:local="clr-namespace:PS2_Manager.Core"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="PS2_Manager.MainWindow"
Title="PS2_Manager"
Background="Transparent"
SystemDecorations="None"
Width="990"
Height="520"
WindowStartupLocation="CenterScreen"
Loaded="Control_OnLoaded"
Foreground="White">
<Grid ColumnDefinitions="680, 10, 300" Background="Transparent">
<Grid Grid.Column="0" RowDefinitions="20, *">
<Grid Grid.Row="0">
<Border Background="#35313d"
PointerPressed="WindowDrag">
<Grid ColumnDefinitions="*, 20">
<TextBlock Name="WindowTitle" FontSize="12" Padding="8,0,0,0" VerticalAlignment="Center"/>
<Border Grid.Column="1" Background="#625f69" PointerPressed="WindowClose">
<TextBlock FontSize="12" Text="×" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
</Grid>
</Border>
</Grid>
<Grid Grid.Row="1">
<Border Background="#201c29" CornerRadius="0,0,10,10">
<Grid ColumnDefinitions="300, 1, *">
<Border CornerRadius="10" Margin="5">
<ListBox Name="GamesList" Background="Transparent"
SelectionChanged="GamesList_OnSelectionChanged"
>
<ListBox.ItemTemplate>
<DataTemplate x:DataType="local:Game">
<Border Background="Transparent" Padding="10">
<Border.ContextMenu>
<ContextMenu>
<MenuItem Header="Remove Game" Click="DeleteButton"/>
<MenuItem Header="Show Details"/>
</ContextMenu>
</Border.ContextMenu>
<TextBlock Foreground="White" Text="{Binding Name}"/>
</Border>
</DataTemplate>
</ListBox.ItemTemplate>
<ListBox.ContextMenu>
<ContextMenu x:Name="EmptyAreaContextMenu">
<MenuItem Header="Add New Game" Click="OpenFileButton_Clicked"/>
<MenuItem Header="Refresh List" Click="Context_RefreshGames"/>
</ContextMenu>
</ListBox.ContextMenu>
<ListBox.Styles>
<Style Selector="ListBoxItem:selected /template/ ContentPresenter">
<Setter Property="Background" Value="#35313d"/>
</Style>
<Style Selector="ListBoxItem">
<Setter Property="Padding" Value="0"/>
<Setter Property="CornerRadius" Value="10"/>
</Style>
</ListBox.Styles>
</ListBox>
</Border>
<Border Grid.Column="1">
<Border Width="1" Background="#35313d" Margin="2,10"/>
</Border>
<Border Grid.Column="2">
<Border Margin="2,0,0,0" Name="GameEdit">
<Grid RowDefinitions="*, 40">
<ScrollViewer Grid.Row="0">
<StackPanel Orientation="Vertical" Margin="10">
<TextBlock Foreground="White" Text="Display Name:" HorizontalAlignment="Center" Padding="0,10"/>
<TextBox Foreground="White" Name="NameTextBox_Edit"/>
<Separator/>
<Button Foreground="White" Content="Calculate Checksums" Click="ChecksumButtonOnClick" HorizontalAlignment="Stretch"></Button>
<Border Background="#35313d" CornerRadius="5" Padding="10" Margin="0,5" IsVisible="False" Name="ChecksumArea">
<StackPanel>
<TextBlock Foreground="White" FontSize="10" Name="MD5TextBlock"/>
<TextBlock Foreground="White" FontSize="10" Name="SHATextBlock"/>
</StackPanel>
</Border>
</StackPanel>
</ScrollViewer>
<Grid Grid.Row="1" ColumnDefinitions="*,*">
<Button Foreground="White" Content="Undo" Grid.Column="0" HorizontalAlignment="Center" VerticalAlignment="Center"
Click="Undo_OnClick"/>
<Button Foreground="White" Content="Save" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center"
Click="Save_OnClick"/>
</Grid>
</Grid>
</Border>
</Border>
</Grid>
</Border>
</Grid>
</Grid>
<Grid Grid.Column="2" RowDefinitions="20, *" Name="GameShowcaseGrid">
<Border Grid.Row="1" Background="#35313d" CornerRadius="10" Name="InfoWindow" >
<Grid RowDefinitions="350, *, *, *, *">
<Grid Grid.Row="0" ColumnDefinitions="*, 205, *">
<Button Foreground="White" Grid.Column="0" Content="←" HorizontalAlignment="Center" VerticalAlignment="Center" Click="PrevButton"/>
<Button Foreground="White" Grid.Column="2" Content="→" HorizontalAlignment="Center" VerticalAlignment="Center" Click="NextButton"/>
<Border Grid.Column="1" Width="205" Height="292" Background="Transparent" CornerRadius="5" HorizontalAlignment="Center" VerticalAlignment="Center"
PointerPressed="CoverImage_OnPointerPressed" Name="CoverContainer">
<Grid>
<Image Name="CoverImage" Source="Images/missing.png" Stretch="UniformToFill"/>
<TextBlock Name="CoverTextHint" HorizontalAlignment="Center" VerticalAlignment="Center" IsVisible="False"/>
</Grid>
</Border>
</Grid>
<TextBlock Foreground="White" Grid.Row="1" Text="" HorizontalAlignment="Center"
Name="GameNameTextBlock"/>
<TextBlock Foreground="White" Grid.Row="2" Text="" HorizontalAlignment="Center"
Name="GameIdTextBlock"/>
<TextBlock Foreground="White" Grid.Row="3" Text="" HorizontalAlignment="Center"
Name="IsoSizeTextBlock"/>
<TextBlock Foreground="White" Grid.Row="4" Text="" HorizontalAlignment="Center"
Name="GameDateTextBlock"/>
</Grid>
</Border>
</Grid>
</Grid>
</Window>