You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
166 lines
3.6 KiB
C#
166 lines
3.6 KiB
C#
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<ProductSpecItem>
|
|
{
|
|
private string _backColor1 = ColorTranslator.ToHtml(Color.DimGray);
|
|
|
|
/// <summary>
|
|
/// 品项背景颜色1
|
|
/// </summary>
|
|
[JsonProperty(PropertyName = "color1")]
|
|
public string BackColor1
|
|
{
|
|
get
|
|
{
|
|
return _backColor1;
|
|
}
|
|
set
|
|
{
|
|
this._backColor1 = value;
|
|
}
|
|
}
|
|
|
|
private string _backColor2 = ColorTranslator.ToHtml(Color.DimGray);
|
|
|
|
/// <summary>
|
|
/// 品项背景颜色2
|
|
/// </summary>
|
|
[JsonProperty(PropertyName = "color2")]
|
|
public string BackColor2
|
|
{
|
|
get
|
|
{
|
|
return _backColor2;
|
|
}
|
|
set
|
|
{
|
|
this._backColor2 = value;
|
|
}
|
|
}
|
|
|
|
private string _txtColor = ColorTranslator.ToHtml(Color.White);
|
|
|
|
/// <summary>
|
|
/// 品项字体颜色
|
|
/// </summary>
|
|
[JsonProperty(PropertyName = "tColor")]
|
|
public string TxtColor
|
|
{
|
|
get
|
|
{
|
|
return _txtColor;
|
|
}
|
|
set
|
|
{
|
|
this._txtColor = value;
|
|
}
|
|
}
|
|
|
|
private SystemFont _makeFont = SystemFont.默认;
|
|
|
|
/// <summary>
|
|
/// 品项字体大小
|
|
/// </summary>
|
|
[JsonProperty(PropertyName = "font")]
|
|
public SystemFont MakeFont
|
|
{
|
|
get
|
|
{
|
|
return _makeFont;
|
|
}
|
|
set
|
|
{
|
|
this._makeFont = value;
|
|
}
|
|
}
|
|
|
|
private int _itemWidth = 80;
|
|
/// <summary>
|
|
/// 品项宽度
|
|
/// </summary>
|
|
[JsonProperty(PropertyName = "width")]
|
|
public int ItemWidth
|
|
{
|
|
get
|
|
{
|
|
return _itemWidth;
|
|
}
|
|
set
|
|
{
|
|
this._itemWidth = value;
|
|
}
|
|
}
|
|
|
|
private int _itemHeight = 80;
|
|
/// <summary>
|
|
/// 品项高度
|
|
/// </summary>
|
|
[JsonProperty(PropertyName = "height")]
|
|
public int ItemHeight
|
|
{
|
|
get
|
|
{
|
|
return _itemHeight;
|
|
}
|
|
set
|
|
{
|
|
this._itemHeight = value;
|
|
}
|
|
}
|
|
|
|
private int _cols = 7;
|
|
/// <summary>
|
|
/// 每行显示品项个数
|
|
/// </summary>
|
|
[JsonProperty(PropertyName = "cols")]
|
|
public int Cols
|
|
{
|
|
get
|
|
{
|
|
return _cols;
|
|
}
|
|
set
|
|
{
|
|
this._cols = value;
|
|
}
|
|
}
|
|
|
|
private bool _showPrice = true;
|
|
/// <summary>
|
|
/// 是否显示售价
|
|
/// </summary>
|
|
[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));
|
|
}
|
|
}
|
|
}
|