예제 #1
0
 public void Configure(IMvxPluginConfiguration configuration)
 {
     if ((configuration == null) || !(configuration is ScanningConfigCollection))
     {
         return;
     }
     _Config = configuration as ScanningConfigCollection;
 }
예제 #2
0
        private void Initialize(ScanningConfigCollection config)
        {
            if ((config == null) || (config.Count == 0)) throw new Exception("No keys found for initializations.");
            int codes = 0;
            foreach (var c in config)
            {
                InitConfig(c);
                codes |= c.Code;
            }
            //  configure which codes to search for - less codes = faster
            BarcodeConfig.MWB_setActiveCodes(codes);
            // search in both directions
            BarcodeConfig.MWB_setDirection(BarcodeConfig.MWB_SCANDIRECTION_HORIZONTAL | BarcodeConfig.MWB_SCANDIRECTION_VERTICAL);

            // set decoder effort level (1 - 5)
            // for live scanning scenarios, a setting between 1 to 3 will suffice
            // levels 4 and 5 are typically reserved for batch scanning
            BarcodeConfig.MWB_setLevel(2);
        }
예제 #3
0
        private async void Initialize(ScanningConfigCollection config)
        {
            if (config == null) throw new Exception("No keys found for initializations.");

            int codes = 0;
            foreach (var c in config)
            {
                InitConfig(c);
                codes |= c.Code;
            }
            //  configure which codes to search for - less codes = faster
            BarcodeLib.Scanner.MWBsetActiveCodes(codes);

            // set decoder effort level (1 - 5)
            // for live scanning scenarios, a setting between 1 to 3 will suffice
            // levels 4 and 5 are typically reserved for batch scanning
            BarcodeLib.Scanner.MWBsetLevel(2);

            _Timer = new Timer(ProcessStart, null, 10, 10);
        }
예제 #4
0
        private void Initialize(ScanningConfigCollection config)
        {
            if ((config == null) || (config.Count == 0))
            {
                throw new Exception("No keys found for initializations.");
            }
            int codes = 0;

            foreach (var c in config)
            {
                InitConfig(c);
                codes |= c.Code;
            }
            //  configure which codes to search for - less codes = faster
            BarcodeConfig.MWB_setActiveCodes(codes);
            // search in both directions
            BarcodeConfig.MWB_setDirection(BarcodeConfig.MWB_SCANDIRECTION_HORIZONTAL | BarcodeConfig.MWB_SCANDIRECTION_VERTICAL);

            // set decoder effort level (1 - 5)
            // for live scanning scenarios, a setting between 1 to 3 will suffice
            // levels 4 and 5 are typically reserved for batch scanning
            BarcodeConfig.MWB_setLevel(2);
        }
예제 #5
0
        private async void Initialize(ScanningConfigCollection config)
        {
            if (config == null)
            {
                throw new Exception("No keys found for initializations.");
            }

            int codes = 0;

            foreach (var c in config)
            {
                InitConfig(c);
                codes |= c.Code;
            }
            //  configure which codes to search for - less codes = faster
            BarcodeLib.Scanner.MWBsetActiveCodes(codes);

            // set decoder effort level (1 - 5)
            // for live scanning scenarios, a setting between 1 to 3 will suffice
            // levels 4 and 5 are typically reserved for batch scanning
            BarcodeLib.Scanner.MWBsetLevel(2);

            _Timer = new Timer(ProcessStart, null, 10, 10);
        }
예제 #6
0
 public ScanningService(ScanningConfigCollection config)
 {
     Initialize(config);
 }
예제 #7
0
 public void Configure(IMvxPluginConfiguration configuration)
 {
     if ((configuration == null) || !(configuration is ScanningConfigCollection)) return;
     _Config = configuration as ScanningConfigCollection;
 }
예제 #8
0
 public ScanningService(ScanningConfigCollection config)
 {
     Initialize(config);
 }