UsrDemo.cs 1.7 KB
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 new Dictionary<string, string>();
        }

        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");
        }
    }
}