• 大小: 3.37MB
    文件类型: .rar
    金币: 2
    下载: 1 次
    发布日期: 2023-08-16
  • 语言: C/C++
  • 标签: 汉王  签字板  esp1020a  

资源简介

汉王电子签批屏ESP1020A二次开发包sdk,包含c#、c++、JavaScript开发示例。

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;

namespace HWPenSignDemoT
{
    public partial class Form1 : Form
    {
        //inform message definition
        static int complete_msg = 0x7ffe;
        static int cancel_msg = 0x7ffd;

        //return value of interface function
        static int HW_eOk = 0;      //success
        static int HW_eDeviceNotFound = -1;     //no device
        static int HW_eFailedLoadModule = -2;   //failed to load module
        static int HW_eFailedInitModule = -3;   //failed to inti module 
        static int HW_eWrongImageFormat = -4;   //do not support this image format
        static int HW_eNoSignData = -5;         //no sign data
        static int HW_eInvalidInput = -6;       //invalid input parameter
        static int width height;
        static int linespace = 55;
        int m_btnMsg;
        public Form1()
        {
            InitializeComponent();
            width = axHWPenSign1.Width;
            height = axHWPenSign1.Height;
            axHWPenSign1.HWSetBkColor(0xE0F8E0);
            axHWPenSign1.HWSetCtlframe(2 0x000000);
            axHWPenSign1.HWSetExtWndHandle(this.Handle.ToInt32());
            axHWPenSign1.HWSeparatorLine(height / linespace 0x000000);
        }

        private void button1_Click(object sender EventArgs e)
        {
            int res = 0;
            axHWPenSign1.HWMonitorWndEnable(300 300 400 300);
            res = axHWPenSign1.HWSwitchMonitor(1 0);
            
            //any cpu 编译                         
            Int64[] btnWndHandle = new Int64[4];
            //x86 编译                            
            //   Int32[] btnWndHandle = new Int32[4];
            btnWndHandle[0] = this.button1.Handle.ToInt32();
            btnWndHandle[1] = this.button2.Handle.ToInt32();
            btnWndHandle[2] = this.button3.Handle.ToInt32();
            btnWndHandle[3] = this.button4.Handle.ToInt32();

            IntPtr ptr = Marshal.AllocHGlobal(btnWndHandle.Length);
            Marshal.Copy(btnWndHandle 0 ptr btnWndHandle.Length);
            axHWPenSign1.HWRegisterAppButtonCallCSharp(4 ptr this.Handle.ToInt32() ref m_btnMsg);
            res = axHWPenSign1.HWInitC();
            if (res != HW_eOk)
            {
                MessageBox.Show(“Failed to open device“);
            }
            axHWPenSign1.HWSetPenMode(2);
        }

        private void button2_Click(object sender EventArgs e)
        {
            axHWPenSign1.HWSwitchMonitor(0 0);
            axHWPenSign1.HWCloseC();
        }

        private void button3_Click(object sender EventArgs e)
        {
            axHWPenSign1.HWClearPenSign();
        }

        private void button4_Click(object sender EventArgs e)
        {
            object path

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       9190  2017-08-28 15:27  ocx for SignProC_20170901\Demo.html

     文件       9216  2017-08-28 17:56  ocx for SignProC_20170901\HWPenSignDemoT\HWPenSignDemoT\bin\Release\AxInterop.HWPenSignLib.dll

     文件      11264  2017-08-28 17:56  ocx for SignProC_20170901\HWPenSignDemoT\HWPenSignDemoT\bin\Release\HWPenSignDemoT.exe

     文件        490  2009-06-11 05:14  ocx for SignProC_20170901\HWPenSignDemoT\HWPenSignDemoT\bin\Release\HWPenSignDemoT.vshost.exe.manifest

     文件       9728  2017-08-28 17:56  ocx for SignProC_20170901\HWPenSignDemoT\HWPenSignDemoT\bin\Release\Interop.HWPenSignLib.dll

     文件       9216  2017-08-28 17:57  ocx for SignProC_20170901\HWPenSignDemoT\HWPenSignDemoT\bin\x86\Release\AxInterop.HWPenSignLib.dll

     文件      11264  2017-08-28 17:57  ocx for SignProC_20170901\HWPenSignDemoT\HWPenSignDemoT\bin\x86\Release\HWPenSignDemoT.exe

     文件      24064  2017-08-28 17:57  ocx for SignProC_20170901\HWPenSignDemoT\HWPenSignDemoT\bin\x86\Release\HWPenSignDemoT.pdb

     文件      14848  2017-08-28 17:57  ocx for SignProC_20170901\HWPenSignDemoT\HWPenSignDemoT\bin\x86\Release\HWPenSignDemoT.vshost.exe

     文件        490  2009-06-11 05:14  ocx for SignProC_20170901\HWPenSignDemoT\HWPenSignDemoT\bin\x86\Release\HWPenSignDemoT.vshost.exe.manifest

     文件       9728  2017-08-28 17:57  ocx for SignProC_20170901\HWPenSignDemoT\HWPenSignDemoT\bin\x86\Release\Interop.HWPenSignLib.dll

     文件       4678  2017-08-28 17:51  ocx for SignProC_20170901\HWPenSignDemoT\HWPenSignDemoT\Form1.cs

     文件       4897  2017-08-28 17:27  ocx for SignProC_20170901\HWPenSignDemoT\HWPenSignDemoT\Form1.Designer.cs

     文件       6279  2017-08-28 17:27  ocx for SignProC_20170901\HWPenSignDemoT\HWPenSignDemoT\Form1.resx

     文件       4966  2017-08-28 17:57  ocx for SignProC_20170901\HWPenSignDemoT\HWPenSignDemoT\HWPenSignDemoT.csproj

     文件       9216  2017-08-28 17:17  ocx for SignProC_20170901\HWPenSignDemoT\HWPenSignDemoT\obj\Debug\AxInterop.HWPenSignLib.dll

     文件       1590  2017-08-28 17:56  ocx for SignProC_20170901\HWPenSignDemoT\HWPenSignDemoT\obj\Debug\HWPenSignDemoT.csproj.FileListAbsolute.txt

     文件        847  2017-08-28 17:27  ocx for SignProC_20170901\HWPenSignDemoT\HWPenSignDemoT\obj\Debug\HWPenSignDemoT.csproj.GenerateResource.Cache

     文件        550  2017-08-28 17:17  ocx for SignProC_20170901\HWPenSignDemoT\HWPenSignDemoT\obj\Debug\HWPenSignDemoT.csproj.ResolveComReference.cache

     文件      11776  2017-08-28 17:55  ocx for SignProC_20170901\HWPenSignDemoT\HWPenSignDemoT\obj\Debug\HWPenSignDemoT.exe

     文件        573  2017-08-28 17:27  ocx for SignProC_20170901\HWPenSignDemoT\HWPenSignDemoT\obj\Debug\HWPenSignDemoT.Form1.resources

     文件      28160  2017-08-28 17:55  ocx for SignProC_20170901\HWPenSignDemoT\HWPenSignDemoT\obj\Debug\HWPenSignDemoT.pdb

     文件        180  2017-08-28 17:20  ocx for SignProC_20170901\HWPenSignDemoT\HWPenSignDemoT\obj\Debug\HWPenSignDemoT.Properties.Resources.resources

     文件       9728  2017-08-28 17:17  ocx for SignProC_20170901\HWPenSignDemoT\HWPenSignDemoT\obj\Debug\Interop.HWPenSignLib.dll

     文件       9216  2017-08-28 17:56  ocx for SignProC_20170901\HWPenSignDemoT\HWPenSignDemoT\obj\Release\AxInterop.HWPenSignLib.dll

     文件       1616  2017-08-28 17:56  ocx for SignProC_20170901\HWPenSignDemoT\HWPenSignDemoT\obj\Release\HWPenSignDemoT.csproj.FileListAbsolute.txt

     文件        847  2017-08-28 17:56  ocx for SignProC_20170901\HWPenSignDemoT\HWPenSignDemoT\obj\Release\HWPenSignDemoT.csproj.GenerateResource.Cache

     文件        550  2017-08-28 17:56  ocx for SignProC_20170901\HWPenSignDemoT\HWPenSignDemoT\obj\Release\HWPenSignDemoT.csproj.ResolveComReference.cache

     文件      11264  2017-08-28 17:56  ocx for SignProC_20170901\HWPenSignDemoT\HWPenSignDemoT\obj\Release\HWPenSignDemoT.exe

     文件        573  2017-08-28 17:56  ocx for SignProC_20170901\HWPenSignDemoT\HWPenSignDemoT\obj\Release\HWPenSignDemoT.Form1.resources

............此处省略68个文件信息

评论

共有 条评论

相关资源