Exemple #1
0
        /// <summary>
        /// 将条形码查询所得的商品信息显示在界面上
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ShowMerchandiseInfoInDatagrid(object sender, TX200Scanner.BarcodeScannerEventArgs e)
        {
            if (e.Code != "")
            {
                char[] trimchars = new char[2] {
                    '\0', ' '
                };
                string code = e.Code.Trim(trimchars);
                APIClient.MerchandiseInfoShow info = client.GetMerchandiseInfo(new APIClient.Barcode()
                {
                    barcode = code
                });
                System.Threading.Thread.Sleep(3000);
                SetDataGridViewInfo(dataGridView1, info);
                //保存本次查询结果
                lastinfo = info;

                //启动RFID扫描器
                startInventory();
                //启动定时器,在后续3s内扫到RFID tag为有效
                UHFtimer.Stop();
                UHFtimer.Interval = 3000;
                UHFtimer.Start();
            }
        }
Exemple #2
0
 /// <summary>
 /// 将最近一次条形码扫描结果显示在界面上
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void ShowCodeInTextBox(object sender, TX200Scanner.BarcodeScannerEventArgs e)
 {
     if (e.Code != "")
     {
         string code = e.Code.Trim('\0', ' ');
         SetDataText(richTextBox1, code);
     }
 }