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,124 +6,108 @@
|
||||||
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"
|
<Border CornerRadius="10" Margin="5">
|
||||||
PointerPressed="WindowDrag">
|
<ListBox Name="GamesList" Background="Transparent"
|
||||||
<Grid ColumnDefinitions="*, 20">
|
SelectionChanged="GamesList_OnSelectionChanged">
|
||||||
<TextBlock Name="WindowTitle" FontSize="12" Padding="8,0,0,0" VerticalAlignment="Center"/>
|
<ListBox.ItemTemplate>
|
||||||
<Border Grid.Column="1" Background="#625f69" PointerPressed="WindowClose">
|
<DataTemplate x:DataType="local:Game">
|
||||||
<TextBlock FontSize="12" Text="×" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
<Border Background="Transparent" Padding="10">
|
||||||
</Border>
|
<Border.ContextMenu>
|
||||||
</Grid>
|
<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>
|
|
||||||
<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>
|
</Border>
|
||||||
</Grid>
|
</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, 10">
|
||||||
|
<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>
|
||||||
|
|
||||||
|
<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"/>
|
||||||
|
|
||||||
|
<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="2" Text="" HorizontalAlignment="Center"
|
||||||
|
Name="GameNameTextBlock"/>
|
||||||
|
<TextBlock Foreground="White" Grid.Row="3" Text="" HorizontalAlignment="Center"
|
||||||
|
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>
|
</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