From e6bf6f5091caf3b4366894643671bc4586794cda Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Mon, 22 Jun 2026 06:15:44 +0800 Subject: feat: add GUI manager and integrate into build pipeline --- manager/.gitignore | 3 +++ manager/App.axaml | 10 ++++++++++ manager/App.axaml.cs | 23 +++++++++++++++++++++++ manager/MainWindow.axaml | 9 +++++++++ manager/MainWindow.axaml.cs | 11 +++++++++++ manager/Program.cs | 21 +++++++++++++++++++++ manager/app.manifest | 18 ++++++++++++++++++ manager/launcher/dmvop-gui.exe | Bin 0 -> 393728 bytes manager/manager.csproj | 22 ++++++++++++++++++++++ 9 files changed, 117 insertions(+) create mode 100644 manager/.gitignore create mode 100644 manager/App.axaml create mode 100644 manager/App.axaml.cs create mode 100644 manager/MainWindow.axaml create mode 100644 manager/MainWindow.axaml.cs create mode 100644 manager/Program.cs create mode 100644 manager/app.manifest create mode 100644 manager/launcher/dmvop-gui.exe create mode 100644 manager/manager.csproj (limited to 'manager') diff --git a/manager/.gitignore b/manager/.gitignore new file mode 100644 index 0000000..df1d0c9 --- /dev/null +++ b/manager/.gitignore @@ -0,0 +1,3 @@ +bin +obj +publish diff --git a/manager/App.axaml b/manager/App.axaml new file mode 100644 index 0000000..d9eaaee --- /dev/null +++ b/manager/App.axaml @@ -0,0 +1,10 @@ + + + + + + + \ No newline at end of file diff --git a/manager/App.axaml.cs b/manager/App.axaml.cs new file mode 100644 index 0000000..814a7de --- /dev/null +++ b/manager/App.axaml.cs @@ -0,0 +1,23 @@ +using Avalonia; +using Avalonia.Controls.ApplicationLifetimes; +using Avalonia.Markup.Xaml; + +namespace manager; + +public partial class App : Application +{ + public override void Initialize() + { + AvaloniaXamlLoader.Load(this); + } + + public override void OnFrameworkInitializationCompleted() + { + if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop) + { + desktop.MainWindow = new MainWindow(); + } + + base.OnFrameworkInitializationCompleted(); + } +} \ No newline at end of file diff --git a/manager/MainWindow.axaml b/manager/MainWindow.axaml new file mode 100644 index 0000000..1aa61b8 --- /dev/null +++ b/manager/MainWindow.axaml @@ -0,0 +1,9 @@ + + Welcome to Avalonia! + diff --git a/manager/MainWindow.axaml.cs b/manager/MainWindow.axaml.cs new file mode 100644 index 0000000..82d8dc2 --- /dev/null +++ b/manager/MainWindow.axaml.cs @@ -0,0 +1,11 @@ +using Avalonia.Controls; + +namespace manager; + +public partial class MainWindow : Window +{ + public MainWindow() + { + InitializeComponent(); + } +} \ No newline at end of file diff --git a/manager/Program.cs b/manager/Program.cs new file mode 100644 index 0000000..c2f6e74 --- /dev/null +++ b/manager/Program.cs @@ -0,0 +1,21 @@ +using Avalonia; +using System; + +namespace manager; + +class Program +{ + // Initialization code. Don't use any Avalonia, third-party APIs or any + // SynchronizationContext-reliant code before AppMain is called: things aren't initialized + // yet and stuff might break. + [STAThread] + public static void Main(string[] args) => BuildAvaloniaApp() + .StartWithClassicDesktopLifetime(args); + + // Avalonia configuration, don't remove; also used by visual designer. + public static AppBuilder BuildAvaloniaApp() + => AppBuilder.Configure() + .UsePlatformDetect() + .WithInterFont() + .LogToTrace(); +} diff --git a/manager/app.manifest b/manager/app.manifest new file mode 100644 index 0000000..b22c3d2 --- /dev/null +++ b/manager/app.manifest @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + diff --git a/manager/launcher/dmvop-gui.exe b/manager/launcher/dmvop-gui.exe new file mode 100644 index 0000000..56a7f39 Binary files /dev/null and b/manager/launcher/dmvop-gui.exe differ diff --git a/manager/manager.csproj b/manager/manager.csproj new file mode 100644 index 0000000..e21a361 --- /dev/null +++ b/manager/manager.csproj @@ -0,0 +1,22 @@ + + + WinExe + net9.0 + enable + true + app.manifest + true + + + + + + + + + + None + All + + + -- cgit