Commitf7b11f6d by developer34

Reader auto reopen added.

家长 84815b90
... ... @@ -5,6 +5,9 @@
width="300"alt="Angular Logo"src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNTAgMjUwIj4KICAgIDxwYXRoIGZpbGw9IiNERDAwMzEiIGQ9Ik0xMjUgMzBMMzEuOSA2My4ybDE0LjIgMTIzLjFMMTI1IDIzMGw3OC45LTQzLjcgMTQuMi0xMjMuMXoiIC8+CiAgICA8cGF0aCBmaWxsPSIjQzMwMDJGIiBkPSJNMTI1IDMwdjIyLjItLjFWMjMwbDc4LjktNDMuNyAxNC4yLTEyMy4xTDEyNSAzMHoiIC8+CiAgICA8cGF0aCAgZmlsbD0iI0ZGRkZGRiIgZD0iTTEyNSA1Mi4xTDY2LjggMTgyLjZoMjEuN2wxMS43LTI5LjJoNDkuNGwxMS43IDI5LjJIMTgzTDEyNSA1Mi4xem0xNyA4My4zaC0zNGwxNy00MC45IDE3IDQwLjl6IiAvPgogIDwvc3ZnPg==">
id="openresponse"style="text-align:center">

{{ OpenText }}

id="buttons"style="text-align:center">
class="btn"(click)="ReaderOpen()">
ReaderOpen
... ...
... ... @@ -24,14 +24,50 @@ export class AppComponent {
0==u&&response(resp),u++
})
}
}
LoopStartedRSC:boolean=false;
ReaderStillConnectedLoop(){
let_this=this;
if(_this.LoopStartedRSC==false)
{
_this.LoopStartedRSC=true;
letloop=setInterval(function(){
_this.uFRequest("ReaderStillConnected",function(uFResponse:any){
if(uFResponse.连接=="0x00"){
_this.ReaderOpen();
}else{
}
});
},200);
}
}
OpenText:string='Reader closed';
//ReaderOpen example function
ReaderOpen(){
let_this=this;
this.uFRequest("ReaderOpen",function(uFResponse:any){
console.log(uFResponse);
letresponseString=JSON.stringify(uFResponse);
alert(responseString);
if(uFResponse.Status=="[0x00 (0)] UFR_OK")
{
_this.OpenText="Reader opened";
_this.ReaderStillConnectedLoop();
}
else
{
_this.OpenText="Reader closed";
}
});
}
... ... @@ -59,7 +95,7 @@ export class AppComponent {
LoopStarted:boolean=false;
GetCardIdExLoop(){
let_this=this;
this.LoopResponseText='No Card';
letloop=setInterval(function(){
... ... @@ -76,4 +112,5 @@ export class AppComponent {
}
}
\ No newline at end of file
    Markdownis supported
    0%or
    You are about to add0peopleto the discussion. Proceed with caution.
    Finish editing this message first!
    Pleaseregisteror发表评论
    Baidu
    map