Commit99893345 by developer3

uFCoder multi-readers tester version 2.3

+ GetDllVersionStr() new DLL import function for getting version of the library + Display DLL version at the application start * The button "Open All Readers" is always active and now may press more times * Application measure execution time of the ReaderList_UpdateAndGetCount() function and display the time in Debug field. - Closing all opened readers before call "Open All Readers" is removed * DLLs updated to version 3.9.1
家长 929d6c9b
No preview for this file type
... ... @@ -399,7 +399,7 @@
this.Controls.Add(this.gbRdWr);
this.Controls.Add(this.gbAction);
this.Name="frmMultiuFRTester";
this.Text="Tester uFCoder DLL - multi readers v2.2";
this.Text="Tester uFCoder DLL - multi readers v2.3";
this.gbAction.ResumeLayout(false);
this.groupBox2.ResumeLayout(false);
this.groupBox3.ResumeLayout(false);
... ...
... ... @@ -11,6 +11,7 @@ using uFCoderMulti; // DL_STATUS
namespaceuFR_multiDLL_tester
{
usingSystem.Diagnostics;
usingUFR_HANDLE=System.UIntPtr;
publicpartialclassfrmMultiuFRTester:Form
... ... @@ -29,6 +30,12 @@ namespace uFR_multiDLL_tester
//eSector.SelectedIndex = 0;
/ / eBlockSec。SelectedIndex = 0;
strings="\nDLL version ";
s+=uFCoder.GetDllVersionStr();
memoDebug.AppendText(s);
memoDebug.Update();
}
privatevoiderror_wr(stringpre_text,DL_STATUSstatus)
... ... @@ -123,16 +130,7 @@ namespace uFR_multiDLL_tester
{
intNumberOfDevices;
foreach(uFReaderreaderinreaders_list)
{
if(reader.opened)// Will match once
{
reader.close();
msg="Closed reader: "+reader.get_designator();
prndbg(msg);
}
}
varwatch=Stopwatch.StartNew();
readers_list.Clear();
... ... @@ -145,6 +143,10 @@ namespace uFR_multiDLL_tester
NumberOfDevices=uFReader.get_reader_count();
watch.Stop();
varelapsedMs=watch.ElapsedMilliseconds;
memoDebug.AppendText("ReaderList_UpdateAndGetCount() works "+elapsedMs+" ms");
msg="Device found: "+NumberOfDevices.ToString();
prndbg(msg);
... ... @@ -318,7 +320,7 @@ namespace uFR_multiDLL_tester
reader_open(在这里.list_idx);
}
bOpenAll.Enabled=false;
//bOpenAll.Enabled = false;
bCloseAll.Enabled=true;
}
... ...
... ... @@ -204,11 +204,16 @@ namespace uFCoderMulti
byteauth_mode,
byte*key);
////---------------------------------------------------------------------
//[DllImport(DLL_NAME, CallingConvention = CallingConvention.StdCall, EntryPoint = "AIS_GetDLLVersion")]
//internal static extern IntPtr GetDLLVersion();
//---------------------------------------------------------------------
[DllImport(DLL_NAME,CallingConvention=CallingConvention.StdCall,EntryPoint="GetDllVersionStr")]
//[return: MarshalAs(UnmanagedType.LPStr)]
//public static extern string GetDllVersionStr();
privatestaticexternIntPtr_GetDllVersionStr();
publicstaticstringGetDllVersionStr()
{
IntPtrstr_ret=_GetDllVersionStr();
returnMarshal.PtrToStringAnsi(str_ret);
}
//[DllImport(DLL_NAME, CallingConvention = CallingConvention.StdCall, EntryPoint = "dbg_action2str")]
//internal static extern IntPtr dbg_action2str(int card_action);
}
... ...
... ... @@ -23,7 +23,7 @@
false
true
0
2.2.0.%2a
2.3.0.%2a
false
true
... ...
    Markdownis supported
    0%or
    You are about to add0peopleto the discussion. Proceed with caution.
    Finish editing this message first!
    Pleaseregisterorto comment
    Baidu
    map