提交<年代pan class="commit-sha">6 cf80585

AIS酒店DLL测试器的c#第一版

父母
 ################################################################################
#这个.gitignore文件是由Microsoft(R) Visual Studio自动创建的。
################################################################################
/ obj
/ bin
使用系统
使用System.Collections.Generic
使用系统。文本
使用System.Runtime.InteropServices
使用系统。IO
名称空间cs_ais_hotel_dll
枚举DL_STATUS
DL_OK0 x00
//###############################################################
TIMEOUT_ERROR
CRC_ERROR
NULL_POINTER
PARAMETERS_ERROR
MEMORY_ALLOCATION_ERROR
NOT_INITIALIZED
ALREADY_INITIALIZED
BUFFER_OVERFLOW
TIMESTAMP_INVALID
EVENT_BUSY
//###############################################################
//资源繁忙
RESOURCE_NOT_ACQUIRED
RESOURCE_ALREADY_ACQUIRED
RESOURCE_BUSY
//###############################################################
FILE_OVERSIZE
FILE_EMPTY
file_lock//当文件被填满,还没有读取
//###############################################################
//###############################################################
// open multi
DEVICE_OPENING_ERROR
DEVICE_CAN_NOT_OPEN
DEVICE_ALREADY_OPENED
DEVICE_NOT_OPENED
DEVICE_INDEX_OUT_OF_BOUND
DEVICE_CLOSE_ERROR
//###############################################################
/ /日志
LOG_BUFFER_OVERFLOW
LOG_EMPTY
LOG_NOT_CORRECT
/ /响应
CMD_RESPONSE_UNKNOWN_COMMAND
CMD_RESPONSE_WRONG_CMD
CMD_RESPONSE_COMMAND_FAILED
CMD_RESPONSE_NO_AUTHORIZATION
CMD_RESPONSE_UNSUCCESS
CMD_RESPONSE_SIZE_OVERFLOW
//###############################################################
// usb rf
CMD_BRAKE_RTE//当CMD_IN_PROGRESS . RTE到达时
//###############################################################
ITEM_IS_ALREADY_IN_LIST
ITEM_NOT_IN_LIST
//###############################################################
THREAD_FAILURE
//---------------------
ERR_OBJ_NOT_CREATED
//---------------------
//###############################################################
/ /汉明
DL_HAMMING_NOT_ACK
DL_HAMMING_WRONG_ACK
DL_HAMMING_WRONG_REPLAY
//格式化传输
DL_HAMMING_TERR_TIMEOUT
DL_HAMMING_TERR_BAD_FRAME
DL_HAMMING_TERR_BAD_SUM
DL_HAMMING_TERR_BAD_CODE
DL_HAMMING_TERR_TOO_OLD
DL_HAMMING_TERR_NOISE// DecodeFrame()返回的警告
DL_HAMMING_TERR_ERROR_MASK
ERROR_SOME_REPLAY_FALULT
//###############################################################
NO_DEVICES
//###############################################################
/ / FTDI
NO_FTDI_COMM_DEVICES0 x10000
NO_FTDI_COMM_DEVICES_OPENED
/ / USB_CLOSE_ERROR,
ERR_FTDI_READ
ERR_FTDI_READ_LESS_DATA
ERR_FTDI_WRITE
ERR_FTDI_WRITE_LESS_DATA
DL_FT_ERROR_SET_TIMEOUT
/ / FTSTATUS
DL_FT_0 x10010
DL_FT_INVALID_HANDLE
DL_FT_DEVICE_NOT_FOUND
DL_FT_DEVICE_NOT_OPENED
DL_FT_IO_ERROR
DL_FT_INSUFFICIENT_RESOURCES
DL_FT_INVALID_PARAMETER
DL_FT_INVALID_BAUD_RATE
DL_FT_DEVICE_NOT_OPENED_FOR_ERASE
DL_FT_DEVICE_NOT_OPENED_FOR_WRITE
DL_FT_FAILED_TO_WRITE_DEVICE
DL_FT_EEPROM_READ_FAILED
DL_FT_EEPROM_WRITE_FAILED
DL_FT_EEPROM_ERASE_FAILED
DL_FT_EEPROM_NOT_PRESENT
DL_FT_EEPROM_NOT_PROGRAMMED
DL_FT_INVALID_ARGS
DL_FT_NOT_SUPPORTED
DL_FT_OTHER_ERROR
DL_FT_DEVICE_LIST_NOT_READY
//---------------------
READER_ERRORS_0 x1100
READER_UID_ERROR
READER_LOG_ERROR
////---------------------
//UNKNOWN_ERROR = 0xFFFFFFFD,
//NOT_IMPLEMENTED = 0xFFFFFFFE,
////---------------------
//MAX_DL_STATUS = 0xFFFFFFFF,
//LAST_ERROR = 0xFFFFFFFF
};
枚举E_CARD_ACTION
/ / CARD_FOREIGN
//奇怪的卡片-来自不同系统的卡片
// BASE> LOG = 0x83 | RTE = 0x00 .日志含义
ACTION_CARD_FOREIGN0 x00
/ /丢弃
// blocked card -黑名单上的卡片,没有有效的访问权,没有通行权
// BASE> LOG= 0xC3 | RTE= 0x20 .日志含义
ACTION_CARD_DISCARDED0 x20//(12月32日)
/ / CARD_HACKED
// Mifare key OK - CRC OK -但用户数据不好
//错误的保护数据
// BASE> LOG= 0x84 | RTE= 0x40 .日志含义
ACTION_CARD_HACKED0 x40//(12月64日)
/ / CARD_BAD_DATA
// Mifare key OK - CRC BAD
//有无效数据的卡片- BAD CRC
// BASE> LOG= 0x——| RTE= 0x82 .使用实例
ACTION_CARD_BAD_DATA0×50//(12月80日)
/ / CARD_NO_DATA
//不可读的卡片-没有或未知的Mifare密钥的卡片
// BASE> LOG= 0x——| RTE= 0x81 .使用实例
ACTION_CARD_NO_DATA0 x60//(12月96日)
/ /解锁
//正确的卡
// BASE> LOG= 0xC2 | RTE= 0x80(+++)
// TWR> 0x80 (128 dec) -常规通道(P)
// TWR> 0x90 (144 dec) -官方退出(S)
// TWR> 0xA0 (160 dec) -车辆通过(V)
// TWR> 0xB0 (176 dec) -批准退出(O)
ACTION_CARD_UNLOCKED0 x80
ACTION_CARD_UNLOCKED_10 x81
ACTION_CARD_UNLOCKED_20 x82
ACTION_CARD_UNLOCKED_30 x83
ACTION_CARD_UNLOCKED_40 x84
ACTION_CARD_UNLOCKED_50 x85
ACTION_CARD_UNLOCKED_60 x86
ACTION_CARD_UNLOCKED_70 x87
公共静态ais
//---------------------------------------------------------------------
DllImport“ais_hotel.dll”CallingConventionCallingConventionStdCall入口点“AIS_Hotel_CommunicationOpen”)]
内部静态走读生DL_STATUSCommunicationOpen();
DllImport“ais_hotel.dll”CallingConventionCallingConventionStdCall入口点“AIS_Hotel_CommunicationClose”)]
内部静态走读生DL_STATUSCommunicationClose();
//---------------------------------------------------------------------
DllImport“ais_hotel.dll”CallingConventionCallingConventionStdCall入口点“AIS_Hotel_GetStatus”)]
内部静态走读生DL_STATUS的GetStatusintreader_idIntPtris_power_onIntPtrunreaded_rteIntPtrstatus_data);
//---------------------------------------------------------------------
DllImport“ais_hotel.dll”CallingConventionCallingConventionStdCall入口点“AIS_Hotel_TimeGet”)]
内部静态走读生DL_STATUSTimeGetintreader_idIntPtrtm_yearIntPtrtm_monIntPtrtm_mdayIntPtrtm_hourIntPtrtm_minIntPtrtm_sec);
DllImport“ais_hotel.dll”CallingConventionCallingConventionStdCall入口点“AIS_Hotel_TimeSet”)]
内部静态走读生DL_STATUSTimeSetintreader_id字符串密码inttm_yearinttm_moninttm_mdayinttm_hourinttm_mininttm_sec);
//---------------------------------------------------------------------
DllImport“ais_hotel.dll”CallingConventionCallingConventionStdCall入口点“AIS_Hotel_CardBlock”)]
内部静态走读生DL_STATUSCardBlockintreader_id字符串密码intcard_sn);
DllImport“ais_hotel.dll”CallingConventionCallingConventionStdCall入口点“AIS_Hotel_CardUnblock”)]
内部静态走读生DL_STATUSCardUnblockintreader_id字符串密码intcard_sn);
DllImport“ais_hotel.dll”CallingConventionCallingConventionStdCall入口点“AIS_Hotel_CardUnblockAll”)]
内部静态走读生DL_STATUSCardUnblockAllintreader_id字符串密码);
//---------------------------------------------------------------------
DllImport“ais_hotel.dll”CallingConventionCallingConventionStdCall入口点“AIS_Hotel_GetLastRTE”)]
内部静态走读生DL_STATUSGetLastRTEintreader_idIntPtrnew_logIntPtr行动IntPtrcard_idIntPtrsystem_id
IntPtrtm_yearIntPtrtm_monIntPtrtm_mdayIntPtrtm_hourIntPtrtm_minIntPtrtm_sec);
//---------------------------------------------------------------------
DllImport“ais_hotel.dll”CallingConventionCallingConventionStdCall入口点“AIS_GetDLLVersion”)]
内部静态走读生IntPtrGetDLLVersion();
//[DllImport("ais_hotel.dll", CallingConvention = CallingConvention. dll]StdCall, EntryPoint = "dbg_status2str")]
//内部静态extern IntPtr dbg_status2str(DL_STATUS status);
//[DllImport("ais_hotel.dll", CallingConvention = CallingConvention. dll]StdCall, EntryPoint = "dbg_action2str")]
//内部静态extern IntPtr dbg_action2str(int card_action);
< ?<年代pan class="n">xml版本=<年代pan class="s2">“1.0”编码=<年代pan class="s2">“utf - 8”? >
<<年代pan class="n">配置>
<<年代pan class="n">启动>
<<年代pan class="n">supportedRuntime版本=<年代pan class="s2">“v4.0”sku=<年代pan class="s2">“.NETFramework Version = v4.5开发"/>
启动>
<<年代pan class="n">运行时>
<<年代pan class="n">assemblyBindingxmlns=<年代pan class="s2">“urn: schemas-microsoft-com: asm.v1”>
<<年代pan class="n">探索privatePath=<年代pan class="s2">“d: \ ws \ cdt \ ais_hotel \”/>
assemblyBinding>
运行时>
配置>
使用系统
使用System.Collections.Generic
使用系统。Linq
使用System.Threading.Tasks
使用System.Windows.Forms
名称空间cs_ais_hotel_dll
静态程序
> / / / <总结
///应用程序的主要入口点
> / / / < /总结
STAThread
静态无效主要()
应用程序EnableVisualStyles();
应用程序SetCompatibleTextRenderingDefault);
应用程序运行frmAISHotelDllTester());
文件末尾没有换行符
使用系统。反射
使用System.Runtime.CompilerServices
使用System.Runtime.InteropServices
//通过以下命令控制程序集的信息
//属性集。更改这些属性值以修改信息
//与程序集关联。
[组装:AssemblyTitle(“cs_ais_hotel_dll”)]
[组装:AssemblyDescription (" "))
[组装:AssemblyConfiguration (" "))
[组装:AssemblyCompany (" "))
[组装:AssemblyProduct(“cs_ais_hotel_dll”)]
[assembly: AssemblyCopyright(“版权所有©2014”)]
[组装:AssemblyTrademark (" "))
[组装:AssemblyCulture (" "))
//将ComVisible设置为false将使该程序集中的类型不可见
// COM组件。如果需要访问此程序集中的类型
// COM,将ComVisible属性设置为true。
[组装:ComVisible(假)
//如果这个项目暴露给COM,下面的GUID是typelib的ID
[组装:Guid(“f3946fef - 75 - fa - 44 - a6 aad2 - 88 ad18e0dc1b”))
//程序集的版本信息由以下四个值组成:
//
//主要版本
//次要版本
//建筑编号
/ /修改
//
//您可以指定所有的值,或者您可以默认生成和修订编号
//使用'*',如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[组装:AssemblyVersion(“1.0.0.0”)]
[组装:AssemblyFileVersion(“1.0.0.0”)]
//------------------------------------------------------------------------------
/ / <自动生成>
//该代码是由工具生成的。
// Runtime Version:4.0.30319.18449
//
//对该文件的更改可能导致不正确的行为,如果
//代码重新生成。
/ / < /自动生成>
//------------------------------------------------------------------------------
名称空间cs_ais_hotel_dll。属性
> / / / <总结
///一个强类型的资源类,用于查找本地化字符串等。
> / / / < /总结
//这个类由StronglyTypedResourceBuilder自动生成
//类通过工具,如ResGen或Visual Studio。
//要添加或删除成员,请编辑您的.ResX文件,然后重新运行ResGen
//使用/str选项,或者重建VS项目。
全球::系统CodeDom编译器GeneratedCodeAttribute“System.Resources.Tools.StronglyTypedResourceBuilder”“4.0.0.0”)]
全球::系统诊断DebuggerNonUserCodeAttribute())
全球::系统运行时CompilerServicesCompilerGeneratedAttribute())
内部资源
私人静态全球::系统资源ResourceManagerresourceMan
私人静态全球::系统全球化CultureInforesourceCulture
全球::系统诊断CodeAnalysisSuppressMessageAttribute“微软。性能”“CA1811: AvoidUncalledPrivateCode”)]
内部资源()
> / / / <总结
///返回该类使用的缓存ResourceManager实例。
> / / / < /总结
全球::系统ComponentModelEditorBrowsableAttribute全球::系统ComponentModelEditorBrowsableState先进的)]
内部静态全球::系统资源ResourceManagerResourceManager
得到
如果((resourceMan= =))
全球::系统资源ResourceManager临时全球::系统资源ResourceManager“cs_ais_hotel_dll.Properties.Resources”typeof资源).组装);
resourceMan临时
返回resourceMan
> / / / <总结
///覆盖当前线程的CurrentUICulture属性
///使用此强类型资源类的资源查找。
> / / / < /总结
全球::系统ComponentModelEditorBrowsableAttribute全球::系统ComponentModelEditorBrowsableState先进的)]
内部静态全球::系统全球化CultureInfo文化
得到
返回resourceCulture
resourceCulture价值
<年代pan class="cp"><?XML版本="1.0"编码="utf-8"?>
根> <
<!--
Microsoft ResX模式
版本2.0
这种格式的主要目标是支持一种简单的XML格式
这基本上是人类可读的。的生成和解析
各种数据类型都是通过TypeConverter类完成的
与数据类型相关联。
例子:
...ado.net/XML报头和模式…
< resheader name = " resmimetype " >文本/ microsoft-resx < / resheader >
2.0 < resheader name = "版本" > < / resheader >
< resheader name = "读者" > System.Resources。ResXResourceReader System.Windows。形式,…< / resheader >
< resheader name = "作家" > System.Resources。ResXResourceWriter System.Windows。形式,…< / resheader >
this is my long stringthis is a comment
Blue
.
[base64 mime编码序列化的.NET Framework对象
> < /数据
[base64 mime编码字符串,表示.NET Framework对象的字节数组形式
注释
> < /数据
有任意数量的“reheader”行,其中包含simple
名称/值对。
每个数据行包含一个名称和值。该行还包含
Type或mimetype。类型对应于支持。net类
通过TypeConverter架构进行文本/值转换。
类对不支持此功能的类进行序列化并存储在
mimetype集。
mimetype用于序列化对象,并告诉
ResXResourceReader如何去持久化对象。目前还没有
可扩展的。对于给定的mimetype,值必须相应设置:
注意- application/x-microsoft.net.object.binary.base64是格式
ResXResourceWriter将生成的文件,而阅读器可以
阅读下面列出的任何格式。
mimetype:应用程序/ x-microsoft.net.object.binary.base64
value:对象必须被序列化
: System.Serialization.Formatters.Binary.BinaryFormatter
:然后用base64编码。
mimetype:应用程序/ x-microsoft.net.object.soap.base64
value:对象必须被序列化
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
:然后用base64编码。
mimetype:应用程序/ x-microsoft.net.object.bytearray.base64
value:对象必须序列化为字节数组
:使用System.ComponentModel.TypeConverter
:然后用base64编码。
-->
< xsd:模式id =“根”xmlns =""xmlns: xsd =“http://www.w3.org/2001/XMLSchema”xmlns: msdata =“urn: schemas-microsoft-com: xml-msdata”>
< xsd:元素name =“根”msdata: IsDataSet =“真正的”>
< xsd: complexType >
< xsd:选择maxOccurs =“无限”>
< xsd:元素name =“元数据”>
< xsd: complexType >
< xsd:序列>
< xsd:元素name =“价值”类型=" xsd: string "minOccurs =“0”/>
> < / xsd:序列
< xsd:属性name =“名称”类型=" xsd: string "/>
< xsd:属性name =“类型”类型=" xsd: string "/>
< xsd:属性name =“mimetype”类型=" xsd: string "/>
< / xsd: complexType >
< / xsd: element >
< xsd:元素name =“组装”>
< xsd: complexType >
< xsd:属性name =“别名”类型=" xsd: string "/>
< xsd:属性name =“名称”类型=" xsd: string "/>
< / xsd: complexType >
< / xsd: element >
< xsd:元素name =“数据”>
< xsd: complexType >
< xsd:序列>
< xsd:元素name =“价值”类型=" xsd: string "minOccurs =“0”msdata:序数=“1”/>
< xsd:元素name =“评论”类型=" xsd: string "minOccurs =“0”msdata:序数=“2”/>
> < / xsd:序列
< xsd:属性name =“名称”类型=" xsd: string "msdata:序数=“1”/>
< xsd:属性name =“类型”类型=" xsd: string "msdata:序数=“3”/>
< xsd:属性name =“mimetype”类型=" xsd: string "msdata:序数=“4”/>
< / xsd: complexType >
< / xsd: element >
< xsd:元素name =“resheader”>
< xsd: complexType >
< xsd:序列>
< xsd:元素name =“价值”类型=" xsd: string "minOccurs =“0”msdata:序数=“1”/>
> < / xsd:序列
< xsd:属性name =“名称”类型=" xsd: string "使用=“要求”/>
< / xsd: complexType >
< / xsd: element >
> < / xsd:选择
< / xsd: complexType >
< / xsd: element >
> < / xsd:模式
< resheadername =“resmimetype”>
<值>文本/ microsoft-resx<年代pan class="nt">< /值>
< / resheader >
< resheadername =“版本”>
<值>2.0<年代pan class="nt">< /值>
< / resheader >
< resheadername =“读者”>
<值>System.Resources。ResXResourceReader System.Windows。形式年代,Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089<年代pan class="nt">< /值>
< / resheader >
< resheadername =“作家”>
<值>System.Resources。ResXResourceWriter System.Windows。形式年代,Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089<年代pan class="nt">< /值>
< / resheader >
根> < /
文件末尾没有换行符
//------------------------------------------------------------------------------
/ / <自动生成>
//该代码是由工具生成的。
// Runtime Version:4.0.30319.18449
//
//对该文件的更改可能导致不正确的行为,如果
//代码重新生成。
/ / < /自动生成>
//------------------------------------------------------------------------------
名称空间cs_ais_hotel_dll。属性
全球::系统运行时CompilerServicesCompilerGeneratedAttribute())
全球::系统CodeDom编译器GeneratedCodeAttribute“Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator”“11.0.0.0”)]
内部密封部分设置全球::系统配置ApplicationSettingsBase
私人静态设置defaultInstance((设置)(全球::系统配置ApplicationSettingsBase同步设置())));
公共静态设置默认的
得到
返回defaultInstance
<年代pan class="cp"><?XML版本='1.0'编码='utf-8'?>
< SettingsFilexmlns =“http://schemas.microsoft.com/VisualStudio/2004/01/settings”CurrentProfile =“(默认)”>
<文件>
<概要Name =“(默认)”/>
> < /概要文件
<设置/>
< / SettingsFile >
<年代pan class="cp"><?XML版本="1.0"编码="utf-8"?>
<项目ToolsVersion =“12.0”DefaultTargets =“构建”xmlns =“http://schemas.microsoft.com/developer/msbuild/2003”>
<进口项目=“(MSBuildExtensionsPath) \美元(MSBuildToolsVersion) \ Microsoft.Common.props”条件=“存在(“(MSBuildExtensionsPath) \ (MSBuildToolsVersion)美元\ Microsoft.Common.props ')”/>
< PropertyGroup >
<配置条件=" '$(配置)' == " ">调试<年代pan class="nt">> < /配置
<平台条件=" '$(平台)' == ">AnyCPU<年代pan class="nt">> < /平台
< ProjectGuid >{563 aaa33 - 9705 - 42 - bf - 9054 - 3 - d0394c08c07}<年代pan class="nt">< / ProjectGuid >
< OutputType >WinExe<年代pan class="nt">< / OutputType >
< AppDesignerFolder >属性<年代pan class="nt">< / AppDesignerFolder >
< RootNamespace >cs_ais_hotel_dll<年代pan class="nt">< / RootNamespace >
< AssemblyName >cs_ais_hotel_dll<年代pan class="nt">< / AssemblyName >
< TargetFrameworkVersion >v4.5开发<年代pan class="nt">< / TargetFrameworkVersion >
<队列>512<年代pan class="nt">< /队列>
< / PropertyGroup >
< PropertyGroup条件=”(配置)|(平台)的美元= =“调试| AnyCPU’”>
< PlatformTarget >AnyCPU<年代pan class="nt">< / PlatformTarget >
< DebugSymbols >真正的<年代pan class="nt">< / DebugSymbols >
< DebugType >完整的<年代pan class="nt">< / DebugType >
<优化>假<年代pan class="nt">< / >优化
< OutputPath >本调试\ \<年代pan class="nt">< / OutputPath >
< DefineConstants >调试,跟踪<年代pan class="nt">< / DefineConstants >
< ErrorReport >提示<年代pan class="nt">< / ErrorReport >
< WarningLevel >4<年代pan class="nt">< / WarningLevel >
< / PropertyGroup >
< PropertyGroup条件=" '$(配置)|$(平台)' == '释放|AnyCPU' ">
< PlatformTarget >AnyCPU<年代pan class="nt">< / PlatformTarget >
< DebugType >pdbonly<年代pan class="nt">< / DebugType >
<优化>真正的<年代pan class="nt">< / >优化
< OutputPath >本发布\ \<年代pan class="nt">< / OutputPath >
< DefineConstants >跟踪<年代pan class="nt">< / DefineConstants >
< ErrorReport >提示<年代pan class="nt">< / ErrorReport >
< WarningLevel >4<年代pan class="nt">< / WarningLevel >
< / PropertyGroup >
< ItemGroup >
<参考包括=“系统”/>
<参考包括=”系统。核心”/>
<参考包括=“System.Xml.Linq”/>
<参考包括=“System.Data.DataSetExtensions”/>
<参考包括=“微软。CSharp”/>
<参考包括=”系统。数据”/>
<参考包括=”系统。部署”/>
<参考包括=”系统。图”/>
<参考包括=“System.Windows.Forms”/>
<参考包括=“System.Xml”/>
< / ItemGroup >
< ItemGroup >
<编译包括=“AIS_HOTEL.cs”>
<亚型>代码<年代pan class="nt">< / >亚型
> < /编译
<编译包括=“Program.cs”/>
<编译包括=“frmAISHotelTester.cs”>
<亚型>形式<年代pan class="nt">< / >亚型
> < /编译
<编译包括=“frmAISHotelTester.Designer.cs”>
< DependentUpon >frmAISHotelTester.cs<年代pan class="nt">< / DependentUpon >
> < /编译
<编译包括=“属性\ AssemblyInfo.cs”/>
< EmbeddedResource包括=“frmAISHotelTester.resx”>
< DependentUpon >frmAISHotelTester.cs<年代pan class="nt">< / DependentUpon >
< / EmbeddedResource >
< EmbeddedResource包括=“属性\ Resources.resx”>
<发电机>ResXFileCodeGenerator<年代pan class="nt">> < /发电机
< LastGenOutput >Resources.Designer.cs<年代pan class="nt">< / LastGenOutput >
<亚型>设计师<年代pan class="nt">< / >亚型
< / EmbeddedResource >
<编译包括=“属性\ Resources.Designer.cs”>
< AutoGen >真正的<年代pan class="nt">< / AutoGen >
< DependentUpon >Resources.resx<年代pan class="nt">< / DependentUpon >
> < /编译
<没有包括=“属性\ Settings.settings”>
<发电机>SettingsSingleFileGenerator<年代pan class="nt">> < /发电机
< LastGenOutput >Settings.Designer.cs<年代pan class="nt">< / LastGenOutput >
< / >没有
<编译包括=“属性\ Settings.Designer.cs”>
< AutoGen >真正的<年代pan class="nt">< / AutoGen >
< DependentUpon >Settings.settings<年代pan class="nt">< / DependentUpon >
< DesignTimeSharedInput >真正的<年代pan class="nt">< / DesignTimeSharedInput >
> < /编译
< / ItemGroup >
< ItemGroup >
<没有包括=“App.config”/>
< / ItemGroup >
<进口项目=“美元(MSBuildToolsPath) \ Microsoft.CSharp.targets”/>
<!--To modify your build process, add your task inside one of the targets below and uncomment it.
还有其他类似的扩展点,请参阅Microsoft.Common.targets。
<目标Name = " BeforeBuild " >
> < /目标
<目标Name = " AfterBuild " >
> < /目标
-->
> < /项目
文件末尾没有换行符

Microsoft Visual Studio解决方案文件,格式版本12.00
# Visual Studio Express 2013
VisualStudioVersion = 12.0.30110.0
MinimumVisualStudioVersion = 10.0.40219.1
项目("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "cs_ais_hotel_dll", "cs_ais_hotel_dll. dll. "csproj”、“{563 aaa33 - 9705 - 42 - bf - 9054 - 3 - d0394c08c07}”
EndProject
全球
GlobalSection(SolutionConfigurationPlatforms) =解决方案
Debug|任意CPU = Debug|任意CPU
Release|任意CPU = Release|任意CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{563 aaa33 - 9705 - 42 - bf - 9054 - 3 - d0394c08c07}。调试|任何CPU。一个ctiveCfg = Debug|Any CPU
{563 aaa33 - 9705 - 42 - bf - 9054 - 3 - d0394c08c07}。调试任何CPU.Build |。0 = Debug|任意CPU
{563 aaa33 - 9705 - 42 - bf - 9054 - 3 - d0394c08c07}。发布|任何CPU。一个ctiveCfg = Release|Any CPU
{563 aaa33 - 9705 - 42 - bf - 9054 - 3 - d0394c08c07}。释放任何CPU.Build |。0 = Release|任意一个CPU
EndGlobalSection
GlobalSection(SolutionProperties) =解决方案
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
使用系统
使用System.Collections.Generic
使用系统。ComponentModel
使用系统。数据
使用系统。画
使用系统。Linq
使用系统。文本
使用System.Threading.Tasks
使用System.Windows.Forms
使用System.Runtime.InteropServices
名称空间cs_ais_hotel_dll
公共部分frmAISHotelDllTester形式
静态DL_STATUS结果
intid16
字符串密码""
intcard_sn1
私人无效wr_status字符串pre_textDL_STATUS状态
字符串out_textpre_text+”:“
out_text+ =状态
out_text+ =环境换行符
richTextBox1追加文本out_text);
公共frmAISHotelDllTester()
InitializeComponent();
editID文本转换ToStringid);
eBlackCard文本转换ToStringcard_sn);
私人无效btnPortOpen_Click对象发送方EventArgse
结果aisCommunicationOpen();
wr_status“CommunicationOpen”结果);
私人无效btnPortClose_Click对象发送方EventArgse
结果aisCommunicationClose();
wr_status“CommunicationClose”结果);
私人无效btnGetStatus_Click对象发送方EventArgse
intpower_on
intrte_unreaded
字节[]status_data字节5];
// Int32 result = 0;
//IntPtr hContext = new IntPtr(sizeof(Int32));
//result = Abc1api.Abc_Context_Create(hContext);
//为int分配内存
IntPtrptr_power_on元帅AllocHGlobal运算符int));
IntPtrptr_rte_unreaded元帅AllocHGlobal运算符int));
GCHandlepinnedArrayGCHandleAllocstatus_dataGCHandleType固定);
IntPtrptr_status_datapinnedArrayAddrOfPinnedObject();
结果ais的GetStatusidptr_power_onptr_rte_unreadedptr_status_data);
wr_status“GetStatus ()结果);
如果结果= =DL_STATUSDL_OK
power_on元帅ReadInt32ptr_power_on);
rte_unreaded元帅ReadInt32ptr_rte_unreaded);
字符串prnout" power_on = "+power_on+" | rte_unread = "+rte_unreaded
prnout+ =“||||”+BitConverterToStringstatus_data);
prnout+ =环境换行符+环境换行符
richTextBox1追加文本prnout);
//空闲内存
pinnedArray免费的();
元帅FreeHGlobalptr_power_on);
元帅FreeHGlobalptr_rte_unreaded);
私人无效btnGetTime_Click对象发送方EventArgse
inttm_year
inttm_mon
inttm_mday
inttm_hour
inttm_min
inttm_sec
IntPtrp_tm_year元帅AllocHGlobal运算符int));
IntPtrp_tm_mon元帅AllocHGlobal运算符int));
IntPtrp_tm_mday元帅AllocHGlobal运算符int));
IntPtrp_tm_hour元帅AllocHGlobal运算符int));
IntPtrp_tm_min元帅AllocHGlobal运算符int));
IntPtrp_tm_sec元帅AllocHGlobal运算符int));
结果aisTimeGetidp_tm_yearp_tm_monp_tm_mdayp_tm_hourp_tm_minp_tm_sec);
wr_status“TimeGet()”结果);
如果结果= =DL_STATUSDL_OK
tm_year元帅ReadInt32p_tm_year);
tm_mon元帅ReadInt32p_tm_mon);
tm_mday元帅ReadInt32p_tm_mday);
tm_hour元帅ReadInt32p_tm_hour);
tm_min元帅ReadInt32p_tm_min);
tm_sec元帅ReadInt32p_tm_sec);
字符串prnout字符串格式“时间:{0}-{1}-{2}{3}:{4}:{5}”tm_yeartm_montm_mdaytm_hourtm_mintm_sec);
prnout+ =环境换行符+环境换行符
richTextBox1追加文本prnout);
//空闲内存
元帅FreeHGlobalp_tm_year);
元帅FreeHGlobalp_tm_mon);
元帅FreeHGlobalp_tm_mday);
元帅FreeHGlobalp_tm_hour);
元帅FreeHGlobalp_tm_min);
元帅FreeHGlobalp_tm_sec);
私人无效btnSetTime_Click对象发送方EventArgse
DateTime现在DateTime现在
richTextBox1追加文本“试着设定时间:”+现在ToString()+环境换行符);
结果aisTimeSetid密码现在一年现在现在一天现在小时现在一分钟现在第二个);
wr_status“TimeSet()”结果);
私人无效btnBlockCard_Click对象发送方EventArgse
结果aisCardBlockid密码card_sn);
wr_status“CardBlock”结果);
私人无效btnUnblockCard_Click对象发送方EventArgse
结果aisCardBlockid密码card_sn);
wr_status“CardBlock”结果);
私人无效btnUnblockAll_Click对象发送方EventArgse
结果aisCardUnblockAllid密码);
wr_status“CardUnblockAll”结果);
私人无效btnGetDLLVersion_Click对象发送方EventArgse
// string s = "ais.GetDLLVersion()"+ Environment.NewLine;
IntPtrstr_retaisGetDLLVersion();
字符串年代元帅PtrToStringAnsistr_ret);
年代+ =环境换行符
richTextBox1追加文本年代);
私人无效eBlackCard_Leave对象发送方EventArgse
card_sn转换ToInt32eBlackCard文本);
statusLabel文本" card_sn = "+card_sn
私人无效editID_Leave对象发送方EventArgse
id转换ToInt32editID文本);
statusLabel文本" id = "+id
私人无效btnGetLastRTE_Click对象发送方EventArgse
inttm_year
inttm_mon
inttm_mday
inttm_hour
inttm_min
inttm_sec
intnew_log
int行动
intcard_id
intsystem_id
IntPtrp_tm_year元帅AllocHGlobal运算符int));
IntPtrp_tm_mon元帅AllocHGlobal运算符int));
IntPtrp_tm_mday元帅AllocHGlobal运算符int));
IntPtrp_tm_hour元帅AllocHGlobal运算符int));
IntPtrp_tm_min元帅AllocHGlobal运算符int));
IntPtrp_tm_sec元帅AllocHGlobal运算符int));
IntPtrp_new_log元帅AllocHGlobal运算符int));
IntPtrp_action元帅AllocHGlobal运算符int));
IntPtrp_card_id元帅AllocHGlobal运算符int));
IntPtrp_system_id元帅AllocHGlobal运算符int));
结果aisGetLastRTEidp_new_logp_actionp_card_idp_system_id
p_tm_yearp_tm_monp_tm_mdayp_tm_hourp_tm_minp_tm_sec);
wr_status“GetLastRTE()”结果);
如果结果= =DL_STATUSDL_OK
tm_year元帅ReadInt32p_tm_year);
tm_mon元帅ReadInt32p_tm_mon);
tm_mday元帅ReadInt32p_tm_mday);
tm_hour元帅ReadInt32p_tm_hour);
tm_min元帅ReadInt32p_tm_min);
tm_sec元帅ReadInt32p_tm_sec);
new_log元帅ReadInt32p_new_log);
行动元帅ReadInt32p_action);
card_id元帅ReadInt32p_card_id);
system_id元帅ReadInt32p_system_id);
字符串prnoutRTE:“
如果new_log= =0
prnout+ =“没有新的rte。”
其他的
prnout+ =字符串格式"action= {0} | card_id= {1} | system_id= {2} || "行动card_idsystem_id);
prnout+ =字符串格式“时间:{0}-{1}-{2}{3}:{4}:{5}”tm_yeartm_montm_mdaytm_hourtm_mintm_sec);
prnout+ =环境换行符+环境换行符
richTextBox1追加文本prnout);
//空闲内存
元帅FreeHGlobalp_tm_year);
元帅FreeHGlobalp_tm_mon);
元帅FreeHGlobalp_tm_mday);
元帅FreeHGlobalp_tm_hour);
元帅FreeHGlobalp_tm_min);
元帅FreeHGlobalp_tm_sec);
元帅FreeHGlobalp_new_log);
元帅FreeHGlobalp_action);
元帅FreeHGlobalp_card_id);
元帅FreeHGlobalp_system_id);
// result = ftd2.rf_Clear();
//if (result != BCDRF_STATUS.DL_OK)
/ / {
/ /控制台。写Line("Unable to clear bcd_rf dll memory.");
/ / Console.ReadKey ();
/ /返回;
/ /}
    减价支持
    0%
    你要添加<年代trong>0讨论。小心行事。
    先完成这条消息的编辑!
    注册发表评论
    Baidu