| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120 |
- using Newtonsoft.Json;
- using Prism.Mvvm;
- using System;
- using System.Collections.Generic;
- using System.Collections.ObjectModel;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using TeamAAS_VP.Enums;
- namespace TeamAAS_VP.Models
- {
- /// <summary>
- /// 机器人点位
- /// </summary>
- public class RPoint : BindableBase
- {
- private int _Number;
- /// <summary>
- /// 点编号
- /// </summary>
- public int Number
- {
- get { return _Number; }
- set { SetProperty(ref _Number, value); }
- }
- private string _Description;
- /// <summary>
- /// 描述
- /// </summary>
- public string Description
- {
- get { return _Description; }
- set { SetProperty(ref _Description, value); }
- }
- private float _X;
- public float X
- {
- get { return _X; }
- set { SetProperty(ref _X, value); }
- }
- private float _Y;
- public float Y
- {
- get { return _Y; }
- set { SetProperty(ref _Y, value); }
- }
- private float _Z;
- public float Z
- {
- get { return _Z; }
- set { SetProperty(ref _Z, value); }
- }
- private float _U;
- public float U
- {
- get { return _U; }
- set { SetProperty(ref _U, value); }
- }
- private float _V;
- public float V
- {
- get { return _V; }
- set { SetProperty(ref _V, value); }
- }
- private float _W;
- public float W
- {
- get { return _W; }
- set { SetProperty(ref _W, value); }
- }
- private RobotHand _Hand;
- public RobotHand Hand
- {
- get { return _Hand; }
- set { SetProperty(ref _Hand, value); }
- }
- private int _Local;
- public int Local
- {
- get { return _Local; }
- set { SetProperty(ref _Local, value); }
- }
- private int _Tool;
- public int Tool
- {
- get { return _Tool; }
- set { SetProperty(ref _Tool, value); }
- }
- public override bool Equals(object obj)
- {
- if (obj !=null && obj is RPoint && ((RPoint)obj).X==this.X && ((RPoint)obj).Y == this.Y && ((RPoint)obj).Z == this.Z && ((RPoint)obj).U == this.U && ((RPoint)obj).V == this.V && ((RPoint)obj).W == this.W && ((RPoint)obj).Local == this.Local)
- {
- return true;
- }
- else { return false; }
- }
- public override int GetHashCode()
- {
- return base.GetHashCode();
- }
- public override string ToString()
- {
- return base.ToString();
- }
- public RPoint Clone()
- {
- return JsonConvert.DeserializeObject<RPoint>(JsonConvert.SerializeObject(this)); ;
- }
- }
- }
|