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

HardwareStatusViewModel.cs 1.2 KiB

123456789101112131415161718192021222324252627282930313233
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using Microsoft.Toolkit.Mvvm.ComponentModel;
  7. using System.Collections.Concurrent;
  8. using System.Collections.ObjectModel;
  9. using System.Windows;
  10. using BPASmartClient.Helper;
  11. using Microsoft.Toolkit.Mvvm.Input;
  12. using BPASmartClient.JXJFoodSmallStation.Model;
  13. namespace BPASmartClient.JXJFoodSmallStation.ViewModel
  14. {
  15. public class HardwareStatusViewModel : ObservableObject
  16. {
  17. public HardwareStatusViewModel()
  18. {
  19. TopDeviceCurrentStatuses = DeviceInquire.GetInstance.TopDeviceCurrentStatuses;
  20. BottomDeviceCurrentStatuses = DeviceInquire.GetInstance.BottomDeviceCurrentStatuses;
  21. TopDeviceCurrentStatuses = new ObservableCollection<DeviceCurrentStatus>(TopDeviceCurrentStatuses.OrderByDescending(item => item.DeviceNum));
  22. BottomDeviceCurrentStatuses = new ObservableCollection<DeviceCurrentStatus>(BottomDeviceCurrentStatuses.OrderBy(item => item.DeviceNum));
  23. }
  24. public ObservableCollection<DeviceCurrentStatus> TopDeviceCurrentStatuses { get; set; }
  25. public ObservableCollection<DeviceCurrentStatus> BottomDeviceCurrentStatuses { get; set; }
  26. }
  27. }