资源简介
本接口sdk包含了vb/vb.net/c#等语言的接口代码,可以直接使用或是扩展开发
代码片段和文件信息
/**********************************************************
* Demo for Standalone SDK.Created by Darcy on Oct.15 2009*
***********************************************************/
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Threading;
using Microsoft.Win32;
namespace AccessControl
{
public partial class ACMain : Form
{
public ACMain()
{
InitializeComponent();
}
//Create Standalone SDK class dynamicly.
public zkemkeeper.CZKEMClass axCZKEM1 = new zkemkeeper.CZKEMClass();
const int NOGroupIndex = 101; // Normally Open
const int NCGroupIndex = 102; // Normally Close
/********************************************************************************************************************************************
* Before you refer to this demowe strongly suggest you read the development manual deeply first. *
* This part is for demonstrating the communication with your device.There are 3 communication ways: “TCP/IP““Serial Port“ and “USB Client“.*
* The communication way which you can use duing to the model of the device. *
* *******************************************************************************************************************************************/
#region Communication
private bool bIsConnected = false;//the boolean value identifies whether the device is connected
private int iMachineNumber = 1;//the serial number of the device.After connecting the device this value will be changed.
//If your device supports the TCP/IP communications you can refer to this.
//when you are using the tcp/ip communicationyou can distinguish different devices by their IP address.
private void btnConnect_Click(object sender EventArgs e)
{
if (txtIP.Text.Trim() == ““ || txtPort.Text.Trim() == ““)
{
MessageBox.Show(“IP and Port cannot be null“ “Error“);
return;
}
int idwErrorCode = 0;
Cursor = Cursors.WaitCursor;
if (btnConnect.Text == “DisConnect“)
{
axCZKEM1.Disconnect();
bIsConnected = false;
btnConnect.Text = “Connect“;
lblState.Text = “Current State:DisConnected“;
Cursor = Cursors.Default;
return;
}
bIsConnected = axCZKEM1.Connect_Net(txtIP.Text Convert.ToInt32(txtPort.Text));
if (bIsConnected == true)
{
btnConnect.Text = “DisConnect“;
btnConnect.Refresh();
lblState
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1269 2013-09-09 14:57 考勤机sdk文件\32位Demo\C#\Black&White(黑白屏)\AccessControl\Access.sln
文件 22016 2013-09-09 14:57 考勤机sdk文件\32位Demo\C#\Black&White(黑白屏)\AccessControl\Access.suo
文件 6405 2013-09-09 14:57 考勤机sdk文件\32位Demo\C#\Black&White(黑白屏)\AccessControl\AccessControl.csproj
文件 486 2013-09-09 14:57 考勤机sdk文件\32位Demo\C#\Black&White(黑白屏)\AccessControl\AccessControl.csproj.user
文件 37737 2013-09-09 14:57 考勤机sdk文件\32位Demo\C#\Black&White(黑白屏)\AccessControl\ACMain.cs
文件 70425 2013-09-09 14:57 考勤机sdk文件\32位Demo\C#\Black&White(黑白屏)\AccessControl\ACMain.Designer.cs
文件 6013 2013-09-09 14:57 考勤机sdk文件\32位Demo\C#\Black&White(黑白屏)\AccessControl\ACMain.resx
文件 77312 2013-09-09 14:57 考勤机sdk文件\32位Demo\C#\Black&White(黑白屏)\AccessControl\bin\x86\Release\AccessControl.exe
文件 50688 2013-09-09 14:57 考勤机sdk文件\32位Demo\C#\Black&White(黑白屏)\AccessControl\bin\x86\Release\AccessControl.pdb
文件 14848 2013-09-09 14:57 考勤机sdk文件\32位Demo\C#\Black&White(黑白屏)\AccessControl\bin\x86\Release\AccessControl.vshost.exe
文件 490 2013-09-09 14:57 考勤机sdk文件\32位Demo\C#\Black&White(黑白屏)\AccessControl\bin\x86\Release\AccessControl.vshost.exe.manifest
文件 65536 2013-09-09 14:57 考勤机sdk文件\32位Demo\C#\Black&White(黑白屏)\AccessControl\bin\x86\Release\Interop.zkemkeeper.dll
文件 32590 2013-09-09 14:57 考勤机sdk文件\32位Demo\C#\Black&White(黑白屏)\AccessControl\images\top.jpg
文件 180 2013-09-09 14:57 考勤机sdk文件\32位Demo\C#\Black&White(黑白屏)\AccessControl\obj\x86\Release\AccessControl.ACMain.resources
文件 1801 2013-09-09 14:57 考勤机sdk文件\32位Demo\C#\Black&White(黑白屏)\AccessControl\obj\x86\Release\AccessControl.csproj.FileListAbsolute.txt
文件 882 2013-09-09 14:57 考勤机sdk文件\32位Demo\C#\Black&White(黑白屏)\AccessControl\obj\x86\Release\AccessControl.csproj.GenerateResource.Cache
文件 551 2013-09-09 14:57 考勤机sdk文件\32位Demo\C#\Black&White(黑白屏)\AccessControl\obj\x86\Release\AccessControl.csproj.ResolveComReference.cache
文件 77312 2013-09-09 14:57 考勤机sdk文件\32位Demo\C#\Black&White(黑白屏)\AccessControl\obj\x86\Release\AccessControl.exe
文件 50688 2013-09-09 14:57 考勤机sdk文件\32位Demo\C#\Black&White(黑白屏)\AccessControl\obj\x86\Release\AccessControl.pdb
文件 33231 2013-09-09 14:57 考勤机sdk文件\32位Demo\C#\Black&White(黑白屏)\AccessControl\obj\x86\Release\AccessControl.Properties.Resources.resources
文件 65536 2013-09-09 14:57 考勤机sdk文件\32位Demo\C#\Black&White(黑白屏)\AccessControl\obj\x86\Release\Interop.zkemkeeper.dll
文件 4608 2013-09-09 14:57 考勤机sdk文件\32位Demo\C#\Black&White(黑白屏)\AccessControl\obj\x86\Release\TempPE\Properties.Resources.Designer.cs.dll
文件 483 2013-09-09 14:57 考勤机sdk文件\32位Demo\C#\Black&White(黑白屏)\AccessControl\Program.cs
文件 1270 2013-09-09 14:57 考勤机sdk文件\32位Demo\C#\Black&White(黑白屏)\AccessControl\Properties\AssemblyInfo.cs
文件 3098 2013-09-09 14:57 考勤机sdk文件\32位Demo\C#\Black&White(黑白屏)\AccessControl\Properties\Resources.Designer.cs
文件 6190 2013-09-09 14:57 考勤机sdk文件\32位Demo\C#\Black&White(黑白屏)\AccessControl\Properties\Resources.resx
文件 1094 2013-09-09 14:57 考勤机sdk文件\32位Demo\C#\Black&White(黑白屏)\AccessControl\Properties\Settings.Designer.cs
文件 249 2013-09-09 14:57 考勤机sdk文件\32位Demo\C#\Black&White(黑白屏)\AccessControl\Properties\Settings.settings
文件 2043 2013-09-09 14:57 考勤机sdk文件\32位Demo\C#\Black&White(黑白屏)\AccessControl\SearchforUSBCom.cs
文件 5314 2013-09-09 14:57 考勤机sdk文件\32位Demo\C#\Black&White(黑白屏)\AttLogs\AttLogs.csproj
............此处省略3232个文件信息
评论
共有 条评论