From 6e396d43952615416a38899ea22c00588fb4abdf Mon Sep 17 00:00:00 2001 From: Pilzinsel64 Date: Thu, 16 May 2024 10:35:08 +0200 Subject: [PATCH] =?UTF-8?q?Projektdateien=20hinzuf=C3=BCgen.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- OwnChar.App.Desktop.sln | 25 ++++ OwnChar.App.Desktop/App.config | 9 ++ OwnChar.App.Desktop/AppApi.cs | 12 ++ OwnChar.App.Desktop/AppPlugin.cs | 21 +++ .../OwnChar.App.Desktop.csproj | 30 +++++ OwnChar.App.Desktop/Program.cs | 32 +++++ .../UI/Windows/MainWindow.Designer.cs | 47 +++++++ OwnChar.App.Desktop/UI/Windows/MainWindow.cs | 21 +++ .../UI/Windows/MainWindow.resx | 120 ++++++++++++++++++ OwnChar.App.Desktop/app.manifest | 32 +++++ 10 files changed, 349 insertions(+) create mode 100644 OwnChar.App.Desktop.sln create mode 100644 OwnChar.App.Desktop/App.config create mode 100644 OwnChar.App.Desktop/AppApi.cs create mode 100644 OwnChar.App.Desktop/AppPlugin.cs create mode 100644 OwnChar.App.Desktop/OwnChar.App.Desktop.csproj create mode 100644 OwnChar.App.Desktop/Program.cs create mode 100644 OwnChar.App.Desktop/UI/Windows/MainWindow.Designer.cs create mode 100644 OwnChar.App.Desktop/UI/Windows/MainWindow.cs create mode 100644 OwnChar.App.Desktop/UI/Windows/MainWindow.resx create mode 100644 OwnChar.App.Desktop/app.manifest diff --git a/OwnChar.App.Desktop.sln b/OwnChar.App.Desktop.sln new file mode 100644 index 0000000..d5c5dab --- /dev/null +++ b/OwnChar.App.Desktop.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.9.34714.143 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OwnChar.App.Desktop", "OwnChar.App.Desktop\OwnChar.App.Desktop.csproj", "{EEFEA78C-1351-4829-9380-9B13FE46F3CC}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {EEFEA78C-1351-4829-9380-9B13FE46F3CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EEFEA78C-1351-4829-9380-9B13FE46F3CC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EEFEA78C-1351-4829-9380-9B13FE46F3CC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EEFEA78C-1351-4829-9380-9B13FE46F3CC}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {79CA908A-06E6-4006-9FA7-7C935A562AF3} + EndGlobalSection +EndGlobal diff --git a/OwnChar.App.Desktop/App.config b/OwnChar.App.Desktop/App.config new file mode 100644 index 0000000..de31089 --- /dev/null +++ b/OwnChar.App.Desktop/App.config @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/OwnChar.App.Desktop/AppApi.cs b/OwnChar.App.Desktop/AppApi.cs new file mode 100644 index 0000000..8ec813c --- /dev/null +++ b/OwnChar.App.Desktop/AppApi.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace OwnChar.App.Desktop +{ + public class AppApi + { + } +} diff --git a/OwnChar.App.Desktop/AppPlugin.cs b/OwnChar.App.Desktop/AppPlugin.cs new file mode 100644 index 0000000..1fe6a96 --- /dev/null +++ b/OwnChar.App.Desktop/AppPlugin.cs @@ -0,0 +1,21 @@ +using Pilz.Plugins; +using Pilz.Plugins.Advanced; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; + +namespace OwnChar.App.Desktop +{ + public class AppPlugin : IPlugin + { + public string Name => "OwnChar Desktop App"; + + public AppPlugin() + { + PluginFeatureController.Instance.RegisterAllOwn(); + } + } +} diff --git a/OwnChar.App.Desktop/OwnChar.App.Desktop.csproj b/OwnChar.App.Desktop/OwnChar.App.Desktop.csproj new file mode 100644 index 0000000..39d87bf --- /dev/null +++ b/OwnChar.App.Desktop/OwnChar.App.Desktop.csproj @@ -0,0 +1,30 @@ + + + + + + WinExe + net8.0-windows + true + app.manifest + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/OwnChar.App.Desktop/Program.cs b/OwnChar.App.Desktop/Program.cs new file mode 100644 index 0000000..d4b6662 --- /dev/null +++ b/OwnChar.App.Desktop/Program.cs @@ -0,0 +1,32 @@ +using OwnChar.App.Desktop.UI.Windows; +using Pilz.Plugins; +using System; +using System.IO; +using System.Linq; +using System.Windows.Forms; +using Telerik.WinControls; +using Telerik.WinControls.Themes; + +namespace OwnChar.App.Desktop +{ + internal static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + ThemeResolutionService.ApplicationThemeName = new Office2019LightTheme().ThemeName; + + var pluginPath = Path.Combine(Path.GetDirectoryName(Pilz.IO.Extensions.GetExecutablePath()), "Plugins"); + var plugins = Directory.GetDirectories(pluginPath, "*", SearchOption.TopDirectoryOnly).Select(n => Path.Combine(n, n + ".dll")).ToArray(); + PluginManager.Instance.LoadOwnPlugins(AppPlugin.Instance); + PluginManager.Instance.LoadPlugins(plugins, AppPlugin.Instance); + + Application.Run(new MainWindow()); + } + } +} \ No newline at end of file diff --git a/OwnChar.App.Desktop/UI/Windows/MainWindow.Designer.cs b/OwnChar.App.Desktop/UI/Windows/MainWindow.Designer.cs new file mode 100644 index 0000000..2e12e67 --- /dev/null +++ b/OwnChar.App.Desktop/UI/Windows/MainWindow.Designer.cs @@ -0,0 +1,47 @@ +namespace OwnChar.App.Desktop.UI.Windows +{ + partial class MainWindow + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + ((System.ComponentModel.ISupportInitialize)(this)).BeginInit(); + this.SuspendLayout(); + // + // RadForm1 + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.Name = "RadForm1"; + this.Text = "RadForm1"; + ((System.ComponentModel.ISupportInitialize)(this)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + } +} \ No newline at end of file diff --git a/OwnChar.App.Desktop/UI/Windows/MainWindow.cs b/OwnChar.App.Desktop/UI/Windows/MainWindow.cs new file mode 100644 index 0000000..85111a3 --- /dev/null +++ b/OwnChar.App.Desktop/UI/Windows/MainWindow.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; +using Telerik.WinControls; +using Telerik.WinControls.UI; + +namespace OwnChar.App.Desktop.UI.Windows +{ + public partial class MainWindow : RadForm + { + public MainWindow() + { + InitializeComponent(); + } + } +} diff --git a/OwnChar.App.Desktop/UI/Windows/MainWindow.resx b/OwnChar.App.Desktop/UI/Windows/MainWindow.resx new file mode 100644 index 0000000..7080a7d --- /dev/null +++ b/OwnChar.App.Desktop/UI/Windows/MainWindow.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/OwnChar.App.Desktop/app.manifest b/OwnChar.App.Desktop/app.manifest new file mode 100644 index 0000000..734cc0b --- /dev/null +++ b/OwnChar.App.Desktop/app.manifest @@ -0,0 +1,32 @@ + + + + + + + true/PM + + + + + + + + + + + + + + + + + + + + \ No newline at end of file