Page navigation, CogwheelConsole

This commit is contained in:
2025-11-29 00:35:35 -06:00
parent e1502b21ad
commit c8a7ec0f09
15 changed files with 328 additions and 7 deletions

41
SessionZero/AppManager.cs Normal file
View File

@@ -0,0 +1,41 @@
using Cogwheel;
using SessionZero.Cogwheel;
namespace SessionZero;
public static class AppManager
{
public static MainWindow MainWindow { get; set; }
public static ICogwheelConsole SzConsole { get; } = new SessionZeroConsole();
public static CommandsManager CommandsManager { get; } = new();
public static ConsoleControl ConsoleControl { get; } = new();
public static void ShowConsole()
{
MainWindow.ToggleConsole(true);
}
public static void HideConsole()
{
MainWindow.ToggleConsole(false);
}
// -- Global Commands -- //
[Command(Name = "exit", Description = "Hides the console")]
public static void ExitConsole()
{
SzConsole.Exit();
}
[Command(Name = "page", Description = "Change the current page to the given value, if it exists")]
public static void ChangePage(string pageName)
{
MainWindow.ChangePage(pageName);
}
[Command(Name = "err")]
public static void ErrTest(string message)
{
COGWHEEL.LogError(message);
}
}