终端一体化运控平台
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 

47 righe
1.6 KiB

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Collections.ObjectModel;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. using BPA.Helper;
  8. using BPASmartClient.Model;
  9. using BPA.Helper;
  10. namespace BPASmartClient.ViewModel
  11. {
  12. public class SystemSetViewModel : NotifyBase
  13. {
  14. public SystemSetViewModel()
  15. {
  16. if (SaveInfoCommand == null)
  17. {
  18. //SaveInfoCommand = new Action(() =>
  19. //{
  20. // List<ushort> values = new List<ushort>();
  21. // values.Clear();
  22. // List<bool> bools = new List<bool>();
  23. // bools.Clear();
  24. // for (int i = 0; i < Json<KeepDataBase>.Data.parSets.Count; i++)
  25. // {
  26. // values.Clear();
  27. // values.Add(Json<KeepDataBase>.Data.parSets[i].Minute);
  28. // values.Add(Json<KeepDataBase>.Data.parSets[i].Second);
  29. // bools.Add(Json<KeepDataBase>.Data.parSets[i].IsShield);
  30. // //ModbusTcpHelper.GetInstance.Write((ushort)ModbusTcpHelper.GetInstance.GetWordAddress($"VW{116 + (i * 6)}"), WriteType.HoldingRegisters, values.ToArray());
  31. // }
  32. // //ModbusTcpHelper.GetInstance.Write((ushort)ModbusTcpHelper.GetInstance.GetBoolAddress("M260.0"), WriteType.Coils, bools.ToArray());
  33. //});
  34. }
  35. }
  36. //public ObservableCollection<ParSet> parSets { get; set; } = Json<KeepDataBase>.Data.parSets;
  37. public Action SaveInfoCommand { get; set; }
  38. }
  39. }