예제 #1
0
        public virtual void Reader_OnTagReportedPMBar(string bar)
        {
            TagDetailInfo tag = GetTagDetailInfoByBar(bar);

            string errorMsg = "";

            if (!checkTagOK(tag, out errorMsg))
            {
                mErrorForm.showErrorInfo(bar, tag, errorMsg);
                return;
            }

            if (tag != null)   //合法EPC
            {
                mTagDetailList.Add(tag);
                if (!tag.IsAddEpc)   //主条码
                {
                    mMainEpcNumber++;
                }
                else
                {
                    mAddEpcNumber++;
                }
            }
            else
            {
                mErrorEpcNumber++;
            }

            UpdateView();
        }
예제 #2
0
 public void showErrorInfo(List <TagDetailInfo> tags, string errormsg)
 {
     Invoke(new Action(() =>
     {
         if (mErrorForm != null)
         {
             mErrorForm.showErrorInfo(tags, errormsg);
         }
     }));
 }
예제 #3
0
        public virtual void reportEpc(string epc)
        {
            if (!isInventory || string.IsNullOrEmpty(epc) || ignore(epc))
            {
                return;
            }
            if (!epcList.Contains(epc))
            {
                lastReadTime = DateTime.Now;

                TagDetailInfo tag = GetTagDetailInfoByEpc(epc);

                string errorMsg = "";
                if (!checkTagOK(tag, out errorMsg))
                {
                    mErrorForm.showErrorInfo(tag.EPC, tag, errorMsg);
                    return;
                }

                if (tag != null)   //合法EPC
                {
                    tagDetailList.Add(tag);
                    if (!tag.IsAddEpc)   //主条码
                    {
                        mainEpcNumber++;
                    }
                    else
                    {
                        addEpcNumber++;
                    }
                }
                else
                {
                    errorEpcNumber++;
                }

                epcList.Add(epc);
                UpdateView();
            }
        }