SmallRefactor: {apiUrl} -> {baseAddress}
This commit is contained in:
parent
fefc90331d
commit
e939613153
|
@ -10,7 +10,7 @@ namespace AIParkingApplication
|
||||||
{
|
{
|
||||||
private readonly HttpClient client;
|
private readonly HttpClient client;
|
||||||
private readonly Thread thrStatistics;
|
private readonly Thread thrStatistics;
|
||||||
private int timeCycle;
|
private readonly int timeCycle;
|
||||||
|
|
||||||
private Label lblLoaiXe;
|
private Label lblLoaiXe;
|
||||||
private Label lblXeMay;
|
private Label lblXeMay;
|
||||||
|
@ -19,11 +19,11 @@ namespace AIParkingApplication
|
||||||
private Label lblSoLuongXeMay;
|
private Label lblSoLuongXeMay;
|
||||||
private Label lblSoLuongOto;
|
private Label lblSoLuongOto;
|
||||||
|
|
||||||
public Statistic(string apiUrl, int timeCycle_Sec = 1)
|
public Statistic(string baseAddress, int timeCycle_Sec = 1)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
timeCycle = timeCycle_Sec; ;
|
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 = new Thread(new ThreadStart(GetStatistic)) { IsBackground = true };
|
||||||
thrStatistics.Start();
|
thrStatistics.Start();
|
||||||
}
|
}
|
||||||
|
@ -99,7 +99,7 @@ namespace AIParkingApplication
|
||||||
[JsonProperty("oto")]
|
[JsonProperty("oto")]
|
||||||
public int NumberOfCar { get; set; }
|
public int NumberOfCar { get; set; }
|
||||||
|
|
||||||
[JsonProperty("moto1")]
|
[JsonProperty("moto")]
|
||||||
public int NumberOfMoto { get; set; }
|
public int NumberOfMoto { get; set; }
|
||||||
|
|
||||||
[JsonProperty("total_in")]
|
[JsonProperty("total_in")]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user