UsrDemo.cs
1.6 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
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;
using Interface;
namespace MES
{
public partial class User : Asa.Face.BaseCtls, IUserControl
{
private log4net.ILog LOG;
public User()
{
InitializeComponent();
}
public int ID => -1;
public bool IsConn { get; set; }
public bool LabelOCR { get; set; }
public bool Match { get; set; }
public event PrintEvent Printing;
public event SerialNoEvent GetSN;
public void SetLog(string log)
{
LOG = log4net.LogManager.GetLogger(log);
}
public bool Check()
{
return true;
}
public bool Connect()
{
return true;
}
public Control GetControl()
{
return this;
}
public Dictionary<string, string> GetPrint()
{
return null;
}
public void Preview()
{
}
public bool Print(int time)
{
return true;
}
public void SetCode(string[] code)
{
}
public void SetOcrText(Dictionary<string, string> text)
{
}
public bool SetOcrText(string text)
{
return true;
}
private void button1_Click(object sender, EventArgs e)
{
Printing?.Invoke("");
GetSN?.Invoke("");
LOG.Info("MES Button");
}
}
}