rename Pilz.Plugins.Advanced to Pilz.Features

This commit is contained in:
Pilzinsel64
2025-11-06 11:49:46 +01:00
parent 8bc09d9a59
commit fb42b0675b
37 changed files with 66 additions and 50 deletions

View File

@@ -0,0 +1,37 @@
using Pilz.Features;
using Pilz.UI.WinForms.Features;
using Pilz.UI.WinForms.Telerik.Dialogs;
using Pilz.UI.WinForms.Telerik.Extensions;
using Telerik.WinControls;
namespace Pilz.UI.WinForms.Telerik.Features;
public abstract class RadPluginModule : PluginModule<RadPluginModuleUI>
{
/// <summary>
/// Wrapper for the <see cref="PluginFeature.Icon"/> property to directly use it as <see cref="RadSvgImage"/>.
/// </summary>
public RadSvgImage? SvgImage
{
get => base.Icon as RadSvgImage;
set => base.Icon = value;
}
protected RadPluginModule(string type, string identifier) : base(type, identifier)
{
}
protected RadPluginModule(string type, string identifier, string? name) : base(type, identifier, name)
{
}
public override void ShowUI(PluginFunctionParameter? @params)
{
if (CreateNewUI(@params) is RadPluginModuleUI ui)
{
ui.BackColor = Color.Transparent;
RadDialogBase.Show(ui, Name!, SvgImage!.ToImage().ToIcon()!);
}
}
}