From 27746cbddd41e4acf478017036ddb03f2f351cd6 Mon Sep 17 00:00:00 2001 From: Timerix22 Date: Thu, 30 Jun 2022 22:06:33 +0300 Subject: [PATCH] avalonia client --- .gitignore | 1 + dtlauncher.sln | 6 + .../launcher-client-avalonia-win64.run.xml | 6 + launcher-client-avalonia/GUI/App.axaml | 18 ++ launcher-client-avalonia/GUI/App.axaml.cs | 24 ++ .../GUI/LauncherWindow.xaml | 223 ++++++++++++++++++ .../GUI/LauncherWindow.xaml.cs | 98 ++++++++ launcher-client-avalonia/GUI/MessageBox.axaml | 9 + .../GUI/MessageBox.axaml.cs | 19 ++ .../GUI/ProgramLabel.xaml | 30 +++ .../GUI/ProgramLabel.xaml.cs | 13 + .../GUI/ProgramSettingsPanelItem.xaml | 23 ++ .../GUI/ProgramSettingsPanelItem.xaml.cs | 41 ++++ launcher-client-avalonia/GUI/TabButton.cs | 11 + launcher-client-avalonia/Launcher.cs | 80 +++++++ launcher-client-avalonia/LauncherConfig.cs | 65 +++++ launcher-client-avalonia/LauncherLogger.cs | 36 +++ launcher-client-avalonia/MainWindow.axaml | 9 + launcher-client-avalonia/MainWindow.axaml.cs | 12 + launcher-client-avalonia/Program.cs | 86 +++++++ .../Resources/default.descriptor.template | 6 + .../Resources/launcher.dtsod | 6 + launcher-client-avalonia/Resources/logo-D.ico | Bin 0 -> 38078 bytes .../launcher-client-avalonia.csproj | 66 ++++++ 24 files changed, 888 insertions(+) create mode 100644 launcher-client-avalonia/.run/launcher-client-avalonia-win64.run.xml create mode 100644 launcher-client-avalonia/GUI/App.axaml create mode 100644 launcher-client-avalonia/GUI/App.axaml.cs create mode 100644 launcher-client-avalonia/GUI/LauncherWindow.xaml create mode 100644 launcher-client-avalonia/GUI/LauncherWindow.xaml.cs create mode 100644 launcher-client-avalonia/GUI/MessageBox.axaml create mode 100644 launcher-client-avalonia/GUI/MessageBox.axaml.cs create mode 100644 launcher-client-avalonia/GUI/ProgramLabel.xaml create mode 100644 launcher-client-avalonia/GUI/ProgramLabel.xaml.cs create mode 100644 launcher-client-avalonia/GUI/ProgramSettingsPanelItem.xaml create mode 100644 launcher-client-avalonia/GUI/ProgramSettingsPanelItem.xaml.cs create mode 100644 launcher-client-avalonia/GUI/TabButton.cs create mode 100644 launcher-client-avalonia/Launcher.cs create mode 100644 launcher-client-avalonia/LauncherConfig.cs create mode 100644 launcher-client-avalonia/LauncherLogger.cs create mode 100644 launcher-client-avalonia/MainWindow.axaml create mode 100644 launcher-client-avalonia/MainWindow.axaml.cs create mode 100644 launcher-client-avalonia/Program.cs create mode 100644 launcher-client-avalonia/Resources/default.descriptor.template create mode 100644 launcher-client-avalonia/Resources/launcher.dtsod create mode 100644 launcher-client-avalonia/Resources/logo-D.ico create mode 100644 launcher-client-avalonia/launcher-client-avalonia.csproj diff --git a/.gitignore b/.gitignore index 1e6cd00..62faaac 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ [Oo]ut/ [Ll]og/ [Ll]ogs/ +[Pp]ublish/ # IDE files .vs/ diff --git a/dtlauncher.sln b/dtlauncher.sln index 8e917a0..00f35c3 100644 --- a/dtlauncher.sln +++ b/dtlauncher.sln @@ -13,6 +13,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Files", "Solution README.md = README.md EndProjectSection EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "launcher-client-avalonia", "launcher-client-avalonia\launcher-client-avalonia.csproj", "{BC1FC2A0-159A-4F17-B076-B39775FB6AAC}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -27,6 +29,10 @@ Global {A1F770F3-F6B1-4854-9BF0-093F85064B88}.Debug|Any CPU.Build.0 = Debug|Any CPU {A1F770F3-F6B1-4854-9BF0-093F85064B88}.Release|Any CPU.ActiveCfg = Release|Any CPU {A1F770F3-F6B1-4854-9BF0-093F85064B88}.Release|Any CPU.Build.0 = Release|Any CPU + {BC1FC2A0-159A-4F17-B076-B39775FB6AAC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BC1FC2A0-159A-4F17-B076-B39775FB6AAC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BC1FC2A0-159A-4F17-B076-B39775FB6AAC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BC1FC2A0-159A-4F17-B076-B39775FB6AAC}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/launcher-client-avalonia/.run/launcher-client-avalonia-win64.run.xml b/launcher-client-avalonia/.run/launcher-client-avalonia-win64.run.xml new file mode 100644 index 0000000..ed656ef --- /dev/null +++ b/launcher-client-avalonia/.run/launcher-client-avalonia-win64.run.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/launcher-client-avalonia/GUI/App.axaml b/launcher-client-avalonia/GUI/App.axaml new file mode 100644 index 0000000..7aa35af --- /dev/null +++ b/launcher-client-avalonia/GUI/App.axaml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + diff --git a/launcher-client-avalonia/GUI/App.axaml.cs b/launcher-client-avalonia/GUI/App.axaml.cs new file mode 100644 index 0000000..0c89f07 --- /dev/null +++ b/launcher-client-avalonia/GUI/App.axaml.cs @@ -0,0 +1,24 @@ +using Avalonia; +using Avalonia.Controls.ApplicationLifetimes; +using Avalonia.Markup.Xaml; + +namespace launcher_client_avalonia +{ + 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/launcher-client-avalonia/GUI/LauncherWindow.xaml b/launcher-client-avalonia/GUI/LauncherWindow.xaml new file mode 100644 index 0000000..f75359c --- /dev/null +++ b/launcher-client-avalonia/GUI/LauncherWindow.xaml @@ -0,0 +1,223 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +