Пример #1
0
 public void OutPutTags(ClouReaderAPI.Models.Tag_Model tag_Model)
 {
     lock (dic_Rows)
     {
         // if (!IsStartOrStop) return;
         if (tag_Model == null || tag_Model.Result != 0x00)
         {
             return;
         }
         bool            isNew = false;
         DataGridViewRow dgvr  = null;
         try
         {
             if (!list_Tags.Contains(tag_Model.EPC + "|" + tag_Model.TID))
             {
                 list_Tags.Add(tag_Model.EPC + "|" + tag_Model.TID);
             }// tag_Model.ReaderName + "|" +
             if (!dic_Rows.ContainsKey(tag_Model.EPC + "|" + tag_Model.TID))
             {
                 dgvr = new DataGridViewRow();
                 dgvr.CreateCells(dgv_Tags, new object[] { tag_Model.TagType, tag_Model.EPC, tag_Model.TID, tag_Model.UserData, tag_Model.TagetData, tag_Model.TotalCount, tag_Model.ANT1_COUNT, tag_Model.ANT2_COUNT, tag_Model.ANT3_COUNT, tag_Model.ANT4_COUNT, tag_Model.RSSI });
                 dic_Rows.Add(tag_Model.EPC + "|" + tag_Model.TID, dgvr);
                 isNew = true;
             }
             else
             {
                 dgvr = dic_Rows[tag_Model.EPC + "|" + tag_Model.TID];
             }
         }
         catch { }
         AddSingleTag(tag_Model, dgvr, isNew);
     }
 }
        public void OutPutTags(ClouReaderAPI.Models.Tag_Model tag_Model)
        {
            lock (dic_Rows)
            {
                if (!IsStartOrStop)
                {
                    return;
                }
                //if (MaxCount > 0 && dic_Rows.Count == MaxCount)                 // 限张数读取
                //{
                //    lb_TagCount.Text = dic_Rows.Count.ToString();
                //    pb_Read.Value = pb_Read.Maximum;
                //    lb_ProcessCount.Text = "100%";
                //    btn_StartReadTest_Click(null, null);
                //    return;
                //}
                // ImmediateFlush();
                TotalReadTagCount++;
                if (tag_Model == null || tag_Model.Result != 0x00)
                {
                    return;
                }
                bool            isNew = false;
                DataGridViewRow dgvr  = null;

                try
                {
                    if (!dic_Rows.ContainsKey(tag_Model.EPC + "|" + tag_Model.TID))
                    {
                        dgvr = new DataGridViewRow();
                        dgvr.CreateCells(dgv_Tags, new object[] { tag_Model.TagType, tag_Model.EPC, tag_Model.TID, tag_Model.UserData, tag_Model.TagetData, tag_Model.TotalCount, tag_Model.ANT1_COUNT, tag_Model.ANT2_COUNT, tag_Model.ANT3_COUNT, tag_Model.ANT4_COUNT, tag_Model.RSSI });
                        dic_Rows.Add(tag_Model.EPC + "|" + tag_Model.TID, dgvr);
                        isNew = true;
                    }
                    else
                    {
                        dgvr = dic_Rows[tag_Model.EPC + "|" + tag_Model.TID];
                    }
                }
                catch { }
                AddSingleTag(tag_Model, dgvr, isNew);
            }
        }
Пример #3
0
 public void OutPutTags(ClouReaderAPI.Models.Tag_Model tag_Model)
 {
     lock (dic_Rows)
     {
         // if (!IsStartOrStop) return;
         if (tag_Model == null || tag_Model.Result != 0x00)
         {
             return;
         }
         bool            isNew = false;
         DataGridViewRow dgvr  = null;
         try
         {
             if (!list_Tags.Contains(tag_Model.EPC + "|" + tag_Model.TID))
             {
                 list_Tags.Add(tag_Model.EPC + "|" + tag_Model.TID);
             }// tag_Model.ReaderName + "|" +
             if (!dic_Rows.ContainsKey(tag_Model.EPC + "|" + tag_Model.TID))
             {
                 dgvr = new DataGridViewRow();
                 if (tag_Model.ReaderName.Equals(_Reader_ConnectID_1))  // 如果是1号读写器读到新标签
                 {
                     dgvr.CreateCells(dgv_Tags, new object[] { tag_Model.TagType, tag_Model.EPC, tag_Model.TID, tag_Model.UserData, tag_Model.TagetData, tag_Model.TotalCount, tag_Model.ANT1_COUNT, tag_Model.ANT2_COUNT, tag_Model.ANT3_COUNT, tag_Model.ANT4_COUNT, minCount, minCount, minCount, minCount, tag_Model.RSSI });
                 }
                 else                                                    // 非1号读写器读到新标签
                 {
                     dgvr.CreateCells(dgv_Tags, new object[] { tag_Model.TagType, tag_Model.EPC, tag_Model.TID, tag_Model.UserData, tag_Model.TagetData, tag_Model.TotalCount, minCount, minCount, minCount, minCount, tag_Model.ANT1_COUNT, tag_Model.ANT2_COUNT, tag_Model.ANT3_COUNT, tag_Model.ANT4_COUNT, tag_Model.RSSI });
                 }
                 dic_Rows.Add(tag_Model.EPC + "|" + tag_Model.TID, dgvr);
                 isNew = true;
             }
             else
             {
                 dgvr = dic_Rows[tag_Model.EPC + "|" + tag_Model.TID];
             }
         }
         catch { System.Diagnostics.Debug.WriteLine("11111111"); }
         AddSingleTag(tag_Model, dgvr, isNew);
     }
 }
Пример #4
0
        public void OutPutTags(ClouReaderAPI.Models.Tag_Model tag_Model)
        {
            lock (dic_Rows)
            {
                if (!IsStartOrStop)
                {
                    return;
                }
                if (tag_Model == null || tag_Model.Result != 0x00)
                {
                    return;
                }
                bool            isNew = false;
                DataGridViewRow dgvr  = null;

                try
                {
                    if (!dic_Rows.ContainsKey(tag_Model.EPC + "|" + tag_Model.TID))
                    {
                        dgvr = new DataGridViewRow();
                        dgvr.CreateCells(dgv_Tags, new object[] { tag_Model.TagType, tag_Model.EPC, tag_Model.TID, tag_Model.UserData, tag_Model.TagetData, tag_Model.TotalCount, tag_Model.ANT1_COUNT, tag_Model.ANT2_COUNT, tag_Model.ANT3_COUNT, tag_Model.ANT4_COUNT, tag_Model.RSSI });
                        dic_Rows.Add(tag_Model.EPC + "|" + tag_Model.TID, dgvr);
                        isNew = true;
                        if (Check(tag_Model) && dgvr != null)           // 判断是否是待检测标签
                        {
                            dgvr.DefaultCellStyle.BackColor = Color.Green;
                            lock (_LockBeepObject_Yellow) { Monitor.Pulse(_LockBeepObject_Yellow); }
                            _NowTotalCheck++;
                        }
                    }
                    else
                    {
                        dgvr = dic_Rows[tag_Model.EPC + "|" + tag_Model.TID];
                    }
                }
                catch { }
                AddSingleTag(tag_Model, dgvr, isNew);
            }
        }