|
|
@ -43,9 +43,12 @@ namespace SlnMesnac.WPF.ViewModel.IndexPage
|
|
|
|
{
|
|
|
|
{
|
|
|
|
private ILogger<IndexContentViewModel> _logger;
|
|
|
|
private ILogger<IndexContentViewModel> _logger;
|
|
|
|
private ILogger<BaseTaskInfoBusiness> _taskBusinessLogger;
|
|
|
|
private ILogger<BaseTaskInfoBusiness> _taskBusinessLogger;
|
|
|
|
|
|
|
|
private ILogger<BaseStateRefreshBusiness> _stateBusinessLogger;
|
|
|
|
private IAirportTaskService _taskservice;
|
|
|
|
private IAirportTaskService _taskservice;
|
|
|
|
private IAGVStateService _agvstateService;
|
|
|
|
private IAGVStateService _agvstateService;
|
|
|
|
|
|
|
|
private IManipulatorStateService _monipulatorstateService;
|
|
|
|
private BaseTaskInfoBusiness _taskInfoBusiness;
|
|
|
|
private BaseTaskInfoBusiness _taskInfoBusiness;
|
|
|
|
|
|
|
|
private BaseStateRefreshBusiness _StateRefreshBusiness;
|
|
|
|
private DispatcherTimer _timer;
|
|
|
|
private DispatcherTimer _timer;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -56,7 +59,9 @@ namespace SlnMesnac.WPF.ViewModel.IndexPage
|
|
|
|
_taskBusinessLogger = App.ServiceProvider.GetService<ILogger<BaseTaskInfoBusiness>>();
|
|
|
|
_taskBusinessLogger = App.ServiceProvider.GetService<ILogger<BaseTaskInfoBusiness>>();
|
|
|
|
_taskservice = App.ServiceProvider.GetService<IAirportTaskService>();
|
|
|
|
_taskservice = App.ServiceProvider.GetService<IAirportTaskService>();
|
|
|
|
_agvstateService = App.ServiceProvider.GetService<IAGVStateService>();
|
|
|
|
_agvstateService = App.ServiceProvider.GetService<IAGVStateService>();
|
|
|
|
|
|
|
|
_monipulatorstateService = App.ServiceProvider.GetService<IManipulatorStateService>();
|
|
|
|
_taskInfoBusiness = BaseTaskInfoBusiness.GetInstance(_taskBusinessLogger, _taskservice, _agvstateService);
|
|
|
|
_taskInfoBusiness = BaseTaskInfoBusiness.GetInstance(_taskBusinessLogger, _taskservice, _agvstateService);
|
|
|
|
|
|
|
|
_StateRefreshBusiness = BaseStateRefreshBusiness.GetInstance(_stateBusinessLogger, _agvstateService, _monipulatorstateService);
|
|
|
|
_taskInfoBusiness._Taskaction += task =>
|
|
|
|
_taskInfoBusiness._Taskaction += task =>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TaskItems = new ObservableCollection<AirportTask>
|
|
|
|
TaskItems = new ObservableCollection<AirportTask>
|
|
|
@ -70,7 +75,9 @@ namespace SlnMesnac.WPF.ViewModel.IndexPage
|
|
|
|
private void Init()
|
|
|
|
private void Init()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
#region 测试数据
|
|
|
|
#region 测试数据
|
|
|
|
|
|
|
|
_StateRefreshBusiness.UpdateManipulatorStateByResposne(
|
|
|
|
|
|
|
|
new Model.AirportApiEntity.ManipulatorStateRequestEntity()
|
|
|
|
|
|
|
|
{ ManipulatorNo = "1", SignalSendTime = DateTime.Now.ToString()});
|
|
|
|
List<AirportTask> AirportTaskItem = _taskservice.GetTaskInfos();
|
|
|
|
List<AirportTask> AirportTaskItem = _taskservice.GetTaskInfos();
|
|
|
|
TaskItems = new ObservableCollection<AirportTask>(AirportTaskItem);
|
|
|
|
TaskItems = new ObservableCollection<AirportTask>(AirportTaskItem);
|
|
|
|
// TaskItems = new ObservableCollection<AirportTask>
|
|
|
|
// TaskItems = new ObservableCollection<AirportTask>
|
|
|
|