1

Intermec CK3 と CK30 の両方に .NET CF 2.0 を使用してアプリケーションを開発しています。

アプリの両方のバージョンに最新の同じバージョンの IntermecDataCollection を使用し、バーコードを読み取るための同じコードを使用しています。

アプリケーションは CK3 (最新モデル) で完全に動作しますが、CK30 を使用して何かを読み取ろうとすると、結果が予想とは異なるコードになります。

通常、正しいコードの前にいくつかの文字が表示されますが、元のコードとはまったく異なる結果になる場合があります。

すでにグーグルで成功しています。

誰でも私を助けることができますか?

CK30 ではなく CK3 で動作するコードのサンプル:

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;
            }
        }
    }
}
4

1 に答える 1