LabelInfo.cs
4.0 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
96
97
98
99
100
101
102
103
104
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace TSA_V.DeviceLibrary
{
public class LabelInfo
{
//public string lblPos="位置:";
//public string lblNum = "库存数量:";
//public string lblPn = "物料编码:";
//public string lblDes = "描述:";
//public string lblNotes = "注意事项:";
public LabelInfo() { }
public LabelInfo(string pos, string num, string pn, string des, string notes, string ip, string mac, bool led)
{
this.pos = pos;
this.num = num;
this.pn = pn;
this.des = des;
this.notes = notes;
this.ip = ip;
this.mac = mac.Trim();
this.openLed = led;
}
public string ip="";
public string mac="";
public string pos="";
public string num = "";
public string pn = "";
public string des = "";
public string notes = "";
public bool openLed;
public Dictionary<string,object> toMap()
{
//[{ "mac":"99.96.19.64","mappingtype":868,"styleid":47,"lblPos":"位置:","pos":"1_8","lblNum":"库位数量:","lblPn":"物料编码:","lblDes":"描述:","lblNotes":"注意事项:","num":"234","pn":"R218","des":"描述内容","notes":"注意事项内容","边框":"","边框1":"","边框2":"","边框3":"","边框4":"","边框5":"","边框6":"","边框7":"","边框8":"","边框9":"","ledrgb":"ff00","ledstate":"0","outtime":"0"}]
Dictionary<string, object> map = new Dictionary<string, object>();
map.Add("lblPos", ResourceControl.GetString("Label_lblPos", "位置:"));
map.Add("lblNum", ResourceControl.GetString("Label_lblNum", "库存数量:"));
map.Add("lblPn", ResourceControl.GetString("Label_lblPn", "物料编码:"));
map.Add("lblDes", ResourceControl.GetString("Label_lblDes", "描述:"));
map.Add("lblNotes", ResourceControl.GetString("Label_lblNotes", "注意事项:"));
map.Add("pos", pos);
map.Add("num", num);
map.Add("pn", pn);
map.Add("des", des);
map.Add("notes", notes);
map.Add("styleid", 47);
map.Add("边框", "");
map.Add("边框1", "");
map.Add("边框2", "");
map.Add("边框3", "");
map.Add("边框4", "");
map.Add("边框5", "");
map.Add("边框6", "");
map.Add("边框7", "");
map.Add("边框8", "");
map.Add("边框9", "");
map.Add("mac", mac);
string ledrgb = openLed ? "ff00" : "0";
map.Add("ledrgb", ledrgb);
return map;
}
// {
// "mac":"99.96.19.64",
// "mappingtype":868,
// "styleid":47,
// "lblPos":"位置:",
// "pos":"1_8",
// "lblNum":"库位数量:",
// "lblPn":"物料编码:",
// "lblDes":"描述:",
// "lblNotes":"注意事项:",
// "num":"234",
// "pn":"R218",
// "des":"描述内容",
// "notes":"注意事项内容",
// "边框":"",
// "边框1":"",
// "边框2":"",
// "边框3":"",
// "边框4":"",
// "边框5":"",
// "边框6":"",
// "边框7":"",
// "边框8":"",
// "边框9":"",
// "ledrgb":"ff00",
// "ledstate":"0",
// "outtime":"0"
//}
//[{"mac":"99.96.19.64","mappingtype":868,"styleid":47,"lblPos":"位置:","pos":"1_8","lblNum":"库位数量:","lblPn":"物料编码:","lblDes":"描述:","lblNotes":"注意事项:","num":"234","pn":"R218","des":"描述内容","notes":"注意事项内容","边框":"","边框1":"","边框2":"","边框3":"","边框4":"","边框5":"","边框6":"","边框7":"","边框8":"","边框9":"","ledrgb":"ff00","ledstate":"0","outtime":"0"}]
}
}