通过房态写房卡
通过写房卡按钮写房卡
一、查看门锁读卡器信息
二、玄武星辰查到对应名称
如何知道自己家门锁的app,使用未来之窗【玄武芯辰】查询
通过上面我看出叫做D801
在【玄武芯辰】输入D801,人工智能会提示app信息
三、设置门锁控制app
在上一步找到app,直接在酒店系统重选择控制app
四:门锁代码
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections.Specialized;
using System.Windows.Forms;
using System.IO;
using System.Drawing;
//
using System.Data;
using System.Data.Common;
//引用数据库
//using CyberSnow.VB.NET.Data.Helper;
//
using System.Text.RegularExpressions;
using CyberWin.CSHARP.YNWLZC.WebFrame.CyberPHP.CyberWinWeb.WebData;
using System.Runtime.InteropServices;//这是用到DllImport时候要引入的包
//线程
using System.Threading;
//酒店门锁
//qujing
namespace CyberPHP_Dynamic
{
class APP
{
byte[] carddata = new byte[128];
private string 身份证照片保存路径="";
public string start(NameValueCollection obj){
string 参数1="";
NameValueCollection d=obj;
参数1 = d["param1"];
string s="随机预安装插件";
return s;
}
public string status(NameValueCollection obj){
Buzzer(1, 50);//蜂鸣器
string s="当你听到设备蜂鸣器,说明设备已经连接";
return s;
}
//退房checking out
//入住checking in
//检测技术
//
public string checkingout(NameValueCollection obj){
string s="注销卡片";
NameValueCollection d=obj;
string param = d["param"];
//解析未来之窗协议
CyberWin.CSHARP.YNWLZC.WebFrame.CyberPHP.CyberWinProtocol.Cl_CyberWinAPPProtocolPackage clApp = new CyberWin.CSHARP.YNWLZC.WebFrame.CyberPHP.CyberWinProtocol.Cl_CyberWinAPPProtocolPackage();
clApp.formatString(param);
string 酒店标识 = clApp.get("hotelsign");
int st;
byte[] sa1 = new byte[256 + 1];
if (!rdCard())
{
return "读卡失败";
}
// 先读卡
Cursor.Current = System.Windows.Forms.Cursors.WaitCursor;
st = CardErase(1, Convert.ToInt32(酒店标识), sa1);
string 未来之窗 = Encoding.ASCII.GetString(sa1);
// edt_CardData.Text = 未来之窗;
Cursor.Current = System.Windows.Forms.Cursors.Default;
if (st != 0)
{
System.Windows.Forms.MessageBox.Show(("注销失败" + '\n' + (st).ToString() as string), "提示", System.Windows.Fo