SmallRefactor: {apiUrl} -> {baseAddress}
This commit is contained in:
parent
fefc90331d
commit
e939613153
|
@ -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")]
|
||||
|
|
Loading…
Reference in New Issue
Block a user