DefectShowData.cs 3.31 KB
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;
            }
        }
    }
}