From 5515f981cd315011885203ad6a76e5a9262a31a1 Mon Sep 17 00:00:00 2001 From: chrisbell Date: Sat, 29 Nov 2025 10:30:17 -0600 Subject: [PATCH] Adding biolerplate for other pages --- SessionZero/App.axaml.cs | 2 +- SessionZero/MainWindow.axaml | 5 +++-- SessionZero/MainWindow.axaml.cs | 4 ++++ SessionZero/Pages/LibraryPage.axaml | 10 ++++++++++ SessionZero/Pages/LibraryPage.axaml.cs | 16 ++++++++++++++++ SessionZero/Pages/SettingsPage.axaml | 10 ++++++++++ SessionZero/Pages/SettingsPage.axaml.cs | 15 +++++++++++++++ SessionZero/SessionZero.sln.DotSettings.user | 1 + 8 files changed, 60 insertions(+), 3 deletions(-) create mode 100644 SessionZero/Pages/LibraryPage.axaml create mode 100644 SessionZero/Pages/LibraryPage.axaml.cs create mode 100644 SessionZero/Pages/SettingsPage.axaml create mode 100644 SessionZero/Pages/SettingsPage.axaml.cs diff --git a/SessionZero/App.axaml.cs b/SessionZero/App.axaml.cs index 31a9ad0..fdaa3d3 100644 --- a/SessionZero/App.axaml.cs +++ b/SessionZero/App.axaml.cs @@ -29,7 +29,7 @@ public partial class App : Application private void InitCogwheel() { - AppManager.CommandsManager.AddAssembly(Assembly.GetAssembly(typeof(DeafultCogwheelConsole))); + AppManager.CommandsManager.AddAssembly(Assembly.GetAssembly(typeof(CommandsManager))); AppManager.CommandsManager.AddAssembly(Assembly.GetExecutingAssembly()); COGWHEEL.Initialize(AppManager.CommandsManager, AppManager.SzConsole); } diff --git a/SessionZero/MainWindow.axaml b/SessionZero/MainWindow.axaml index 8de6474..29b4bbd 100644 --- a/SessionZero/MainWindow.axaml +++ b/SessionZero/MainWindow.axaml @@ -2,9 +2,10 @@ 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" + mc:Ignorable="d" d:DesignWidth="1200" d:DesignHeight="700" x:Class="SessionZero.MainWindow" - Title="SessionZero"> + Title="SessionZero" + Width="1200" Height="700" WindowStartupLocation="CenterOwner"> diff --git a/SessionZero/MainWindow.axaml.cs b/SessionZero/MainWindow.axaml.cs index b2eec1e..bae67f9 100644 --- a/SessionZero/MainWindow.axaml.cs +++ b/SessionZero/MainWindow.axaml.cs @@ -76,9 +76,13 @@ public partial class MainWindow : Window { var homePage = new HomePage(); var sessionsPage = new SessionsPage(); + var libraryPage = new LibraryPage(); + var settingsPage = new SettingsPage(); _pages.Add(homePage.PageName.ToLower(), homePage); _pages.Add(sessionsPage.PageName.ToLower(), sessionsPage); + _pages.Add(libraryPage.PageName.ToLower(), libraryPage); + _pages.Add(settingsPage.PageName.ToLower(), settingsPage); } private void SetupButtonEvents() diff --git a/SessionZero/Pages/LibraryPage.axaml b/SessionZero/Pages/LibraryPage.axaml new file mode 100644 index 0000000..ff6fa92 --- /dev/null +++ b/SessionZero/Pages/LibraryPage.axaml @@ -0,0 +1,10 @@ + + + + + diff --git a/SessionZero/Pages/LibraryPage.axaml.cs b/SessionZero/Pages/LibraryPage.axaml.cs new file mode 100644 index 0000000..a45e199 --- /dev/null +++ b/SessionZero/Pages/LibraryPage.axaml.cs @@ -0,0 +1,16 @@ +using Avalonia; +using Avalonia.Controls; +using Avalonia.Markup.Xaml; + +namespace SessionZero.Pages; + +public partial class LibraryPage : UserControl, IPageBase +{ + public string PageName { get; set; } = "Library"; + + public LibraryPage() + { + InitializeComponent(); + } + +} \ No newline at end of file diff --git a/SessionZero/Pages/SettingsPage.axaml b/SessionZero/Pages/SettingsPage.axaml new file mode 100644 index 0000000..71924bd --- /dev/null +++ b/SessionZero/Pages/SettingsPage.axaml @@ -0,0 +1,10 @@ + + + + + diff --git a/SessionZero/Pages/SettingsPage.axaml.cs b/SessionZero/Pages/SettingsPage.axaml.cs new file mode 100644 index 0000000..fdd6e98 --- /dev/null +++ b/SessionZero/Pages/SettingsPage.axaml.cs @@ -0,0 +1,15 @@ +using Avalonia; +using Avalonia.Controls; +using Avalonia.Markup.Xaml; + +namespace SessionZero.Pages; + +public partial class SettingsPage : UserControl, IPageBase +{ + public string PageName { get; set; } = "Settings"; + + public SettingsPage() + { + InitializeComponent(); + } +} \ No newline at end of file diff --git a/SessionZero/SessionZero.sln.DotSettings.user b/SessionZero/SessionZero.sln.DotSettings.user index 0b52355..6368e8e 100644 --- a/SessionZero/SessionZero.sln.DotSettings.user +++ b/SessionZero/SessionZero.sln.DotSettings.user @@ -1,4 +1,5 @@  ForceIncluded + ForceIncluded ForceIncluded ForceIncluded \ No newline at end of file