using Newtonsoft.Json; using POSV.Utils; using System; using System.Collections.Generic; using System.Drawing; using System.Linq; using System.Text; namespace POSV.Bean { [Serializable] [JsonObject(MemberSerialization.OptIn)] public class ProductMakeItem : IEquatable { private string _backColor1 = ColorTranslator.ToHtml(Color.DimGray); /// /// 品项背景颜色1 /// [JsonProperty(PropertyName = "color1")] public string BackColor1 { get { return _backColor1; } set { this._backColor1 = value; } } private string _backColor2 = ColorTranslator.ToHtml(Color.DimGray); /// /// 品项背景颜色2 /// [JsonProperty(PropertyName = "color2")] public string BackColor2 { get { return _backColor2; } set { this._backColor2 = value; } } private string _txtColor = ColorTranslator.ToHtml(Color.White); /// /// 品项字体颜色 /// [JsonProperty(PropertyName = "tColor")] public string TxtColor { get { return _txtColor; } set { this._txtColor = value; } } private SystemFont _makeFont = SystemFont.默认; /// /// 品项字体大小 /// [JsonProperty(PropertyName = "font")] public SystemFont MakeFont { get { return _makeFont; } set { this._makeFont = value; } } private int _itemWidth = 80; /// /// 品项宽度 /// [JsonProperty(PropertyName = "width")] public int ItemWidth { get { return _itemWidth; } set { this._itemWidth = value; } } private int _itemHeight = 80; /// /// 品项高度 /// [JsonProperty(PropertyName = "height")] public int ItemHeight { get { return _itemHeight; } set { this._itemHeight = value; } } private int _cols = 7; /// /// 每行显示品项个数 /// [JsonProperty(PropertyName = "cols")] public int Cols { get { return _cols; } set { this._cols = value; } } private bool _showPrice = true; /// /// 是否显示售价 /// [JsonProperty(PropertyName = "showPrice")] public bool ShowPrice { get { return _showPrice; } set { _showPrice = value; } } public bool Equals(ProductSpecItem other) { if (other == null) { return false; } return JsonUtils.Serialize(this).Equals(JsonUtils.Serialize(other)); } } }