correct constructor parameter names for plugin features

This commit is contained in:
Pilzinsel64
2024-07-16 10:14:45 +02:00
parent 8043d1fcf3
commit 4bb72c63b2
7 changed files with 15 additions and 16 deletions

View File

@@ -1,6 +1,5 @@
using Telerik.WinControls; using Telerik.WinControls;
using Telerik.WinControls.UI; using Telerik.WinControls.UI;
using static System.Runtime.InteropServices.JavaScript.JSType;
namespace Pilz.Plugins.Advanced.UI.Telerik; namespace Pilz.Plugins.Advanced.UI.Telerik;

View File

@@ -15,12 +15,12 @@ public abstract class RadPluginModule : PluginModule<RadPluginModuleUI>
set => base.Icon = value; set => base.Icon = value;
} }
protected RadPluginModule(string moduleType, string moduleIdentifier) : base(moduleType, moduleIdentifier) protected RadPluginModule(string type, string identifier) : base(type, identifier)
{ {
} }
protected RadPluginModule(string moduleType, string moduleIdentifier, string moduleName) : base(moduleType, moduleIdentifier, moduleName) protected RadPluginModule(string type, string identifier, string? name) : base(type, identifier, name)
{ {
} }

View File

@@ -5,12 +5,12 @@ namespace Pilz.Plugins.Advanced.UI;
public abstract class PluginModule : PluginModule<PluginModuleUI> public abstract class PluginModule : PluginModule<PluginModuleUI>
{ {
protected PluginModule(string moduleType, string moduleIdentifier) : base(moduleType, moduleIdentifier) protected PluginModule(string type, string identifier) : base(type, identifier)
{ {
} }
protected PluginModule(string moduleType, string moduleIdentifier, string moduleName) : base(moduleType, moduleIdentifier, moduleName) protected PluginModule(string type, string identifier, string? name) : base(type, identifier, name)
{ {
} }
@@ -19,7 +19,7 @@ public abstract class PluginModule : PluginModule<PluginModuleUI>
if (CreateNewUI(@params) is PluginModuleUI ui) if (CreateNewUI(@params) is PluginModuleUI ui)
{ {
ui.BackColor = Color.Transparent; ui.BackColor = Color.Transparent;
DialogBase.Show(ui, Name!, Image!.ToIcon()); DialogBase.Show(ui, Name!, Image!.ToIcon()!);
} }
} }
} }

View File

@@ -14,11 +14,11 @@ public abstract class PluginModule<TPluginModuleUI> : PluginModuleBase where TPl
set => base.Icon = value; set => base.Icon = value;
} }
protected PluginModule(string moduleType, string moduleIdentifier) : base(moduleType, moduleIdentifier) protected PluginModule(string type, string identifier) : base(type, identifier)
{ {
} }
protected PluginModule(string moduleType, string moduleIdentifier, string moduleName) : base(moduleType, moduleIdentifier, moduleName) protected PluginModule(string type, string identifier, string? name) : base(type, identifier, name)
{ {
} }

View File

@@ -45,15 +45,15 @@ public abstract class PluginFeature
/// </summary> /// </summary>
public virtual bool Enabled { get; set; } = true; public virtual bool Enabled { get; set; } = true;
protected PluginFeature(string featureType, string identifier) protected PluginFeature(string type, string identifier)
{ {
Identifier = identifier; Identifier = identifier;
Type = featureType; Type = type;
} }
protected PluginFeature(string featureType, string featureIdentifier, string? featureName) : this(featureType, featureIdentifier) protected PluginFeature(string type, string identifier, string? name) : this(type, identifier)
{ {
Name = featureName; Name = name;
} }
public static string GetFullIdentifier(string featureType, string identifier) public static string GetFullIdentifier(string featureType, string identifier)

View File

@@ -2,11 +2,11 @@
public abstract class PluginFunction : PluginFeature public abstract class PluginFunction : PluginFeature
{ {
protected PluginFunction(string functionType, string functionIdentifier) : base(functionType, functionIdentifier) protected PluginFunction(string type, string identifier) : base(type, identifier)
{ {
} }
protected PluginFunction(string functionType, string functionIdentifier, string? functionName) : base(functionType, functionIdentifier, functionName) protected PluginFunction(string type, string identifier, string? name) : base(type, identifier, name)
{ {
} }

View File

@@ -5,11 +5,11 @@ namespace Pilz.Plugins.Advanced;
[EditorBrowsable(EditorBrowsableState.Never)] [EditorBrowsable(EditorBrowsableState.Never)]
public abstract class PluginModuleBase : PluginFeature public abstract class PluginModuleBase : PluginFeature
{ {
protected PluginModuleBase(string moduleType, string moduleIdentifier) : base(moduleType, moduleIdentifier) protected PluginModuleBase(string type, string identifier) : base(type, identifier)
{ {
} }
protected PluginModuleBase(string moduleType, string moduleIdentifier, string moduleName) : base(moduleType, moduleIdentifier, moduleName) protected PluginModuleBase(string type, string identifier, string? name) : base(type, identifier, name)
{ {
} }
} }