change UI to UI.WinForms
This commit is contained in:
35
Pilz.Plugins.Advanced.UI.WinForms.Telerik/RadPluginModule.cs
Normal file
35
Pilz.Plugins.Advanced.UI.WinForms.Telerik/RadPluginModule.cs
Normal 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()!);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user