mirror of
https://github.com/aaru-dps/RedBookPlayer.git
synced 2025-12-16 19:24:41 +00:00
Change theme selection window to settings window
This commit is contained in:
@@ -8,7 +8,7 @@ namespace RedBookPlayer
|
||||
{
|
||||
public static MainWindow Instance;
|
||||
public ContentControl ContentControl;
|
||||
public Window themeSelectionWindow;
|
||||
public Window settingsWindow;
|
||||
|
||||
public MainWindow()
|
||||
{
|
||||
@@ -20,8 +20,8 @@ namespace RedBookPlayer
|
||||
{
|
||||
if (e.Key == Key.F1)
|
||||
{
|
||||
themeSelectionWindow = new ThemeSelectionWindow();
|
||||
themeSelectionWindow.Show();
|
||||
settingsWindow = new SettingsWindow();
|
||||
settingsWindow.Show();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,8 +42,8 @@ namespace RedBookPlayer
|
||||
this.KeyDown += OnKeyDown;
|
||||
this.Closing += (s, e) =>
|
||||
{
|
||||
themeSelectionWindow?.Close();
|
||||
themeSelectionWindow = null;
|
||||
settingsWindow?.Close();
|
||||
settingsWindow = null;
|
||||
};
|
||||
|
||||
this.Closing += (e, f) =>
|
||||
|
||||
14
RedBookPlayer/SettingsWindow.xaml
Normal file
14
RedBookPlayer/SettingsWindow.xaml
Normal file
@@ -0,0 +1,14 @@
|
||||
<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"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="RedBookPlayer.SettingsWindow"
|
||||
Title="Settings"
|
||||
Width="450" Height="600">
|
||||
<DockPanel Margin="16">
|
||||
<TextBlock DockPanel.Dock="Top" Margin="0,0,0,4">Themes</TextBlock>
|
||||
<Button DockPanel.Dock="Bottom" Name="ApplyButton">Apply</Button>
|
||||
<ListBox Name="ThemeList" SelectionMode="Single" Margin="0,0,0,16"/>
|
||||
</DockPanel>
|
||||
</Window>
|
||||
@@ -7,12 +7,12 @@ using Avalonia.Markup.Xaml;
|
||||
|
||||
namespace RedBookPlayer
|
||||
{
|
||||
public class ThemeSelectionWindow : Window
|
||||
public class SettingsWindow : Window
|
||||
{
|
||||
ListBox themeList;
|
||||
string selectedTheme;
|
||||
|
||||
public ThemeSelectionWindow()
|
||||
public SettingsWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
<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"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="RedBookPlayer.ThemeSelectionWindow"
|
||||
Title="Select Theme"
|
||||
Width="450" Height="600">
|
||||
<Border Padding="10">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<ListBox Grid.Row="0" Grid.Column="0" Name="ThemeList" SelectionMode="Single" Margin="0,0,0,16"/>
|
||||
<Button Grid.Row="1" Grid.Column="0" Name="ApplyButton">Apply</Button>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Window>
|
||||
Reference in New Issue
Block a user