backward compatibility
This commit is contained in:
@@ -24,9 +24,9 @@ public abstract class PluginModule : PluginModule<PluginModuleUI>
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void ShowUI(PluginFunctionParameter parameter)
|
public override void ShowUI(PluginFunctionParameter? @params)
|
||||||
{
|
{
|
||||||
if (CreateNewUI(parameter) is PluginModuleUI ui)
|
if (CreateNewUI(@params) is PluginModuleUI ui)
|
||||||
{
|
{
|
||||||
ui.BackColor = Color.Transparent;
|
ui.BackColor = Color.Transparent;
|
||||||
DialogBase.Show(ui, Name!, SvgImage!.ToImage().ToIcon()!);
|
DialogBase.Show(ui, Name!, SvgImage!.ToImage().ToIcon()!);
|
||||||
|
|||||||
@@ -31,16 +31,26 @@ public abstract class PluginModule<TPluginModuleUI> : PluginModuleBase where TPl
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void ShowUI(PluginFunctionParameter parameter)
|
public virtual void ShowUI()
|
||||||
|
{
|
||||||
|
ShowUI(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public virtual void ShowUI(PluginFunctionParameter? @params)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual TPluginModuleUI CreateUI(PluginFunctionParameter parameter)
|
public virtual TPluginModuleUI CreateUI()
|
||||||
{
|
{
|
||||||
var ui = CreateNewUI(parameter);
|
return CreateUI(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public virtual TPluginModuleUI CreateUI(PluginFunctionParameter? @params)
|
||||||
|
{
|
||||||
|
var ui = CreateNewUI(@params);
|
||||||
OnUICreated?.Invoke(this, ui);
|
OnUICreated?.Invoke(this, ui);
|
||||||
return ui;
|
return ui;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected abstract TPluginModuleUI CreateNewUI(PluginFunctionParameter parameter);
|
protected abstract TPluginModuleUI CreateNewUI(PluginFunctionParameter? @params);
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user