Beispiel #1
0
        private void BarcodeChar(char c)
        {
            if (c == firstChar)
            {
                bc   = "";
                inBc = true;
            }
            else if (c == lastChar)
            {
                if (inBc)
                {
                    // Got one
                    var args = new BCEventArgs();
                    if (settings.prefix == 'A' && bc.Length > 2)  //AIM Code is 1st 3 chars
                    {
                        args.val = bc.Substring(2);
                    }
                    else
                    {
                        args.val = bc;
                    }

                    OnBarcodeRead(args);

                    inBc = false;
                    bc   = "";
                }
            }
            else if (inBc)
            {
                bc += c;
            }
        }
Beispiel #2
0
        protected virtual void OnBarcodeRead(BCEventArgs e)
        {
            var handler = BarcodeRead;

            if (handler != null)
            {
                handler(this, e);
            }
        }