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) /// /// 无参构造函数 /// public DefectShowData() { } /// /// 构造函数1(控制图片显示数据) /// /// /// /// public DefectShowData(string hole, string size, string attribute) { this._hole = hole; this._size = size; this._attribute = attribute; } /// /// 构造函数2(控制瑕疵点在左边的显示位置) /// /// /// /// /// /// 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; } /// /// 破洞 /// /// public string hole { get { return _hole; } set { _hole = value; } } /// /// 尺寸 /// public string size { get { return _size; } set { _size = value; } } /// /// 属性 /// public string attribute { get { return _attribute; } set { _attribute = value; } } /// /// 该瑕疵点的宽度 /// public double defectWidth { get { return _defectWidth; } set { _defectWidth = value; } } /// /// 该瑕疵点的高度 /// public double defectHeight { get { return _defecHeight; } set { _defecHeight = value; } } /// /// 该图片瑕疵点的位置 /// public BitmapSource imagePath { get { return _imagePath; } set { _imagePath = value; } } } }