Whole UI moved into one window

This commit is contained in:
WeeXnes 2025-04-26 17:09:27 +02:00
parent 5b2d9d9648
commit 8d0cadbff0
2 changed files with 99 additions and 113 deletions

View file

@ -6,33 +6,21 @@
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="PS2_Manager.MainWindow"
Title="PS2_Manager"
Background="Transparent"
SystemDecorations="None"
Background="#201c29"
Width="990"
Height="520"
MinHeight="490"
MinWidth="600"
WindowStartupLocation="CenterScreen"
Loaded="Control_OnLoaded"
Resized="WindowBase_OnResized"
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, *">
<Grid ColumnDefinitions="*, 10, *, 10, 320" Background="Transparent">
<Grid Grid.Column="0">
<Border CornerRadius="0,0,10,10">
<Border CornerRadius="10" Margin="5">
<ListBox Name="GamesList" Background="Transparent"
SelectionChanged="GamesList_OnSelectionChanged"
>
SelectionChanged="GamesList_OnSelectionChanged">
<ListBox.ItemTemplate>
<DataTemplate x:DataType="local:Game">
<Border Background="Transparent" Padding="10">
@ -63,13 +51,15 @@
</ListBox.Styles>
</ListBox>
</Border>
</Border>
</Grid>
<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">
<Grid RowDefinitions="*, 40, 10">
<ScrollViewer Grid.Row="0">
<StackPanel Orientation="Vertical" Margin="10">
<TextBlock Foreground="White" Text="Display Name:" HorizontalAlignment="Center" Padding="0,10"/>
@ -93,15 +83,10 @@
</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, *">
<Border Grid.Column="4" Background="#35313d" CornerRadius="10" Name="InfoWindow" Margin="10">
<Grid RowDefinitions="*, 350, 20, 20, 20, 20, *">
<Grid Grid.Row="1" 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"/>
@ -114,16 +99,15 @@
</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"/>
Name="GameNameTextBlock"/>
<TextBlock Foreground="White" Grid.Row="3" Text="" HorizontalAlignment="Center"
Name="IsoSizeTextBlock"/>
Name="GameIdTextBlock"/>
<TextBlock Foreground="White" Grid.Row="4" Text="" HorizontalAlignment="Center"
Name="IsoSizeTextBlock"/>
<TextBlock Foreground="White" Grid.Row="5" Text="" HorizontalAlignment="Center"
Name="GameDateTextBlock"/>
</Grid>
</Border>
</Grid>
</Grid>
</Window>

View file

@ -51,7 +51,6 @@ public partial class MainWindow : Window
{
Console.Info("Selected " + selectedGame + " from ListView");
SetEditArea();
GameShowcaseGrid.IsVisible = true;
SetShowcaseArea();
}
}
@ -120,7 +119,6 @@ public partial class MainWindow : Window
private async void Control_OnLoaded(object? sender, RoutedEventArgs e)
{
WindowTitle.Text = "PS2 Games Manager";
FetchGamesFromLibrary();
}
@ -320,4 +318,8 @@ public partial class MainWindow : Window
this.ArtworkType.Value = Artwork.PrevType(this.ArtworkType.Value);
}
private void WindowBase_OnResized(object? sender, WindowResizedEventArgs e)
{
VanillaConsole.WriteLine(e.ClientSize);
}
}