终端一体化运控平台
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.
 
 
 

40 regels
1.3 KiB

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using BPA.Helper;
  7. using System.Collections.ObjectModel;
  8. using BPASmartClient.JXJFoodSmallStation.Model;
  9. using BPA.Helper;
  10. using BPASmartClient.CustomResource.UserControls.MessageShow;
  11. using BPASmartClient.CustomResource.UserControls;
  12. using System.Diagnostics;
  13. using BPASmartClient.JXJFoodSmallStation.Model.Siemens;
  14. using BPASmartClient.JXJFoodSmallStation.Model.HK_PLC;
  15. namespace BPASmartClient.JXJFoodSmallStation.ViewModel
  16. {
  17. public class ManualCommViewModel : NotifyBase
  18. {
  19. public ManualCommViewModel()
  20. {
  21. PlcDataColl.Add(new VarMonitor() { SerialNum = PlcDataColl.Count , Address="",});
  22. SetParCommand = new BPARelayCommand<object>((o) =>
  23. {
  24. if (o != null && o is string address)
  25. {
  26. var res = PlcDataColl.FirstOrDefault(p =>p.Address == address);
  27. }
  28. });
  29. }
  30. public static ObservableCollection<VarMonitor> PlcDataColl { get; set; } = new ObservableCollection<VarMonitor>();
  31. public BPARelayCommand<object> SetParCommand { get; set; }
  32. public BPARelayCommand Connect { get; set; }
  33. }
  34. }