|
- using BPA.Helper;
- using System.Collections.Generic;
-
- namespace BPASmartClient.DosingSystem
- {
- /// <summary>
- /// 基础参数
- /// </summary>
- public class BasePar : NotifyBase
- {
- /// <summary>
- /// 设备扫描网段
- /// </summary>
- public string NetworkSegAddress { get { return _mNetworkSegAddress; } set { _mNetworkSegAddress = value; OnPropertyChanged(); } }
- private string _mNetworkSegAddress = "192.168.0.";
-
- /// <summary>
- /// 输送带设备 PLC IP 地址
- /// </summary>
- public string DeviceAddress { get { return _mDeviceAddress; } set { _mDeviceAddress = value; OnPropertyChanged(); } }
- private string _mDeviceAddress = "192.168.0.15";
-
-
- /// <summary>
- /// 料仓数量
- /// </summary>
- public int StockCount { get { return _stockCount; } set { _stockCount = value; OnPropertyChanged(); } }
- private int _stockCount = 0;
-
-
- /// <summary>
- /// 当前使用的输送线类型
- /// </summary>
- public string ConveryType { get { return _converyType; } set { _converyType = value; OnPropertyChanged(); } }
- private string _converyType;
- /// <summary>
- /// 输送线类型集合
- /// </summary>
- private List<string> _converyTypeList = new List<string>();
- public List<string> ConveryTypeList
- {
- get { return _converyTypeList; }
-
- set
- {
- foreach (var item in value)
- {
- if (_converyTypeList.Contains(item))
- {
- continue;
- }
- _converyTypeList.Add(item);
- }
-
- OnPropertyChanged();
- }
- }
- /// <summary>
- /// 输送带数量
- /// </summary>
- public int ConveyerBeltCount
- {
- get { return _mConveyerBeltCount; }
- set
- {
- _mConveyerBeltCount = value;
- //var temp = ConveyerBeltModels;
- //App.Current.Dispatcher.Invoke(() => { ConveyerBeltModels.Clear(); });
- //for (int i = 0; i < value; i++)
- //{
- // App.Current.Dispatcher.Invoke(() =>
- // {
- // ConveyerBeltModels.Add(new ConveyerBeltModel()
- // {
- // Name = $"输送带{i + 1}速度",
- // Num = i + 1,
- // Speed = (i >= 0 && i < temp.Count) ? temp.ElementAt(i).Speed : 0
- // });
- // });
- //}
- OnPropertyChanged();
- }
- }
- private int _mConveyerBeltCount = 0;
-
-
-
- /// <summary>
- /// 升降气缸数量
- /// </summary>
- public int LiftCylinderCount { get { return _mLiftCylinderCount; } set { _mLiftCylinderCount = value; OnPropertyChanged(); } }
- private int _mLiftCylinderCount = 0;
-
- /// <summary>
- /// 阻挡气缸数量
- /// </summary>
- public int BlockCylinderCount { get { return _mBlockCylinderCount; } set { _mBlockCylinderCount = value; OnPropertyChanged(); } }
- private int _mBlockCylinderCount = 0;
-
- /// <summary>
- /// 托盘气缸数量
- /// </summary>
- public int PalletCylinderCount { get { return _mPalletCylinderCount; } set { _mPalletCylinderCount = value; OnPropertyChanged(); } }
- private int _mPalletCylinderCount = 0;
-
- //public ObservableCollection<ConveyerBeltModel> ConveyerBeltModels { get; set; } = new ObservableCollection<ConveyerBeltModel>();
-
- }
- }
|