| | |
| | | using Bro.Common.Model; |
| | | using Bro.Common.Model.Interface; |
| | | using Bro.Device.HikCamera; |
| | | using System; |
| | | using Newtonsoft.Json; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Drawing.Design; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace A032.Process |
| | | { |
| | |
| | | LoadFullTray = 3, |
| | | [Description("卸载满Tray地点")] |
| | | UnloadFullTray = 4, |
| | | [Description("充电地点")] |
| | | Charge = 5, |
| | | } |
| | | |
| | | public class PathPosition : IComplexDisplay |
| | |
| | | [Description("归属设备编号")] |
| | | [TypeConverter(typeof(PLCDeviceConverter))] |
| | | public string DeviceOwner { get; set; } |
| | | |
| | | [Browsable(false)] |
| | | [JsonIgnore] |
| | | public bool IsOccupied { get; set; } = false; |
| | | |
| | | public string GetDisplayText() |
| | | { |
| | |
| | | [Description("该位置标准点位信息")] |
| | | [TypeConverter(typeof(ComplexObjectConvert))] |
| | | [Editor(typeof(PropertyObjectEditor), typeof(UITypeEditor))] |
| | | public CustomizedPoint StandardPoint { get; set; } = new CustomizedPoint(); |
| | | public CustomizedPointWithAngle StandardPoint { get; set; } = new CustomizedPointWithAngle(); |
| | | |
| | | [Category("视觉配置")] |
| | | [Description("该位置拍摄配置")] |
| | | [TypeConverter(typeof(ComplexObjectConvert))] |
| | | [Editor(typeof(PropertyObjectEditor), typeof(UITypeEditor))] |
| | | public HikCameraOperationConfig CameraOpConfig { get; set; } = new HikCameraOperationConfig(); |
| | | |
| | | [Category("示教配置")] |
| | | [Description("机器人拍照位置")] |
| | | [TypeConverter(typeof(ComplexObjectConvert))] |
| | | [Editor(typeof(PropertyObjectEditor), typeof(UITypeEditor))] |
| | | public RobotPoint RobotSnapshotPoint { get; set; } = new RobotPoint(); |
| | | |
| | | [Category("示教配置")] |
| | | [Description("机器人示教位置到实际抓取位置的偏移")] |
| | | [TypeConverter(typeof(ComplexObjectConvert))] |
| | | [Editor(typeof(PropertyObjectEditor), typeof(UITypeEditor))] |
| | | public RobotPoint RobotShift { get; set; } = new RobotPoint(); |
| | | |
| | | public string GetDisplayText() |
| | | { |
| | |
| | | |
| | | config.PositionCollection.ForEach(p => |
| | | { |
| | | _hash[p.PositionCode] = $"{p.PositionCode}-{p.Description.GetEnumDescription()}"; |
| | | _hash[p.PositionCode] = $"{p.PositionCode}-{p.PositionNo}-{p.Description.GetEnumDescription()}"; |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | |
| | | public class PositionNoConverter : ComboBoxItemTypeConvert |
| | | { |
| | | public override void GetConvertHash() |
| | | { |
| | | using (var scope = GlobalVar.Container.BeginLifetimeScope()) |
| | | { |
| | | var config = scope.Resolve<ProcessConfig>(); |
| | | |
| | | config.PositionCollection.ForEach(p => |
| | | { |
| | | _hash[p.PositionNo] = $"{p.PositionNo}-{p.PositionCode}-{p.Description.GetEnumDescription()}"; |
| | | }); |
| | | } |
| | | } |