[성현모] DeviceManager, Factory 리팩토링, DIO, Scanner 추가
This commit is contained in:
@ -1,4 +1,8 @@
|
||||
using eCIAv2.WindowsApp.Services;
|
||||
using eCIAv2.Library.Config;
|
||||
using eCIAv2.Library.Devices;
|
||||
using eCIAv2.Library.Devices.DIIO;
|
||||
using eCIAv2.Library.Devices.Scanner;
|
||||
using eCIAv2.Library.Services;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@ -10,15 +14,18 @@ namespace eCIAv2.WindowsApp.ViewModels
|
||||
public class MainFromViewModel
|
||||
{
|
||||
private readonly ConfigService _configService;
|
||||
private readonly DeviceManager _deviceManager;
|
||||
|
||||
public MainFromViewModel(ConfigService configService)
|
||||
public MainFromViewModel(ConfigService configService, DeviceManager deviceManager)
|
||||
{
|
||||
_configService = configService;
|
||||
_deviceManager = deviceManager;
|
||||
}
|
||||
|
||||
public string LoadConfig()
|
||||
|
||||
public void TriggerCognex()
|
||||
{
|
||||
return _configService.LoadConfig();
|
||||
IScanner cognex = _deviceManager.GetDevice<IScanner>("Cognex1");
|
||||
var sss = cognex.Trigger();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user