DefectShowData.cs
3.31 KB
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
using System.Windows.Media.Imaging;
namespace OS.Spin.ViewModle.Models
{
public class DefectShowData
{
private string _hole; //破洞
private string _size; //尺寸
private string _attribute; //属性
private double _defectWidth; //该瑕疵点的宽度(范围是0~2.2m)
private double _defecHeight; //该瑕疵点的高度(0~??m)
private BitmapSource _imagePath; //该图片的路径
//给一个隐藏标识来判断该图标的状态
//private int status; //该瑕疵图片的状态,选中或未选中(未选中即初始化0,选中1)
/// <summary>
/// 无参构造函数
/// </summary>
public DefectShowData() { }
/// <summary>
/// 构造函数1(控制图片显示数据)
/// </summary>
/// <param name="hole"></param>
/// <param name="size"></param>
/// <param name="attribute"></param>
public DefectShowData(string hole, string size, string attribute)
{
this._hole = hole;
this._size = size;
this._attribute = attribute;
}
/// <summary>
/// 构造函数2(控制瑕疵点在左边的显示位置)
/// </summary>
/// <param name="hole"></param>
/// <param name="size"></param>
/// <param name="attribute"></param>
/// <param name="defectWidth"></param>
/// <param name="defectHeight"></param>
public DefectShowData(string hole, string size, string attribute, double defectWidth, double defectHeight, BitmapSource imagePath)
{
this._hole = hole;
this._size = size;
this._attribute = attribute;
this._defectWidth = defectWidth;
this._defecHeight = defectHeight;
this._imagePath = imagePath;
}
/// <summary>
/// 破洞
/// </summary>
///
public string hole
{
get { return _hole; }
set
{
_hole = value;
}
}
/// <summary>
/// 尺寸
/// </summary>
public string size
{
get { return _size; }
set
{
_size = value;
}
}
/// <summary>
/// 属性
/// </summary>
public string attribute
{
get { return _attribute; }
set
{
_attribute = value;
}
}
/// <summary>
/// 该瑕疵点的宽度
/// </summary>
public double defectWidth
{
get { return _defectWidth; }
set
{
_defectWidth = value;
}
}
/// <summary>
/// 该瑕疵点的高度
/// </summary>
public double defectHeight
{
get { return _defecHeight; }
set
{
_defecHeight = value;
}
}
/// <summary>
/// 该图片瑕疵点的位置
/// </summary>
public BitmapSource imagePath
{
get { return _imagePath; }
set
{
_imagePath = value;
}
}
}
}