before candybox editor update
This commit is contained in:
36
Plugins/CandyboxPlugin/Plugin.cs
Normal file
36
Plugins/CandyboxPlugin/Plugin.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using CandyboxPlugin.Module;
|
||||
using Inspectron.Settings;
|
||||
using Ninject;
|
||||
using System.Reflection;
|
||||
using CandyboxPlugin.Modules.Barcode;
|
||||
using VisionBuilder.UI.Common;
|
||||
using VisionBuilder.UI.Common.Plugins;
|
||||
using VisionBuilder.UI.Common.Processing;
|
||||
using VisionBuilder.UI.Common.ViewModel.Interfaces.UI;
|
||||
|
||||
namespace CandyboxPlugin
|
||||
{
|
||||
public class Plugin: IPlugin
|
||||
{
|
||||
public void RegisterGlobalModules(IKernel kernel)
|
||||
{
|
||||
TypeConverterRegistry.Register<List<BarcodeRecipeMapping>>(new ListBarcodeRecipeMappingConverter());
|
||||
|
||||
kernel.Rebind<IRecipeCreationTool>().To<CandyboxRecipeCreationTool>().InSingletonScope();
|
||||
}
|
||||
|
||||
public void RegisterCameraModules(IKernel kernel, string cameraName)
|
||||
{
|
||||
kernel.Bind<CandyboxRecognitionControlSettings, ISettings>().ToConstant(new CandyboxRecognitionControlSettings(cameraName));
|
||||
|
||||
kernel.Rebind<IRecognitionControl>().To<CandyboxImageProcessingControl>().InSingletonScope();
|
||||
|
||||
kernel.Rebind<ILearningTool>().To<CandyboxLearningTool>().InSingletonScope();
|
||||
|
||||
kernel.Bind<CandyboxBarcodeReaderSettings, ISettings>()
|
||||
.ToConstant(new CandyboxBarcodeReaderSettings(cameraName));
|
||||
kernel.RegisterModule<CandyboxBarcodeReader>();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user