终端一体化运控平台
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

StockControViewModel.cs 1.5 KiB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. 
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Collections.ObjectModel;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. using BPA.Helper;
  9. namespace BPASmartClient.DosingSystem.ViewModel
  10. {
  11. public class StockControViewModel : NotifyBase
  12. {
  13. public StockControViewModel()
  14. {
  15. //Task.Factory.StartNew(() =>
  16. //{
  17. // App.Current.Dispatcher.Invoke(() =>
  18. // {
  19. // for (int i = 0; i < 6; i++)
  20. // {
  21. // statusTop.Add(new StockStatusModel { IsFault = false, IsLayOff = true, IsRunning = true, MaterialName = $"{i + 1}号料仓", MaterialWeight = 85 + i });
  22. // }
  23. // for (int i = 6; i < 12; i++)
  24. // {
  25. // statusDown.Add(new StockStatusModel { IsFault = false, IsLayOff = true, IsRunning = true, MaterialName = $"{i + 1}号料仓", MaterialWeight = 85 + i });
  26. // }
  27. // });
  28. //});
  29. statusTop = DeviceInquire.GetInstance.TopDeviceCurrentStatuses;
  30. statusDown = DeviceInquire.GetInstance.BottomDeviceCurrentStatuses;
  31. }
  32. public bool ConveyerBeltWork { get { return _mConveyerBeltWork; } set { _mConveyerBeltWork = value; OnPropertyChanged(); } }
  33. private bool _mConveyerBeltWork;
  34. public ObservableCollection<DeviceCurrentStatus> statusTop { get; set; }
  35. public ObservableCollection<DeviceCurrentStatus> statusDown { get; set; }
  36. }
  37. }