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

ManualCommViewModel.cs 909 B

1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1234567891011121314151617181920212223242526272829
  1. using BPASmartClient.FoodStationTest.Model;
  2. using BPA.Helper;
  3. using System.Collections.ObjectModel;
  4. using System.Linq;
  5. namespace BPASmartClient.FoodStationTest.ViewModel
  6. {
  7. public class ManualCommViewModel : NotifyBase
  8. {
  9. public ManualCommViewModel()
  10. {
  11. PlcDataColl.Add(new VarMonitor() { SerialNum = PlcDataColl.Count, Address = "", });
  12. SetParCommand = new BPARelayCommand<object>((o) =>
  13. {
  14. if (o != null && o is string address)
  15. {
  16. var res = PlcDataColl.FirstOrDefault(p => p.Address == address);
  17. }
  18. });
  19. }
  20. public static ObservableCollection<VarMonitor> PlcDataColl { get; set; } = new ObservableCollection<VarMonitor>();
  21. public BPARelayCommand<object> SetParCommand { get; set; }
  22. public BPARelayCommand Connect { get; set; }
  23. }
  24. }