Example #1
0
        /// <summary>
        /// 获取唯一实例
        /// </summary>
        /// <param name="frmMain"></param>
        /// <returns></returns>
        public static ResultJudge GetResultJudge(AutoWriteProcess frmMain)
        {
            if (resultJudge == null)
            {
                resultJudge = new ResultJudge(frmMain);
            }

            return(resultJudge);
        }
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="frmMain"></param>
        public ReadWriteIdHandle(AutoWriteProcess frmMain)
        {
            ReadWriteIdHandleInfo.ReadConfig();
            checkDeviceInterval = ReadWriteIdHandleInfo.CheckDeviceInterval;

            this.frmMain    = frmMain;
            flagDisplayUart = true;
            sp = SerialPortFactory.GetSerialPort();
            sp.DataReceived += Sp_DataReceived;
            SpOpen();
        }
Example #3
0
 /// <summary>
 /// 私有构造函数
 /// </summary>
 /// <param name="frmMain"></param>
 private ResultJudge(AutoWriteProcess frmMain)
 {
     this.frmMain = frmMain;
 }