change UI to UI.WinForms

This commit is contained in:
2025-06-16 11:50:17 +02:00
parent fa3a9da07e
commit 299867a910
116 changed files with 318 additions and 319 deletions

View File

@@ -0,0 +1,35 @@
using Pilz.UI.Telerik.Dialogs;
using Pilz.UI.WinForms.Telerik.Extensions;
using Telerik.WinControls;
namespace Pilz.Plugins.Advanced.UI.WinForms.Telerik;
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()!);
}
}
}