Xinji PDA 9700 scan head call

Keywords: Java SDK Programming Mobile

Several PDAs have been made this year, with different models. However, the scan heads of these PDAs are all the same (the manufacturer needs to provide SDK), and the latest PDA scan is recorded here

java and c ා are almost the same. They are different in some aspects. They use ":" and LINQ, Contractual programming (only using data contracts) feel more. (in addition, kotlin is compatible with java, but it is similar to C ා)

Like PDA (window ce and window mobile 6) can only be used in vs2008. It introduces several SDKs that need to be used. The SDKs of each manufacturer are different (the same manufacturer may have different models and SDKs), so you need to ask the manufacturer to provide them or find them on the official website (DU Niang can also use them)


Don't talk about it. Go straight to the code

using System;
using System.Device9700;
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DeviceInterface;


namespace Divce9700Project
{
    public partial class Form1 : Form
    {
        private PDADevice mPDADevice;

        public Form1()
        {
            InitializeComponent();
        }
        /// <summary>
        //Initialization
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Form1_Load(object sender, EventArgs e)
        {
            mPDADevice = new PDADevice();
            openScan();
            mPDADevice.SetScanMode(TriggerMode.Normal);//TriggerMode.Continuous
        }
        /// <summary>
        ///Scan on
        /// </summary>
        private void openScan()
        {
            mPDADevice.ScannerStartScan();
            mPDADevice.OnScannerEvent += new EventHandler<ScanEventArgs>(mScanner_DataArrivedEvent);
        }


        /// <summary>
        ///Turn off scanning
        /// </summary>
        private void closeScan()
        {
            mPDADevice.ScannerStopScan();
            mPDADevice.OnScannerEvent -= new EventHandler<ScanEventArgs>(mScanner_DataArrivedEvent);
        }
        /// <summary>
        ///Barcode scanning trigger event
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void mScanner_DataArrivedEvent(object sender, ScanEventArgs e)
        {
            
            try
            {
                String code = e.Barcode;//Bar code acquisition
                label1.Text =code;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
            
       
        }


        /// <summary>
        /// end
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Frmscan_closed(object sender, EventArgs e)
        {
            closeScan();
            this.Close();
        }
    }
}

In this way, the scan head of PDA can be called

Source code


Posted by demouser on Wed, 15 Apr 2020 12:34:46 -0700