SmallRefactor: Xoá component không cần thiết

This commit is contained in:
Le Chau 2020-06-26 14:43:32 +07:00
parent 2903ea8653
commit e972222b91

View File

@ -11,7 +11,7 @@ namespace AIParkingApplication
private HttpClient httpClient; private HttpClient httpClient;
private bool isHttpClientDisposabled; private bool isHttpClientDisposabled;
private int numberOfRetry; private int numberOfRetry;
private ApiPath apiPath;
public enum VehicleDirection public enum VehicleDirection
{ {
In, 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() public async void GetApiPathFromServer()
{ {
try 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) public async Task<CardValidation> CheckCard(string cardNumber)
{ {
try try
@ -305,7 +262,6 @@ namespace AIParkingApplication
} }
public class PlateLogModel public class PlateLogModel
{ {
[JsonProperty("card")] [JsonProperty("card")]