I`m developing a application using .NET CF 2.0 for both Intermec CK3 and CK30.
I`m using the latest and same version of the IntermecDataCollection for both versions of the app and the same code for reading barcodes.
The application works perfectly on CK3 (newst model) but when I try to read something using CK30 the result is a code different from the expected.
Usuaaly some characters appear in front of the correct code, but in some cases the result is totally different from the original.
Already Googloed with success.
Can anyone help me?
Sample of code working on CK3 and not on CK30:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.IO;
using System.Windows.Forms;
using WOPT_Coletor.ConectorWOPT;
using Intermec.DataCollection;
namespace WOPT_Coletor.view.CriarOT
{
public partial class frmCriarOT_5 : Form
{
public BarcodeReader leitor;
public frmCriarOT_5(int areaSelecionada, int tipoOT, long nlenr, int qtdEtq)
{
InitializeComponent();
//Instanciete the barcode reader class.
model.LeitorCodigoDeBarras classeLeitor = new model.LeitorCodigoDeBarras();
leitor = classeLeitor.LerCodigoDeBarras();
leitor.BarcodeRead += new BarcodeReadEventHandler(this.eventoLeitorCodigoDeBarras);
}
void eventoLeitorCodigoDeBarras(object sender, BarcodeReadEventArgs e)
{
tbMaterial.Text = e.strDataBuffer.Trim().ToUpper();
}
}
}
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using Intermec.DataCollection;
namespace WOPT_Coletor.model
{
class LeitorCodigoDeBarras
{
public BarcodeReader LerCodigoDeBarras()
{
try
{
BarcodeReader meuLeitor = new BarcodeReader("default", 4096);
meuLeitor.ScannerEnable = true;
meuLeitor.ThreadedRead(true);
return meuLeitor;
}
catch (BarcodeReaderException bx)
{
MessageBox.Show("Não foi possível inicializar o leitor de código de barras. Contate seu supervisor. \n" + bx.Message, "Erro", MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1);
return null;
}
}
}
}