예제 #1
0
        private void buttonGetBuffLength_Click(object sender, EventArgs e)
        {
            byte SaveLen = 0;

            try
            {
                ErrorsCatcher.errorName = RWDev.GetSaveLen(ref RWDev.comAddress, ref SaveLen, RWDev.frmComPortIndex);
                if (ErrorsCatcher.errorName == 0)
                {
                    if (SaveLen == 0)
                    {
                        radioButton128bitBuff.Checked = true;
                    }
                    else
                    {
                        radioButton496bitBuff.Checked = true;
                    }
                    string strLog = "Get buffer EPC/TID length success " + Environment.NewLine;
                    richTextBoxLogs.AppendText(strLog);
                }
                else
                {
                    string strLog = "Get buffer EPC/TID length failed " + ErrorsCatcher.GetReturnCodeDesc(ErrorsCatcher.errorName) + Environment.NewLine;
                    richTextBoxLogs.AppendText(strLog);
                    return;
                }
            }
            catch
            {
                richTextBoxLogs.AppendText("Get buffer EPC/TID length failed!" + Environment.NewLine);
            }
        }