Whole UI moved into one window
This commit is contained in:
parent
5b2d9d9648
commit
8d0cadbff0
2 changed files with 99 additions and 113 deletions
|
@ -6,33 +6,21 @@
|
||||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||||
x:Class="PS2_Manager.MainWindow"
|
x:Class="PS2_Manager.MainWindow"
|
||||||
Title="PS2_Manager"
|
Title="PS2_Manager"
|
||||||
Background="Transparent"
|
Background="#201c29"
|
||||||
SystemDecorations="None"
|
|
||||||
Width="990"
|
Width="990"
|
||||||
Height="520"
|
Height="520"
|
||||||
|
MinHeight="490"
|
||||||
|
MinWidth="600"
|
||||||
WindowStartupLocation="CenterScreen"
|
WindowStartupLocation="CenterScreen"
|
||||||
Loaded="Control_OnLoaded"
|
Loaded="Control_OnLoaded"
|
||||||
|
Resized="WindowBase_OnResized"
|
||||||
Foreground="White">
|
Foreground="White">
|
||||||
<Grid ColumnDefinitions="680, 10, 300" Background="Transparent">
|
<Grid ColumnDefinitions="*, 10, *, 10, 320" Background="Transparent">
|
||||||
<Grid Grid.Column="0" RowDefinitions="20, *">
|
<Grid Grid.Column="0">
|
||||||
<Grid Grid.Row="0">
|
<Border CornerRadius="0,0,10,10">
|
||||||
<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">
|
<Border CornerRadius="10" Margin="5">
|
||||||
<ListBox Name="GamesList" Background="Transparent"
|
<ListBox Name="GamesList" Background="Transparent"
|
||||||
SelectionChanged="GamesList_OnSelectionChanged"
|
SelectionChanged="GamesList_OnSelectionChanged">
|
||||||
>
|
|
||||||
<ListBox.ItemTemplate>
|
<ListBox.ItemTemplate>
|
||||||
<DataTemplate x:DataType="local:Game">
|
<DataTemplate x:DataType="local:Game">
|
||||||
<Border Background="Transparent" Padding="10">
|
<Border Background="Transparent" Padding="10">
|
||||||
|
@ -63,13 +51,15 @@
|
||||||
</ListBox.Styles>
|
</ListBox.Styles>
|
||||||
</ListBox>
|
</ListBox>
|
||||||
</Border>
|
</Border>
|
||||||
|
</Border>
|
||||||
|
</Grid>
|
||||||
<Border Grid.Column="1">
|
<Border Grid.Column="1">
|
||||||
<Border Width="1" Background="#35313d" Margin="2,10"/>
|
<Border Width="1" Background="#35313d" Margin="2,10"/>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
<Border Grid.Column="2">
|
<Border Grid.Column="2">
|
||||||
<Border Margin="2,0,0,0" Name="GameEdit">
|
<Border Margin="2,0,0,0" Name="GameEdit">
|
||||||
<Grid RowDefinitions="*, 40">
|
<Grid RowDefinitions="*, 40, 10">
|
||||||
<ScrollViewer Grid.Row="0">
|
<ScrollViewer Grid.Row="0">
|
||||||
<StackPanel Orientation="Vertical" Margin="10">
|
<StackPanel Orientation="Vertical" Margin="10">
|
||||||
<TextBlock Foreground="White" Text="Display Name:" HorizontalAlignment="Center" Padding="0,10"/>
|
<TextBlock Foreground="White" Text="Display Name:" HorizontalAlignment="Center" Padding="0,10"/>
|
||||||
|
@ -93,15 +83,10 @@
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
</Border>
|
</Border>
|
||||||
</Grid>
|
|
||||||
</Border>
|
|
||||||
</Grid>
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
<Grid Grid.Column="2" RowDefinitions="20, *" Name="GameShowcaseGrid">
|
<Border Grid.Column="4" Background="#35313d" CornerRadius="10" Name="InfoWindow" Margin="10">
|
||||||
<Border Grid.Row="1" Background="#35313d" CornerRadius="10" Name="InfoWindow" >
|
<Grid RowDefinitions="*, 350, 20, 20, 20, 20, *">
|
||||||
<Grid RowDefinitions="350, *, *, *, *">
|
<Grid Grid.Row="1" ColumnDefinitions="*, 205, *">
|
||||||
<Grid Grid.Row="0" ColumnDefinitions="*, 205, *">
|
|
||||||
|
|
||||||
<Button Foreground="White" Grid.Column="0" Content="←" HorizontalAlignment="Center" VerticalAlignment="Center" Click="PrevButton"/>
|
<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"/>
|
<Button Foreground="White" Grid.Column="2" Content="→" HorizontalAlignment="Center" VerticalAlignment="Center" Click="NextButton"/>
|
||||||
|
@ -114,16 +99,15 @@
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
</Grid>
|
</Grid>
|
||||||
<TextBlock Foreground="White" Grid.Row="1" Text="" HorizontalAlignment="Center"
|
|
||||||
Name="GameNameTextBlock"/>
|
|
||||||
<TextBlock Foreground="White" Grid.Row="2" Text="" HorizontalAlignment="Center"
|
<TextBlock Foreground="White" Grid.Row="2" Text="" HorizontalAlignment="Center"
|
||||||
Name="GameIdTextBlock"/>
|
Name="GameNameTextBlock"/>
|
||||||
<TextBlock Foreground="White" Grid.Row="3" Text="" HorizontalAlignment="Center"
|
<TextBlock Foreground="White" Grid.Row="3" Text="" HorizontalAlignment="Center"
|
||||||
Name="IsoSizeTextBlock"/>
|
Name="GameIdTextBlock"/>
|
||||||
<TextBlock Foreground="White" Grid.Row="4" Text="" HorizontalAlignment="Center"
|
<TextBlock Foreground="White" Grid.Row="4" Text="" HorizontalAlignment="Center"
|
||||||
|
Name="IsoSizeTextBlock"/>
|
||||||
|
<TextBlock Foreground="White" Grid.Row="5" Text="" HorizontalAlignment="Center"
|
||||||
Name="GameDateTextBlock"/>
|
Name="GameDateTextBlock"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
|
||||||
</Window>
|
</Window>
|
||||||
|
|
|
@ -51,7 +51,6 @@ public partial class MainWindow : Window
|
||||||
{
|
{
|
||||||
Console.Info("Selected " + selectedGame + " from ListView");
|
Console.Info("Selected " + selectedGame + " from ListView");
|
||||||
SetEditArea();
|
SetEditArea();
|
||||||
GameShowcaseGrid.IsVisible = true;
|
|
||||||
SetShowcaseArea();
|
SetShowcaseArea();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -120,7 +119,6 @@ public partial class MainWindow : Window
|
||||||
|
|
||||||
private async void Control_OnLoaded(object? sender, RoutedEventArgs e)
|
private async void Control_OnLoaded(object? sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
WindowTitle.Text = "PS2 Games Manager";
|
|
||||||
FetchGamesFromLibrary();
|
FetchGamesFromLibrary();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -320,4 +318,8 @@ public partial class MainWindow : Window
|
||||||
this.ArtworkType.Value = Artwork.PrevType(this.ArtworkType.Value);
|
this.ArtworkType.Value = Artwork.PrevType(this.ArtworkType.Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void WindowBase_OnResized(object? sender, WindowResizedEventArgs e)
|
||||||
|
{
|
||||||
|
VanillaConsole.WriteLine(e.ClientSize);
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Add table
Reference in a new issue