zhao
2021-07-19 8347f2fbddbd25369359dcb2da1233ac48a19fdc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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;
                }
            }
        }
    }
}