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
{
///
/// 机器人点位
///
public class RPoint : BindableBase
{
private int _Number;
///
/// 点编号
///
public int Number
{
get { return _Number; }
set { SetProperty(ref _Number, value); }
}
private string _Description;
///
/// 描述
///
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(JsonConvert.SerializeObject(this)); ;
}
}
}