终端一体化运控平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

StockControViewModel.cs 1.5 KiB

2 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142
  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.DosingSystemSingle.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. }