|
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using Microsoft.Toolkit.Mvvm.ComponentModel;
- using System.Collections.ObjectModel;
- using BPASmartClient.JXJFoodSmallStation.Model;
- using BPASmartClient.Helper;
- using Microsoft.Toolkit.Mvvm.Input;
- using BPASmartClient.CustomResource.UserControls.MessageShow;
- using BPASmartClient.CustomResource.UserControls;
- using System.Diagnostics;
- using BPASmartClient.JXJFoodSmallStation.Model.Siemens;
- using BPASmartClient.JXJFoodSmallStation.Model.HK_PLC;
-
- namespace BPASmartClient.JXJFoodSmallStation.ViewModel
- {
- public class ManualCommViewModel : ObservableObject
- {
- public ManualCommViewModel()
- {
- for (int i = 0; i < 8; i++)
- {
- if (i < 4)
- {
- PlcInfo.Add(new PlcManualComm()
- {
- SerialNum = PlcInfo.Count + 1,
- Address = "DB3.DBD" + (10 + 4 * i),
- Describe = $"托盘1_{i + 1}#桶位置反馈",
- });
- }
- else
- {
- PlcInfo.Add(new PlcManualComm()
- {
- SerialNum = PlcInfo.Count + 1,
- Address = "DB3.DBD" + (10 + 4 * i),
- Describe = $"托盘2_{i-3}#桶位置反馈",
- });
- }
-
- }
- }
- public ObservableCollection<PlcManualComm> PlcInfo { get; set; } = new ObservableCollection<PlcManualComm>();
-
- public RelayCommand<object> SetParCommand { get; set; }
-
- public RelayCommand Connect { get; set; }
-
- }
- }
|