diff options
Diffstat (limited to 'src/main.lib/Plugins/Base/Options/StorePluginOptions.cs')
-rw-r--r-- | src/main.lib/Plugins/Base/Options/StorePluginOptions.cs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/main.lib/Plugins/Base/Options/StorePluginOptions.cs b/src/main.lib/Plugins/Base/Options/StorePluginOptions.cs new file mode 100644 index 0000000..d75b6e6 --- /dev/null +++ b/src/main.lib/Plugins/Base/Options/StorePluginOptions.cs @@ -0,0 +1,30 @@ +using PKISharp.WACS.Plugins.Interfaces; +using PKISharp.WACS.Services; +using PKISharp.WACS.Services.Serialization; +using System; + +namespace PKISharp.WACS.Plugins.Base.Options +{ + public class StorePluginOptions : PluginOptions + { + public bool KeepExisting { get; set; } + } + + public abstract class StorePluginOptions<T> : StorePluginOptions where T : IStorePlugin + { + public override abstract string Name { get; } + public override abstract string Description { get; } + + public override void Show(IInputService input) + { + input.Show("Store"); + input.Show("Plugin", $"{Name} - ({Description})", level: 1); + if (KeepExisting) + { + input.Show("KeepExisting", "Yes", level: 1); + } + } + + public override Type Instance => typeof(T); + } +} |