using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using BPA.Helper;
namespace BPASmartClient.DosingSystem
{
///
/// 基础参数
///
public class BasePar : NotifyBase
{
///
/// 设备扫描网段
///
public string NetworkSegAddress { get { return _mNetworkSegAddress; } set { _mNetworkSegAddress = value; OnPropertyChanged(); } }
private string _mNetworkSegAddress = "192.168.0.";
///
/// 输送带设备 PLC IP 地址
///
public string DeviceAddress { get { return _mDeviceAddress; } set { _mDeviceAddress = value; OnPropertyChanged(); } }
private string _mDeviceAddress = "192.168.0.15";
///
/// 输送带数量
///
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;
///
/// 升降气缸数量
///
public int LiftCylinderCount { get { return _mLiftCylinderCount; } set { _mLiftCylinderCount = value; OnPropertyChanged(); } }
private int _mLiftCylinderCount = 0;
///
/// 阻挡气缸数量
///
public int BlockCylinderCount { get { return _mBlockCylinderCount; } set { _mBlockCylinderCount = value; OnPropertyChanged(); } }
private int _mBlockCylinderCount = 0;
///
/// 托盘气缸数量
///
public int PalletCylinderCount { get { return _mPalletCylinderCount; } set { _mPalletCylinderCount = value; OnPropertyChanged(); } }
private int _mPalletCylinderCount = 0;
//public ObservableCollection ConveyerBeltModels { get; set; } = new ObservableCollection();
}
}