示例#1
0
        private void CheckLaserInfo()
        {
            LaserC00Request c00   = new LaserC00Request();
            var             bytes = serialPortCom.Encode(c00);

            byte[] recData = serialPortCom.SendData(bytes);
            if (recData != null)
            {
                LaserBaseResponse baseResponse = serialPortCom.LaserBaseResponse(bytes, recData);
                if (baseResponse != null)
                {
                    LaserC00Response c00r = baseResponse as LaserC00Response;
                    if (c00r != null)
                    {
                        lblLaserVersion.Text = c00r.VersionNumber.ToString();
                        lblWorkingHour.Text  = string.Format("{0} : {1}", c00r.Hour, c00r.Month);
                    }
                }
            }
        }