iocommander input and virtual input
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
using VisionBuilder.UI.IOCommander.Interfaces;
|
||||
using VisionBuilder.UI.IOCommander.Settings;
|
||||
|
||||
namespace VisionBuilder.UI.IOCommander.Windows;
|
||||
|
||||
public class IOCommanderVirtualInputFactory: IIOCommanderFactory
|
||||
{
|
||||
private readonly VirtualInputSettings _settings;
|
||||
private readonly DefaultIOCommanderFactory _defaultFactory;
|
||||
|
||||
public IOCommanderVirtualInputFactory(VirtualInputSettings settings, IOCommanderSettings ioCommanderSettings)
|
||||
{
|
||||
_settings = settings;
|
||||
_defaultFactory = new DefaultIOCommanderFactory(ioCommanderSettings);
|
||||
}
|
||||
|
||||
public IIOCommander Create()
|
||||
{
|
||||
if (_settings.Enabled)
|
||||
{
|
||||
var res = new IOCommanderVirtualInput();
|
||||
res.Show();
|
||||
return res;
|
||||
}
|
||||
|
||||
return _defaultFactory.Create();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user