using BPA.Helper; using System.Collections.ObjectModel; namespace BPASmartClient.DosingSystem.ViewModel { public class ConveyerBeltManualViewModel : NotifyBase { public ConveyerBeltManualViewModel() { for (int i = 0; i < Json.Data.BaseParModel.ConveyerBeltCount; i++) { ConveyerBeltModels.Add(new ConveyerBeltModel() { Name = $"输送带{i + 1}控制", Num = i + 1, Speed = GlobalDevice.MotorSpeed[i], ConveyerBeltWork = GlobalDevice.MotorControl.GetBitValue((byte)(i + 1)) }); } } public ObservableCollection ConveyerBeltModels { get; set; } = new ObservableCollection(); } }