SmallRefactor: Xoá component không cần thiết
This commit is contained in:
parent
2903ea8653
commit
e972222b91
|
@ -11,7 +11,7 @@ namespace AIParkingApplication
|
|||
private HttpClient httpClient;
|
||||
private bool isHttpClientDisposabled;
|
||||
private int numberOfRetry;
|
||||
private ApiPath apiPath;
|
||||
|
||||
public enum VehicleDirection
|
||||
{
|
||||
In,
|
||||
|
@ -60,26 +60,6 @@ namespace AIParkingApplication
|
|||
}
|
||||
}
|
||||
|
||||
//TODO For New API
|
||||
//public async Task<LoginResponseModel> Login(LoginModel loginData)
|
||||
//{
|
||||
// try
|
||||
// {
|
||||
// HttpResponseMessage response = await httpClient.PostAsJsonAsync("/api/login", loginData);
|
||||
// response.EnsureSuccessStatusCode();
|
||||
// var loginResult = await response.Content.ReadAsAsync<LoginResponseModel>();
|
||||
// return loginResult;
|
||||
// }
|
||||
// catch (Exception ex)
|
||||
// {
|
||||
// Console.WriteLine($"SendEngineRequest : {ex.Message}");
|
||||
// return new LoginResponseModel
|
||||
// {
|
||||
// IsLoggedIn = false
|
||||
// };
|
||||
// }
|
||||
//}
|
||||
|
||||
public async void GetApiPathFromServer()
|
||||
{
|
||||
try
|
||||
|
@ -97,29 +77,6 @@ namespace AIParkingApplication
|
|||
}
|
||||
}
|
||||
|
||||
public async Task<OcrResult> SaveLogIn(Mat plateImage, PlateType plateType)
|
||||
{
|
||||
string plateImageBase64 = Convert.ToBase64String(plateImage.ToBytes());
|
||||
try
|
||||
{
|
||||
var request = new PlateRequestEngineModel
|
||||
{
|
||||
Img64 = plateImageBase64,
|
||||
Mode = plateType == PlateType.Square ? "square" : "long",
|
||||
Display = "full"
|
||||
};
|
||||
HttpResponseMessage response = await httpClient.PostAsJsonAsync("/get-from-frame", request);
|
||||
response.EnsureSuccessStatusCode();
|
||||
var ocrResult = await response.Content.ReadAsAsync<OcrResult>();
|
||||
return ocrResult;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine($"SendEngineRequest : {ex.Message}");
|
||||
return new OcrResult();
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<CardValidation> CheckCard(string cardNumber)
|
||||
{
|
||||
try
|
||||
|
@ -305,7 +262,6 @@ namespace AIParkingApplication
|
|||
|
||||
}
|
||||
|
||||
|
||||
public class PlateLogModel
|
||||
{
|
||||
[JsonProperty("card")]
|
||||
|
|
Loading…
Reference in New Issue
Block a user