PluginFeature
This commit is contained in:
@@ -6,19 +6,13 @@ using Telerik.WinControls;
|
||||
|
||||
namespace Pilz.Plugins.Advanced
|
||||
{
|
||||
public abstract class PluginModule
|
||||
public abstract class PluginModule : PluginFeature
|
||||
{
|
||||
public string Type { get; init; }
|
||||
public string Name { get; init; }
|
||||
public RadSvgImage? Icon { get; set; }
|
||||
public bool Visible { get; set; } = true;
|
||||
public bool RequiresRomManager { get; set; } = true;
|
||||
public bool AllowEmbedding { get; set; } = true;
|
||||
|
||||
protected PluginModule(string moduleType, string moduleName)
|
||||
protected PluginModule(string moduleType, string moduleName) : base(moduleType, moduleName)
|
||||
{
|
||||
Type = moduleType;
|
||||
Name = moduleName;
|
||||
}
|
||||
|
||||
public virtual void ShowUI()
|
||||
@@ -26,11 +20,11 @@ namespace Pilz.Plugins.Advanced
|
||||
if (CreateNewUI() is PluginModuleUI ui)
|
||||
{
|
||||
ui.BackColor = Color.Transparent;
|
||||
DialogBaseForm.Show(ui, Name, Icon!.ToImage().ToIcon()!);
|
||||
DialogBaseForm.Show(ui, Name!, Icon!.ToImage().ToIcon()!);
|
||||
}
|
||||
}
|
||||
|
||||
public PluginModuleUI CreateUI()
|
||||
public virtual PluginModuleUI CreateUI()
|
||||
{
|
||||
return CreateNewUI();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user