示例#1
0
 private void LoadScanner()
 {
     //Scanner.GetScanner().Open();
     //Scanner.GetScanner().OnGetBarcodeEvent += new GetBarcodeEventHandler(Scanner_OnGetBarcodeEvent);
     ////MessageBox.Show("红外扫描已激活,请按键盘扫描键进行扫码!", "操作提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk, MessageBoxDefaultButton.Button1);
     USI_API_HT380W.Barcode1D_init();
 }
示例#2
0
        private void LoadScanner()
        {
            //Scanner.GetScanner().Open();
            //Scanner.GetScanner().OnGetBarcodeEvent += new GetBarcodeEventHandler(UCThirdParty_OnGetBarcodeEvent);

            USI_API_HT380W.Barcode1D_init();
        }
        /// <summary>
        /// 清理所有正在使用的资源。
        /// </summary>
        /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
        protected override void Dispose(bool disposing)
        {
            //UnitechDSDll.PreviewStop();

            ////移除当前的扫描响应事件处理方法
            //Scanner.GetScanner().OnGetBarcodeEvent -= Scanner_OnGetBarcodeEvent;
            ////使扫描不可用,即不可发红外光
            //Scanner.GetScanner().Close();

            //FrmParent.ParentForm.KeyDown -= new KeyEventHandler(ParentForm_KeyDown);
            USI_API_HT380W.Barcode1D_free();
            try
            {
                FrmParent.ParentForm.pbPreview.Visible = false;
                FrmParent.ParentForm.pbPreview.Parent  = FrmParent.ParentForm.pnlAbout;
            }
            catch
            {
            }
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }
示例#4
0
 void ParentForm_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.F19)
     {
         string b = USI_API_HT380W.GetScanData();
         //MessageBox.Show(b);
         this.txtOrderNumber.Text = b;
     }
 }
 /// <summary>
 /// 清理所有正在使用的资源。
 /// </summary>
 /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
 protected override void Dispose(bool disposing)
 {
     //移除当前的扫描响应事件处理方法
     //Scanner.GetScanner().OnGetBarcodeEvent -= UCThirdParty_OnGetBarcodeEvent;
     ////使扫描不可用,即不可发红外光
     //Scanner.GetScanner().Close();
     ////FrmParent.ParentForm.KeyDown -= new KeyEventHandler(ParentForm_KeyDown);
     USI_API_HT380W.Barcode1D_free();
     //FrmParent.IputChangeEvent -= new FrmParent.InputPnlChangeDelegate(FrmParent_IputChangeEvent);
     if (disposing && (components != null))
     {
         components.Dispose();
     }
     base.Dispose(disposing);
 }
示例#6
0
        private void LoadScanner()
        {
            try
            {
                //txtLog.Text += string.Format("相机已激活" + (_IsCameraActive ? "成功" : "失败"));
                //if (_IsCameraActive)
                //    txtLog.Text += ";[+]添加图片;[-]删除图片;\r\n";
                //else
                //    txtLog.Text += ",重启设备或许可以解决此问题!\r\n";

                //Scanner.GetScanner().Open();
                //Scanner.GetScanner().OnGetBarcodeEvent += new GetBarcodeEventHandler(Scanner_OnGetBarcodeEvent);
                USI_API_HT380W.Barcode1D_init();
                //txtLog.Text += ("红外扫描已激活,请按键盘扫描键进行扫码!\r\n");
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }