Statistic - Fix bugs.

This commit is contained in:
DucDangAnh 2020-07-07 17:09:47 +07:00
parent 44ee429ae6
commit fbee2526c5
2 changed files with 6 additions and 1 deletions

View File

@ -256,6 +256,7 @@
this.Controls.Add(this.grbVehicleStatistics); this.Controls.Add(this.grbVehicleStatistics);
this.Name = "Statistic"; this.Name = "Statistic";
this.Size = new System.Drawing.Size(192, 292); this.Size = new System.Drawing.Size(192, 292);
this.Load += new System.EventHandler(this.Statistic_Load);
this.grbVehicleStatistics.ResumeLayout(false); this.grbVehicleStatistics.ResumeLayout(false);
this.tlpStatisticTable.ResumeLayout(false); this.tlpStatisticTable.ResumeLayout(false);
this.tlpStatisticTable.PerformLayout(); this.tlpStatisticTable.PerformLayout();

View File

@ -17,7 +17,6 @@ namespace AIParkingApplication
this.apiController = apiController; this.apiController = apiController;
this.updateInterval = updateInterval; this.updateInterval = updateInterval;
statisticsThread = new Thread(new ThreadStart(GetStatistic)) { IsBackground = true }; statisticsThread = new Thread(new ThreadStart(GetStatistic)) { IsBackground = true };
statisticsThread.Start();
} }
private void GetStatistic() private void GetStatistic()
@ -55,5 +54,10 @@ namespace AIParkingApplication
[JsonProperty("total_out")] [JsonProperty("total_out")]
public string TotalOut { get; set; } public string TotalOut { get; set; }
} }
private void Statistic_Load(object sender, EventArgs e)
{
statisticsThread.Start();
}
} }
} }