private async void btnDisconnect_Copy8_Click(object sender, RoutedEventArgs e) { textBlock1.Text = ""; fgCompare1N cmd = new fgCompare1N( ); CommonResult ret = await FingerprintDevice.Execute(cmd); textBlock1.Text = "Result: " + FingerprintDevice.LastExecuteResult.Message + "\r\nCompare 1:N: UserID: " + cmd.ID.ToString( ); }
public async void StartAttendanceTask( ) { fgCompare1N cmd = new fgCompare1N( ); while (true) { CommonResult ret = await FingerprintDevice.Execute(cmd); if (ret.Code == ResultCode.GN_TASK_CANCEL) { break; } else if (ret.Code == ResultCode.GN_SUCCESS) { DistinguishUser(cmd.ID, DateTime.Now); } else { ShowNoFound( ); } } }