prefix Telerik-based type names with "Rad"

This commit is contained in:
2024-06-10 09:48:53 +02:00
parent 99a327f4ed
commit 9e8ca9140f
14 changed files with 56 additions and 48 deletions

View File

@@ -0,0 +1,35 @@
using Pilz.UI.Telerik;
using Pilz.UI.Telerik.Dialogs;
using Telerik.WinControls;
namespace Pilz.Plugins.Advanced.UI.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 moduleType, string moduleIdentifier) : base(moduleType, moduleIdentifier)
{
}
protected RadPluginModule(string moduleType, string moduleIdentifier, string moduleName) : base(moduleType, moduleIdentifier, moduleName)
{
}
public override void ShowUI(PluginFunctionParameter? @params)
{
if (CreateNewUI(@params) is RadPluginModuleUI ui)
{
ui.BackColor = Color.Transparent;
RadDialogBase.Show(ui, Name!, SvgImage!.ToImage().ToIcon()!);
}
}
}