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")]