Ejemplo n.º 1
0
        public Form1()
        {
            InitializeComponent();

            SetTextCallback   logCallback      = new SetTextCallback(AddLog_d);
            ReciveMsgCallback msgRecivCallback = new ReciveMsgCallback(msgRecive);

            m_ControlBoard  = new ControlBoard(serialPort1, logCallback, msgRecivCallback);
            m_barcodeSender = new BarcodeSender(serialPort2);
            m_memoryManger  = new MemoryManager(smartMemory1);


            label_curTime.Text = DateTime.Now.ToLongTimeString();
            label_runTime.Text = m_runTime.ToLongTimeString();

            // ModeInit();
            // ModeInit();

            //SettingInit();
            SettingInit();


            smartTimer1.Interval = 1000;    // 1000msec
            smartTimer1.Start();
            smartTimer2.Interval = 1000;    // 1000msec
            smartTimer2.Start();
        }
Ejemplo n.º 2
0
        public ControlBoard(SerialPort serialPort, SetTextCallback logFunction, ReciveMsgCallback reciveFunction)
        {
            this.m_serialPort        = serialPort;
            this.logFunctionCallback = logFunction;
            this.reciveMsgCallback   = reciveFunction;
            this.m_messageReciver    = new MessageReciver(logFunction);

            Init();
        }