recipe name filter
This commit is contained in:
@@ -4,4 +4,6 @@ public enum EGPIOCommand
|
||||
{
|
||||
Start,
|
||||
Stop,
|
||||
Pause,
|
||||
Resume,
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
using Ninject.Extensions.ChildKernel;
|
||||
using Ninject;
|
||||
using Ninject.Extensions.ChildKernel;
|
||||
using System.ComponentModel;
|
||||
using Ninject;
|
||||
using System.Reflection;
|
||||
using VisionBuilder.UI.Common;
|
||||
using VisionBuilder.UI.IOCommander.Interfaces;
|
||||
using VisionBuilder.UI.IOCommander.Modules;
|
||||
@@ -14,7 +15,6 @@ public static class ModuleExtensions
|
||||
{
|
||||
// for settings to work properly
|
||||
TypeDescriptor.AddAttributes(typeof(List<IOCommanderPinAction>), new TypeConverterAttribute(typeof(IOCommanderPinActionListConverter)));
|
||||
|
||||
TypeDescriptor.AddAttributes(typeof(List<IOCommanderCommand>), new TypeConverterAttribute(typeof(IOCommanderCommandListConverter)));
|
||||
|
||||
List<IOCommanderCameraSettings> cameras = cameraNames.Select(name => new IOCommanderCameraSettings(name)).ToList();
|
||||
|
||||
@@ -49,6 +49,19 @@ public class IOCommanderCameraModule: IVisionBuilderModule
|
||||
_cameraVm.StopCommand.Execute(null);
|
||||
}
|
||||
break;
|
||||
|
||||
case EGPIOCommand.Pause:
|
||||
if(_cameraVm.PauseCommand.CanExecute(null))
|
||||
{
|
||||
_cameraVm.PauseCommand.Execute(null);
|
||||
}
|
||||
break;
|
||||
case EGPIOCommand.Resume:
|
||||
if(_cameraVm.ResumeCommand.CanExecute(null))
|
||||
{
|
||||
_cameraVm.ResumeCommand.Execute(null);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException(nameof(command), command, null);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Concurrent;
|
||||
using Serilog;
|
||||
using VisionBuilder.UI.Common;
|
||||
using VisionBuilder.UI.Common.Commands;
|
||||
using VisionBuilder.UI.Common.RecipeProcessing;
|
||||
@@ -25,8 +26,17 @@ public class IOCommanderModule:IVisionBuilderModule
|
||||
|
||||
public void InitializeModule()
|
||||
{
|
||||
_ioCommander = _factory.Create();
|
||||
_ioCommander.OnPinChanged += OnPinChanged;
|
||||
try
|
||||
{
|
||||
_ioCommander = _factory.Create();
|
||||
_ioCommander.OnPinChanged += OnPinChanged;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Warning("IOCommander did non load: {e}",e);
|
||||
_ioCommander= null;
|
||||
}
|
||||
|
||||
|
||||
if (_settings.ShowDebugView)_debugViewService.ShowDebugView();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user