| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241 |
- using Newtonsoft.Json;
- using Prism.Mvvm;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using TeamAAS_VP.Enums;
- using TeamAAS_VP.Interfaces;
- using TeamAAS_VP.Models.PLC;
- namespace TeamAAS_VP.Models.Robot
- {
- /// <summary>
- /// 托盘
- /// </summary>
- public class Pallet : BindableBase
- {
- private Guid _Id;
- public Guid Id
- {
- get { return _Id; }
- set { SetProperty(ref _Id,value); }
- }
- private int _PalletNo;
- /// <summary>
- /// 编号
- /// </summary>
- public int PalletNo
- {
- get { return _PalletNo; }
- set { SetProperty(ref _PalletNo, value); }
- }
- private string _Name;
- public string Name
- {
- get { return _Name; }
- set { SetProperty(ref _Name, value); }
- }
- private string _Description;
- /// <summary>
- /// 描述
- /// </summary>
- public string Description
- {
- get { return _Description; }
- set { SetProperty(ref _Description, value); }
- }
- private int _Row;
- public int Row
- {
- get { return _Row; }
- set { SetProperty(ref _Row, value); }
- }
- private int _Column;
- public int Column
- {
- get { return _Column; }
- set { SetProperty(ref _Column, value); }
- }
- private RPoint _P0;
- public RPoint P0
- {
- get { return _P0; }
- set { SetProperty(ref _P0, value); }
- }
- private RPoint _P1;
- public RPoint P1
- {
- get { return _P1; }
- set { SetProperty(ref _P1, value); }
- }
- private RPoint _P2;
- public RPoint P2
- {
- get { return _P2; }
- set { SetProperty(ref _P2, value); }
- }
- private PalletArrangement _Arrangement;
- public PalletArrangement Arrangement
- {
- get { return _Arrangement; }
- set { SetProperty(ref _Arrangement, value); }
- }
- private PalletExtend _Extend;
- /// <summary>
- /// 组合托盘功能
- /// </summary>
- public PalletExtend Extend
- {
- get { return _Extend; }
- set { SetProperty(ref _Extend, value); }
- }
- public Pallet Clone()
- {
- return JsonConvert.DeserializeObject<Pallet>(JsonConvert.SerializeObject(this)); ;
- }
- }
- /// <summary>
- /// 托盘
- /// </summary>
- public class PalletEx : BindableBase
- {
- private Guid _Id;
- public Guid Id
- {
- get { return _Id; }
- set { SetProperty(ref _Id, value); }
- }
- private int _PalletNo;
- /// <summary>
- /// 编号
- /// </summary>
- public int PalletNo
- {
- get { return _PalletNo; }
- set { SetProperty(ref _PalletNo, value); }
- }
- private string _Name;
- public string Name
- {
- get { return _Name; }
- set { SetProperty(ref _Name, value); }
- }
- private string _Description;
- /// <summary>
- /// 描述
- /// </summary>
- public string Description
- {
- get { return _Description; }
- set { SetProperty(ref _Description, value); }
- }
- private int _Row;
- public int Row
- {
- get { return _Row; }
- set { SetProperty(ref _Row, value); }
- }
- private int _Column;
- public int Column
- {
- get { return _Column; }
- set { SetProperty(ref _Column, value); }
- }
- private PlcPoint _P0;
- public PlcPoint P0
- {
- get { return _P0; }
- set { SetProperty(ref _P0, value); }
- }
- private PlcPoint _P1;
- public PlcPoint P1
- {
- get { return _P1; }
- set { SetProperty(ref _P1, value); }
- }
- private PlcPoint _P2;
- public PlcPoint P2
- {
- get { return _P2; }
- set { SetProperty(ref _P2, value); }
- }
- private PalletArrangement _Arrangement;
- public PalletArrangement Arrangement
- {
- get { return _Arrangement; }
- set { SetProperty(ref _Arrangement, value); }
- }
- private PalletExtend _Extend;
- /// <summary>
- /// 组合托盘功能
- /// </summary>
- public PalletExtend Extend
- {
- get { return _Extend; }
- set { SetProperty(ref _Extend, value); }
- }
- public PalletEx Clone()
- {
- return new PalletEx()
- {
- Id = this.Id,
- PalletNo = this.PalletNo,
- Name = this.Name,
- Description = this.Description,
- Row = this.Row,
- Column = this.Column,
- P0 = this.P0?.Clone(),
- P1 = this.P1?.Clone(),
- P2 = this.P2?.Clone(),
- Arrangement = this.Arrangement,
- Extend = this.Extend
- };
- }
- }
- }
|