From e939613153e92d70f31f819320521d28d21a86ac Mon Sep 17 00:00:00 2001 From: Le Chau Date: Thu, 25 Jun 2020 11:09:02 +0700 Subject: [PATCH] SmallRefactor: {apiUrl} -> {baseAddress} --- AIParkingApplication/Statistic.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/AIParkingApplication/Statistic.cs b/AIParkingApplication/Statistic.cs index b704df9..818fd3b 100644 --- a/AIParkingApplication/Statistic.cs +++ b/AIParkingApplication/Statistic.cs @@ -10,7 +10,7 @@ namespace AIParkingApplication { private readonly HttpClient client; private readonly Thread thrStatistics; - private int timeCycle; + private readonly int timeCycle; private Label lblLoaiXe; private Label lblXeMay; @@ -19,11 +19,11 @@ namespace AIParkingApplication private Label lblSoLuongXeMay; private Label lblSoLuongOto; - public Statistic(string apiUrl, int timeCycle_Sec = 1) + public Statistic(string baseAddress, int timeCycle_Sec = 1) { InitializeComponent(); timeCycle = timeCycle_Sec; ; - client = new HttpClient { BaseAddress = new Uri(apiUrl), Timeout = TimeSpan.FromMilliseconds(5000) }; + client = new HttpClient { BaseAddress = new Uri(baseAddress), Timeout = TimeSpan.FromMilliseconds(5000) }; thrStatistics = new Thread(new ThreadStart(GetStatistic)) { IsBackground = true }; thrStatistics.Start(); } @@ -99,7 +99,7 @@ namespace AIParkingApplication [JsonProperty("oto")] public int NumberOfCar { get; set; } - [JsonProperty("moto1")] + [JsonProperty("moto")] public int NumberOfMoto { get; set; } [JsonProperty("total_in")]