plugin shit
This commit is contained in:
@@ -5,6 +5,10 @@ VisualStudioVersion = 17.9.34714.143
|
|||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
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}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OwnChar.App.Desktop", "OwnChar.App.Desktop\OwnChar.App.Desktop.csproj", "{EEFEA78C-1351-4829-9380-9B13FE46F3CC}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OwnChar", "OwnChar\OwnChar\OwnChar.csproj", "{CEB99D50-9DE4-4E0B-BD18-A2F0D1BA7109}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OwnChar.Plugins", "OwnChar.Plugins\OwnChar.Plugins\OwnChar.Plugins.csproj", "{FC64EE8F-D2F8-4AAD-A967-D64A84C2CC90}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
@@ -15,6 +19,14 @@ Global
|
|||||||
{EEFEA78C-1351-4829-9380-9B13FE46F3CC}.Debug|Any CPU.Build.0 = 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.ActiveCfg = Release|Any CPU
|
||||||
{EEFEA78C-1351-4829-9380-9B13FE46F3CC}.Release|Any CPU.Build.0 = Release|Any CPU
|
{EEFEA78C-1351-4829-9380-9B13FE46F3CC}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{CEB99D50-9DE4-4E0B-BD18-A2F0D1BA7109}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{CEB99D50-9DE4-4E0B-BD18-A2F0D1BA7109}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{CEB99D50-9DE4-4E0B-BD18-A2F0D1BA7109}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{CEB99D50-9DE4-4E0B-BD18-A2F0D1BA7109}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{FC64EE8F-D2F8-4AAD-A967-D64A84C2CC90}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{FC64EE8F-D2F8-4AAD-A967-D64A84C2CC90}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{FC64EE8F-D2F8-4AAD-A967-D64A84C2CC90}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{FC64EE8F-D2F8-4AAD-A967-D64A84C2CC90}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
|||||||
@@ -6,7 +6,8 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
namespace OwnChar.App.Desktop
|
namespace OwnChar.App.Desktop
|
||||||
{
|
{
|
||||||
public class AppApi
|
public sealed class AppApi
|
||||||
{
|
{
|
||||||
|
public AppApi Instance = new();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,21 +1,24 @@
|
|||||||
using Pilz.Plugins;
|
using OwnChar.Plugins;
|
||||||
using Pilz.Plugins.Advanced;
|
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
|
namespace OwnChar.App.Desktop
|
||||||
{
|
{
|
||||||
public class AppPlugin : IPlugin
|
public class AppPlugin : IOwnCharPlugin
|
||||||
{
|
{
|
||||||
|
public static AppPlugin? Instance { get; private set; }
|
||||||
|
|
||||||
|
public string ID => "OwnChar.App.Desktop";
|
||||||
public string Name => "OwnChar Desktop App";
|
public string Name => "OwnChar Desktop App";
|
||||||
|
|
||||||
public AppPlugin()
|
public AppPlugin()
|
||||||
{
|
{
|
||||||
|
Instance = this;
|
||||||
PluginFeatureController.Instance.RegisterAllOwn();
|
PluginFeatureController.Instance.RegisterAllOwn();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public object? GetApi()
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
13
OwnChar.App.Desktop/FeatureCodes.cs
Normal file
13
OwnChar.App.Desktop/FeatureCodes.cs
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace OwnChar.App.Desktop
|
||||||
|
{
|
||||||
|
public static class FeatureCodes
|
||||||
|
{
|
||||||
|
public const string MainTab = "ownchar.app.desktop.main.tab";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -7,13 +7,14 @@
|
|||||||
<TargetFramework>net8.0-windows</TargetFramework>
|
<TargetFramework>net8.0-windows</TargetFramework>
|
||||||
<UseWindowsForms>true</UseWindowsForms>
|
<UseWindowsForms>true</UseWindowsForms>
|
||||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Pilz.Configuration" Version="3.1.2" />
|
<PackageReference Include="Pilz.Configuration" Version="3.1.2" />
|
||||||
<PackageReference Include="Pilz.Cryptography" Version="2.0.1" />
|
<PackageReference Include="Pilz.Cryptography" Version="2.0.1" />
|
||||||
<PackageReference Include="Pilz.IO" Version="2.0.0" />
|
<PackageReference Include="Pilz.IO" Version="2.0.0" />
|
||||||
<PackageReference Include="Pilz.Plugins" Version="2.1.5" />
|
<PackageReference Include="Pilz.Plugins" Version="2.1.8" />
|
||||||
<PackageReference Include="Pilz.Plugins.Advanced" Version="2.7.3" />
|
<PackageReference Include="Pilz.Plugins.Advanced" Version="2.7.3" />
|
||||||
<PackageReference Include="Pilz.Plugins.Advanced.UI" Version="1.0.0" />
|
<PackageReference Include="Pilz.Plugins.Advanced.UI" Version="1.0.0" />
|
||||||
<PackageReference Include="Pilz.Plugins.Advanced.UI.Telerik" Version="1.1.0" />
|
<PackageReference Include="Pilz.Plugins.Advanced.UI.Telerik" Version="1.1.0" />
|
||||||
@@ -21,7 +22,8 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Folder Include="UI\Controls\" />
|
<ProjectReference Include="..\OwnChar.Plugins\OwnChar.Plugins\OwnChar.Plugins.csproj" />
|
||||||
|
<ProjectReference Include="..\OwnChar\OwnChar\OwnChar.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ProjectExtensions><VisualStudio><UserProperties ShouldAddDPIScalingManifest="" /></VisualStudio></ProjectExtensions>
|
<ProjectExtensions><VisualStudio><UserProperties ShouldAddDPIScalingManifest="" /></VisualStudio></ProjectExtensions>
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
using OwnChar.App.Desktop.UI.Windows;
|
using OwnChar.App.Desktop.UI.Windows;
|
||||||
|
using OwnChar.Plugins;
|
||||||
using Pilz.Plugins;
|
using Pilz.Plugins;
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Reflection;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Telerik.WinControls;
|
using Telerik.WinControls;
|
||||||
using Telerik.WinControls.Themes;
|
using Telerik.WinControls.Themes;
|
||||||
@@ -21,10 +23,13 @@ namespace OwnChar.App.Desktop
|
|||||||
Application.SetCompatibleTextRenderingDefault(false);
|
Application.SetCompatibleTextRenderingDefault(false);
|
||||||
ThemeResolutionService.ApplicationThemeName = new Office2019LightTheme().ThemeName;
|
ThemeResolutionService.ApplicationThemeName = new Office2019LightTheme().ThemeName;
|
||||||
|
|
||||||
var pluginPath = Path.Combine(Path.GetDirectoryName(Pilz.IO.Extensions.GetExecutablePath()), "Plugins");
|
OwnCharPlugins.Instance.LoadOwnPlugins();
|
||||||
|
var pluginPath = Path.Combine(Path.GetDirectoryName(Pilz.IO.Extensions.GetExecutablePath())!, "Plugins");
|
||||||
|
if (Directory.Exists(pluginPath))
|
||||||
|
{
|
||||||
var plugins = Directory.GetDirectories(pluginPath, "*", SearchOption.TopDirectoryOnly).Select(n => Path.Combine(n, n + ".dll")).ToArray();
|
var plugins = Directory.GetDirectories(pluginPath, "*", SearchOption.TopDirectoryOnly).Select(n => Path.Combine(n, n + ".dll")).ToArray();
|
||||||
PluginManager.Instance.LoadOwnPlugins(AppPlugin.Instance);
|
OwnCharPlugins.Instance.LoadPlugins(plugins);
|
||||||
PluginManager.Instance.LoadPlugins(plugins, AppPlugin.Instance);
|
}
|
||||||
|
|
||||||
Application.Run(new MainWindow());
|
Application.Run(new MainWindow());
|
||||||
}
|
}
|
||||||
|
|||||||
37
OwnChar.App.Desktop/UI/MainTabs/TabCharList.Designer.cs
generated
Normal file
37
OwnChar.App.Desktop/UI/MainTabs/TabCharList.Designer.cs
generated
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
namespace OwnChar.App.Desktop.UI.MainTabs
|
||||||
|
{
|
||||||
|
partial class TabCharList
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Erforderliche Designervariable.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Verwendete Ressourcen bereinigen.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Vom Komponenten-Designer generierter Code
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Erforderliche Methode für die Designerunterstützung.
|
||||||
|
/// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
components = new System.ComponentModel.Container();
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
22
OwnChar.App.Desktop/UI/MainTabs/TabCharList.cs
Normal file
22
OwnChar.App.Desktop/UI/MainTabs/TabCharList.cs
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
using Pilz.Plugins.Advanced.UI.Telerik;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace OwnChar.App.Desktop.UI.MainTabs
|
||||||
|
{
|
||||||
|
public partial class TabCharList : PluginModuleUI
|
||||||
|
{
|
||||||
|
public TabCharList()
|
||||||
|
{
|
||||||
|
ActionPanelVisible = false;
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
120
OwnChar.App.Desktop/UI/MainTabs/TabCharList.resx
Normal file
120
OwnChar.App.Desktop/UI/MainTabs/TabCharList.resx
Normal file
@@ -0,0 +1,120 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
||||||
20
OwnChar.App.Desktop/UI/MainTabs/TabCharListFeature.cs
Normal file
20
OwnChar.App.Desktop/UI/MainTabs/TabCharListFeature.cs
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
using Pilz.Plugins.Advanced;
|
||||||
|
using Pilz.Plugins.Advanced.UI.Telerik;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace OwnChar.App.Desktop.UI.MainTabs
|
||||||
|
{
|
||||||
|
internal class TabCharListFeature() : PluginModule(FeatureCodes.MainTab, "ownchar.tabcharlist", "Character list"), IPluginFeatureProvider<TabCharListFeature>
|
||||||
|
{
|
||||||
|
public static TabCharListFeature Instance { get; } = new();
|
||||||
|
|
||||||
|
protected override PluginModuleUI CreateNewUI()
|
||||||
|
{
|
||||||
|
return new TabCharList();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
37
OwnChar.App.Desktop/UI/MainTabs/TabEditChar.Designer.cs
generated
Normal file
37
OwnChar.App.Desktop/UI/MainTabs/TabEditChar.Designer.cs
generated
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
namespace OwnChar.App.Desktop.UI.MainTabs
|
||||||
|
{
|
||||||
|
partial class TabEditChar
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Erforderliche Designervariable.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Verwendete Ressourcen bereinigen.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Vom Komponenten-Designer generierter Code
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Erforderliche Methode für die Designerunterstützung.
|
||||||
|
/// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
components = new System.ComponentModel.Container();
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
22
OwnChar.App.Desktop/UI/MainTabs/TabEditChar.cs
Normal file
22
OwnChar.App.Desktop/UI/MainTabs/TabEditChar.cs
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
using Pilz.Plugins.Advanced.UI.Telerik;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace OwnChar.App.Desktop.UI.MainTabs
|
||||||
|
{
|
||||||
|
public partial class TabEditChar : PluginModuleUI
|
||||||
|
{
|
||||||
|
public TabEditChar()
|
||||||
|
{
|
||||||
|
ActionPanelVisible = false;
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
120
OwnChar.App.Desktop/UI/MainTabs/TabEditChar.resx
Normal file
120
OwnChar.App.Desktop/UI/MainTabs/TabEditChar.resx
Normal file
@@ -0,0 +1,120 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
||||||
20
OwnChar.App.Desktop/UI/MainTabs/TabEditCharFeature.cs
Normal file
20
OwnChar.App.Desktop/UI/MainTabs/TabEditCharFeature.cs
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
using Pilz.Plugins.Advanced;
|
||||||
|
using Pilz.Plugins.Advanced.UI.Telerik;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace OwnChar.App.Desktop.UI.MainTabs
|
||||||
|
{
|
||||||
|
internal class TabEditCharFeature() : PluginModule(FeatureCodes.MainTab, "ownchar.tabcharedit", "Edit Character"), IPluginFeatureProvider<TabEditCharFeature>
|
||||||
|
{
|
||||||
|
public static TabEditCharFeature Instance { get; } = new();
|
||||||
|
|
||||||
|
protected override PluginModuleUI CreateNewUI()
|
||||||
|
{
|
||||||
|
return new TabEditChar();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -28,20 +28,50 @@
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
|
radMenu1 = new Telerik.WinControls.UI.RadMenu();
|
||||||
this.SuspendLayout();
|
radMenuItem1 = new Telerik.WinControls.UI.RadMenuItem();
|
||||||
|
radMenuItem2 = new Telerik.WinControls.UI.RadMenuItem();
|
||||||
|
((System.ComponentModel.ISupportInitialize)radMenu1).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)this).BeginInit();
|
||||||
|
SuspendLayout();
|
||||||
//
|
//
|
||||||
// RadForm1
|
// radMenu1
|
||||||
//
|
//
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
radMenu1.Items.AddRange(new Telerik.WinControls.RadItem[] { radMenuItem1, radMenuItem2 });
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
radMenu1.Location = new System.Drawing.Point(0, 0);
|
||||||
this.Name = "RadForm1";
|
radMenu1.Name = "radMenu1";
|
||||||
this.Text = "RadForm1";
|
radMenu1.Size = new System.Drawing.Size(292, 25);
|
||||||
((System.ComponentModel.ISupportInitialize)(this)).EndInit();
|
radMenu1.TabIndex = 0;
|
||||||
this.ResumeLayout(false);
|
//
|
||||||
|
// radMenuItem1
|
||||||
|
//
|
||||||
|
radMenuItem1.Name = "radMenuItem1";
|
||||||
|
radMenuItem1.Text = "Datei";
|
||||||
|
//
|
||||||
|
// radMenuItem2
|
||||||
|
//
|
||||||
|
radMenuItem2.Name = "radMenuItem2";
|
||||||
|
radMenuItem2.Text = "Modules";
|
||||||
|
//
|
||||||
|
// MainWindow
|
||||||
|
//
|
||||||
|
AutoScaleBaseSize = new System.Drawing.Size(7, 15);
|
||||||
|
AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||||
|
AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
ClientSize = new System.Drawing.Size(292, 270);
|
||||||
|
Controls.Add(radMenu1);
|
||||||
|
Name = "MainWindow";
|
||||||
|
Text = "RadForm1";
|
||||||
|
((System.ComponentModel.ISupportInitialize)radMenu1).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)this).EndInit();
|
||||||
|
ResumeLayout(false);
|
||||||
|
PerformLayout();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
private Telerik.WinControls.UI.RadMenu radMenu1;
|
||||||
|
private Telerik.WinControls.UI.RadMenuItem radMenuItem1;
|
||||||
|
private Telerik.WinControls.UI.RadMenuItem radMenuItem2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,7 @@
|
|||||||
using System;
|
using Pilz.Plugins.Advanced;
|
||||||
|
using Pilz.Plugins.Advanced.UI.Telerik;
|
||||||
|
using Pilz.UI.Telerik.Dialogs;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
@@ -16,6 +19,13 @@ namespace OwnChar.App.Desktop.UI.Windows
|
|||||||
public MainWindow()
|
public MainWindow()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
PluginFeatureController.Instance.Features.Get(FeatureCodes.MainTab).InsertItemsTo(radMenuItem2.Items, customClickHandler: MainTabItem_Clicked);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void MainTabItem_Clicked(object? sender, EventArgs e)
|
||||||
|
{
|
||||||
|
//if (sender is RadMenuItem item && item.Tag is PluginModule module)
|
||||||
|
//...Add() ... module.CreateUI(), "Titel", null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user