42 lines
725 B
C#
42 lines
725 B
C#
using Stylet;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace MainShell.Models
|
|
{
|
|
public class MPoint : PropertyChangedBase
|
|
{
|
|
private double _x;
|
|
|
|
public double X
|
|
{
|
|
get { return _x; }
|
|
set { SetAndNotify(ref _x, value); }
|
|
}
|
|
|
|
private double _y;
|
|
|
|
public double Y
|
|
{
|
|
get { return _y; }
|
|
set { SetAndNotify(ref _y, value); }
|
|
}
|
|
|
|
public MPoint() { }
|
|
|
|
public MPoint(double x, double y)
|
|
{
|
|
_x = x;
|
|
_y = y;
|
|
}
|
|
public override string ToString() => $"({X}, {Y})";
|
|
public MPoint Clone()
|
|
{
|
|
return new MPoint(X, Y);
|
|
}
|
|
}
|
|
}
|