Esempio n. 1
0
 private void InitConfig(ScanningConfig config)
 {
     //  register the plugin - must be done foreach not using the full bitmask
     if (config.Code == BarcodeConfig.MWB_CODE_MASK_39)
     {
         BarcodeConfig.MWB_registerCode(BarcodeConfig.MWB_CODE_MASK_39, config.UserName, config.Key);
         BarcodeConfig.MWBsetScanningRect(BarcodeConfig.MWB_CODE_MASK_39, RECT_FULL_1D);
     }
     else if (config.Code == BarcodeConfig.MWB_CODE_MASK_93)
     {
         BarcodeConfig.MWB_registerCode(BarcodeConfig.MWB_CODE_MASK_93, config.UserName, config.Key);
         BarcodeConfig.MWBsetScanningRect(BarcodeConfig.MWB_CODE_MASK_93, RECT_FULL_1D);
     }
     else if (config.Code == BarcodeConfig.MWB_CODE_MASK_25)
     {
         BarcodeConfig.MWB_registerCode(BarcodeConfig.MWB_CODE_MASK_25, config.UserName, config.Key);
         BarcodeConfig.MWBsetScanningRect(BarcodeConfig.MWB_CODE_MASK_25, RECT_FULL_1D);
     }
     else if (config.Code == BarcodeConfig.MWB_CODE_MASK_128)
     {
         BarcodeConfig.MWB_registerCode(BarcodeConfig.MWB_CODE_MASK_128, config.UserName, config.Key);
         BarcodeConfig.MWBsetScanningRect(BarcodeConfig.MWB_CODE_MASK_128, RECT_FULL_1D);
     }
     else if (config.Code == BarcodeConfig.MWB_CODE_MASK_AZTEC)
     {
         BarcodeConfig.MWB_registerCode(BarcodeConfig.MWB_CODE_MASK_AZTEC, config.UserName, config.Key);
         BarcodeConfig.MWBsetScanningRect(BarcodeConfig.MWB_CODE_MASK_AZTEC, RECT_FULL_2D);
     }
     else if (config.Code == BarcodeConfig.MWB_CODE_MASK_DM)
     {
         BarcodeConfig.MWB_registerCode(BarcodeConfig.MWB_CODE_MASK_DM, config.UserName, config.Key);
         BarcodeConfig.MWBsetScanningRect(BarcodeConfig.MWB_CODE_MASK_DM, RECT_FULL_2D);
     }
     else if (config.Code == BarcodeConfig.MWB_CODE_MASK_EANUPC)
     {
         BarcodeConfig.MWB_registerCode(BarcodeConfig.MWB_CODE_MASK_EANUPC, config.UserName, config.Key);
         BarcodeConfig.MWBsetScanningRect(BarcodeConfig.MWB_CODE_MASK_EANUPC, RECT_FULL_1D);
     }
     else if (config.Code == BarcodeConfig.MWB_CODE_MASK_QR)
     {
         BarcodeConfig.MWB_registerCode(BarcodeConfig.MWB_CODE_MASK_QR, config.UserName, config.Key);
         BarcodeConfig.MWBsetScanningRect(BarcodeConfig.MWB_CODE_MASK_QR, RECT_FULL_2D);
     }
     else if (config.Code == BarcodeConfig.MWB_CODE_MASK_PDF)
     {
         BarcodeConfig.MWB_registerCode(BarcodeConfig.MWB_CODE_MASK_PDF, config.UserName, config.Key);
         BarcodeConfig.MWBsetScanningRect(BarcodeConfig.MWB_CODE_MASK_PDF, RECT_FULL_1D);
     }
     else if (config.Code == BarcodeConfig.MWB_CODE_MASK_RSS)
     {
         BarcodeConfig.MWB_registerCode(BarcodeConfig.MWB_CODE_MASK_RSS, config.UserName, config.Key);
         BarcodeConfig.MWBsetScanningRect(BarcodeConfig.MWB_CODE_MASK_RSS, RECT_FULL_1D);
     }
     else if (config.Code == BarcodeConfig.MWB_CODE_MASK_CODABAR)
     {
         BarcodeConfig.MWB_registerCode(BarcodeConfig.MWB_CODE_MASK_CODABAR, config.UserName, config.Key);
         BarcodeConfig.MWBsetScanningRect(BarcodeConfig.MWB_CODE_MASK_CODABAR, RECT_FULL_1D);
     }
     else if (config.Code == BarcodeConfig.MWB_CODE_MASK_DOTCODE)
     {
         BarcodeConfig.MWB_registerCode(BarcodeConfig.MWB_CODE_MASK_DOTCODE, config.UserName, config.Key);
         BarcodeConfig.MWBsetScanningRect(BarcodeConfig.MWB_CODE_MASK_DOTCODE, RECT_DOTCODE);
     }
     else if (config.Code == BarcodeConfig.MWB_CODE_MASK_11)
     {
         BarcodeConfig.MWB_registerCode(BarcodeConfig.MWB_CODE_MASK_11, config.UserName, config.Key);
         BarcodeConfig.MWBsetScanningRect(BarcodeConfig.MWB_CODE_MASK_11, RECT_FULL_1D);
     }
     else if (config.Code == BarcodeConfig.MWB_CODE_MASK_MSI)
     {
         BarcodeConfig.MWB_registerCode(BarcodeConfig.MWB_CODE_MASK_MSI, config.UserName, config.Key);
         BarcodeConfig.MWBsetScanningRect(BarcodeConfig.MWB_CODE_MASK_MSI, RECT_FULL_1D);
     }
 }
Esempio n. 2
0
 private void InitConfig(ScanningConfig config)
 {
     //  register the plugin - must be done foreach not using the full bitmask
     if (config.Code == BarcodeConfig.MWB_CODE_MASK_39)
     {
         BarcodeConfig.MWB_registerCode(BarcodeConfig.MWB_CODE_MASK_39, config.UserName, config.Key);
         BarcodeConfig.MWBsetScanningRect(BarcodeConfig.MWB_CODE_MASK_39, RECT_FULL_1D);
     }
     else if (config.Code == BarcodeConfig.MWB_CODE_MASK_93)
     {
         BarcodeConfig.MWB_registerCode(BarcodeConfig.MWB_CODE_MASK_93, config.UserName, config.Key);
         BarcodeConfig.MWBsetScanningRect(BarcodeConfig.MWB_CODE_MASK_93, RECT_FULL_1D);
     }
     else if (config.Code == BarcodeConfig.MWB_CODE_MASK_25)
     {
         BarcodeConfig.MWB_registerCode(BarcodeConfig.MWB_CODE_MASK_25, config.UserName, config.Key);
         BarcodeConfig.MWBsetScanningRect(BarcodeConfig.MWB_CODE_MASK_25, RECT_FULL_1D);
     }
     else if (config.Code == BarcodeConfig.MWB_CODE_MASK_128)
     {
         BarcodeConfig.MWB_registerCode(BarcodeConfig.MWB_CODE_MASK_128, config.UserName, config.Key);
         BarcodeConfig.MWBsetScanningRect(BarcodeConfig.MWB_CODE_MASK_128, RECT_FULL_1D);
     }
     else if (config.Code == BarcodeConfig.MWB_CODE_MASK_AZTEC)
     {
         BarcodeConfig.MWB_registerCode(BarcodeConfig.MWB_CODE_MASK_AZTEC, config.UserName, config.Key);
         BarcodeConfig.MWBsetScanningRect(BarcodeConfig.MWB_CODE_MASK_AZTEC, RECT_FULL_2D);
     }
     else if (config.Code == BarcodeConfig.MWB_CODE_MASK_DM)
     {
         BarcodeConfig.MWB_registerCode(BarcodeConfig.MWB_CODE_MASK_DM, config.UserName, config.Key);
         BarcodeConfig.MWBsetScanningRect(BarcodeConfig.MWB_CODE_MASK_DM, RECT_FULL_2D);
     }
     else if (config.Code == BarcodeConfig.MWB_CODE_MASK_EANUPC)
     {
         BarcodeConfig.MWB_registerCode(BarcodeConfig.MWB_CODE_MASK_EANUPC, config.UserName, config.Key);
         BarcodeConfig.MWBsetScanningRect(BarcodeConfig.MWB_CODE_MASK_EANUPC, RECT_FULL_1D);
     }
     else if (config.Code == BarcodeConfig.MWB_CODE_MASK_QR)
     {
         BarcodeConfig.MWB_registerCode(BarcodeConfig.MWB_CODE_MASK_QR, config.UserName, config.Key);
         BarcodeConfig.MWBsetScanningRect(BarcodeConfig.MWB_CODE_MASK_QR, RECT_FULL_2D);
     }
     else if (config.Code == BarcodeConfig.MWB_CODE_MASK_PDF)
     {
         BarcodeConfig.MWB_registerCode(BarcodeConfig.MWB_CODE_MASK_PDF, config.UserName, config.Key);
         BarcodeConfig.MWBsetScanningRect(BarcodeConfig.MWB_CODE_MASK_PDF, RECT_FULL_1D);
     }
     else if (config.Code == BarcodeConfig.MWB_CODE_MASK_RSS)
     {
         BarcodeConfig.MWB_registerCode(BarcodeConfig.MWB_CODE_MASK_RSS, config.UserName, config.Key);
         BarcodeConfig.MWBsetScanningRect(BarcodeConfig.MWB_CODE_MASK_RSS, RECT_FULL_1D);
     }
     else if (config.Code == BarcodeConfig.MWB_CODE_MASK_CODABAR)
     {
         BarcodeConfig.MWB_registerCode(BarcodeConfig.MWB_CODE_MASK_CODABAR, config.UserName, config.Key);
         BarcodeConfig.MWBsetScanningRect(BarcodeConfig.MWB_CODE_MASK_CODABAR, RECT_FULL_1D);
     }
     else if (config.Code == BarcodeConfig.MWB_CODE_MASK_DOTCODE)
     {
         BarcodeConfig.MWB_registerCode(BarcodeConfig.MWB_CODE_MASK_DOTCODE, config.UserName, config.Key);
         BarcodeConfig.MWBsetScanningRect(BarcodeConfig.MWB_CODE_MASK_DOTCODE, RECT_DOTCODE);
     }
     else if (config.Code == BarcodeConfig.MWB_CODE_MASK_11)
     {
         BarcodeConfig.MWB_registerCode(BarcodeConfig.MWB_CODE_MASK_11, config.UserName, config.Key);
         BarcodeConfig.MWBsetScanningRect(BarcodeConfig.MWB_CODE_MASK_11, RECT_FULL_1D);
     }
     else if (config.Code == BarcodeConfig.MWB_CODE_MASK_MSI)
     {
         BarcodeConfig.MWB_registerCode(BarcodeConfig.MWB_CODE_MASK_MSI, config.UserName, config.Key);
         BarcodeConfig.MWBsetScanningRect(BarcodeConfig.MWB_CODE_MASK_MSI, RECT_FULL_1D);
     }
 }