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

110 lines
3.7 KiB

  1. using BPA.Helper;
  2. using System.Collections.Generic;
  3. namespace BPASmartClient.DosingSystem
  4. {
  5. /// <summary>
  6. /// 基础参数
  7. /// </summary>
  8. public class BasePar : NotifyBase
  9. {
  10. /// <summary>
  11. /// 设备扫描网段
  12. /// </summary>
  13. public string NetworkSegAddress { get { return _mNetworkSegAddress; } set { _mNetworkSegAddress = value; OnPropertyChanged(); } }
  14. private string _mNetworkSegAddress = "192.168.0.";
  15. /// <summary>
  16. /// 输送带设备 PLC IP 地址
  17. /// </summary>
  18. public string DeviceAddress { get { return _mDeviceAddress; } set { _mDeviceAddress = value; OnPropertyChanged(); } }
  19. private string _mDeviceAddress = "192.168.0.15";
  20. /// <summary>
  21. /// 料仓数量
  22. /// </summary>
  23. public int StockCount { get { return _stockCount; } set { _stockCount = value; OnPropertyChanged(); } }
  24. private int _stockCount = 0;
  25. /// <summary>
  26. /// 当前使用的输送线类型
  27. /// </summary>
  28. public string ConveryType { get { return _converyType; } set { _converyType = value; OnPropertyChanged(); } }
  29. private string _converyType;
  30. /// <summary>
  31. /// 输送线类型集合
  32. /// </summary>
  33. private List<string> _converyTypeList = new List<string>();
  34. public List<string> ConveryTypeList
  35. {
  36. get { return _converyTypeList; }
  37. set
  38. {
  39. foreach (var item in value)
  40. {
  41. if (_converyTypeList.Contains(item))
  42. {
  43. continue;
  44. }
  45. _converyTypeList.Add(item);
  46. }
  47. OnPropertyChanged();
  48. }
  49. }
  50. /// <summary>
  51. /// 输送带数量
  52. /// </summary>
  53. public int ConveyerBeltCount
  54. {
  55. get { return _mConveyerBeltCount; }
  56. set
  57. {
  58. _mConveyerBeltCount = value;
  59. //var temp = ConveyerBeltModels;
  60. //App.Current.Dispatcher.Invoke(() => { ConveyerBeltModels.Clear(); });
  61. //for (int i = 0; i < value; i++)
  62. //{
  63. // App.Current.Dispatcher.Invoke(() =>
  64. // {
  65. // ConveyerBeltModels.Add(new ConveyerBeltModel()
  66. // {
  67. // Name = $"输送带{i + 1}速度",
  68. // Num = i + 1,
  69. // Speed = (i >= 0 && i < temp.Count) ? temp.ElementAt(i).Speed : 0
  70. // });
  71. // });
  72. //}
  73. OnPropertyChanged();
  74. }
  75. }
  76. private int _mConveyerBeltCount = 0;
  77. /// <summary>
  78. /// 升降气缸数量
  79. /// </summary>
  80. public int LiftCylinderCount { get { return _mLiftCylinderCount; } set { _mLiftCylinderCount = value; OnPropertyChanged(); } }
  81. private int _mLiftCylinderCount = 0;
  82. /// <summary>
  83. /// 阻挡气缸数量
  84. /// </summary>
  85. public int BlockCylinderCount { get { return _mBlockCylinderCount; } set { _mBlockCylinderCount = value; OnPropertyChanged(); } }
  86. private int _mBlockCylinderCount = 0;
  87. /// <summary>
  88. /// 托盘气缸数量
  89. /// </summary>
  90. public int PalletCylinderCount { get { return _mPalletCylinderCount; } set { _mPalletCylinderCount = value; OnPropertyChanged(); } }
  91. private int _mPalletCylinderCount = 0;
  92. //public ObservableCollection<ConveyerBeltModel> ConveyerBeltModels { get; set; } = new ObservableCollection<ConveyerBeltModel>();
  93. }
  94. }