Ejemplo n.º 1
0
 // 시리얼 통신 시작
 void ReadingStart()
 {
     if (comm == null || !comm.actived)
     {
         comm = new DK1Interface();
         comm.eDataReceive += new EventHandler <DK1EventArgs>(comm_eDataReceive);
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// 통신 시작
        /// </summary>
        /// <returns></returns>
        public bool Run()
        {
            //if( comm == null )

            // 시리얼 통신
            if (comm == null || !comm.actived)
            {
                comm = new DK1Interface(mDataTable, mCommTable, mErrorTable, 1000);
                comm.eDataReceive += new EventHandler <DK1EventArgs>(comm_eDataReceive);
            }

            // UI 업데이트 타이머 시작되지 않았다면 시작
            if (!timer1.Enabled)
            {
                timer1.Enabled = true;
            }

            return(true);
        }