示例#1
0
 public frmSetNest(ref BarCode br)
 {
     InitializeComponent();
       _scanner = new BaseScannerControl(OnScan, this);
       _scanner.Init();
       _br = br;
 }
示例#2
0
        private void btnCollect_Click(object sender, EventArgs e)
        {
            if (_scanner != null)
              {
            _scanner.Close();
            _scanner = null;
              }
              BarCode br = new BarCode();
              frmSetAtm form = new frmSetAtm(ref br);
              form.Focus();
              if (form.ShowDialog() == DialogResult.OK)
              {
            if (br.IsEmpty == false)
            {
              lblAtmNumber.Text = br.BarCodeData;
              lblAtmNumber.ForeColor = Color.Red;
              _brAtm = br;
              //btnAddNest.Enabled = true;
              //btnAddNest.Focus();
              btnCollect.Text = "След. банкомат";
              btnClear.Enabled = false;
            }
              }
              else
              {
            //TODO:if the barcode is empty
              }

              if (_brAtm.IsEmpty == false)
              {
            _scanner = new BaseScannerControl(OnScan, this);
            _scanner.Init();
              }
        }