ReelDataControl.cs
2.4 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using OnlineStore.DeviceLibrary;
using OnlineStore.LoadCSVLibrary;
namespace OnlineStore.XLRStore
{
public partial class ReelDataControl : UserControl
{
public string ReelText
{
get { return lblText.Text; }
set { lblText.Text = value; }
}
public Color ColorStatus
{
get { return this.BackColor; }
set
{
this.BackColor = value;
}
}
public void SelectStyle()
{
panName.BackColor = Color.DeepSkyBlue;
}
public void UnSelectStyle()
{
panName.BackColor = Color.Transparent;
}
public void ShowData(string text, InOutPosInfo posInfo,IO_VALUE value)
{
lblText.Text = text;
if (posInfo == null)
{
lblReelInfo.Text = "";
this.BackColor = Color.White;
linkClear.Visible = false;
}
else
{
lblReelInfo.Text = posInfo.ToStr();
this.BackColor = Color.LimeGreen;
linkClear.Visible = true ;
}
if (value.Equals(IO_VALUE.LOW))
{
lblSingle.Visible = false;
lblSingle.Text = "";
}
else
{
lblSingle.Visible = true;
lblSingle.Text = "检测有料";
lblSingle.BackColor = Color.LimeGreen;
}
}
public ReelDataControl()
{
InitializeComponent();
}
private void EquipControl_Load(object sender, EventArgs e)
{
}
private void ReelDataControl_MouseEnter(object sender, EventArgs e)
{
SelectStyle();
}
private void ReelDataControl_MouseLeave(object sender, EventArgs e)
{
UnSelectStyle();
}
private void lblText_MouseEnter(object sender, EventArgs e)
{
SelectStyle();
}
private void lblText_MouseLeave(object sender, EventArgs e)
{
UnSelectStyle();
}
}
}