aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/CalibrationDataPointVM.cs
blob: 4ad06c7ed75b8f9d17f0808554292683ea88f5a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tango.Core;
using Tango.PMR.ColorLab;
using Tango.SharedUI;

namespace Tango.MachineStudio.RML.ViewModels
{
    public class CalibrationDataPointVM : ExtendedObject
    {
        private double _x;

        public double X
        {
            get { return _x; }
            set { _x = value; RaisePropertyChangedAuto(); }
        }

        private double _y;

        public double Y
        {
            get { return _y; }
            set { _y = value; RaisePropertyChangedAuto(); }
        }

        private int _index;

        public int Index
        {
            get { return _index; }
            set { _index = value; RaisePropertyChangedAuto(); }
        }


        public CalibrationDataPointVM()
        {

        }

        public CalibrationDataPointVM(double x, double y)
        {
            X = x;
            Y = y;
        }

        public CalibrationDataPointVM(CalibrationPoint calibrationPoint) : this(calibrationPoint.X, calibrationPoint.Y)
        {

        }

        public CalibrationPoint ToPMR()
        {
            return new CalibrationPoint()
            {
                X = X,
                Y = Y,
            };
        }
    }
}