using System; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; using System.Data; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace HH.WMS.Client.CustomControl { public partial class CusTrayContent : UserControl { public CusTrayContent() { InitializeComponent(); } public CusTrayContent(decimal current,decimal total) { InitializeComponent(); Current = current; Total = total; } private decimal _current = 0; private decimal _total = 0; public decimal Current { get { return _current; } set { _current = value; lblCurrentNum.Text = _current.ToString(); if (_current != 0) { this.BackColor = Color.Blue; lblCurrentNum.Visible = lblTotalNum.Visible = label1.Visible = true; } } } public decimal Total { get { return _total; } set { _total = value; lblTotalNum.Text = _total.ToString(); if (_total != 0) { this.BackColor = Color.Blue; lblCurrentNum.Visible = lblTotalNum.Visible = label1.Visible = true; } } } } }