c# Timer 更新Chart数据
private void RefreashData() { Thread t = new Thread(new ThreadStart(delegate { try { seatDay = SeatAlgorithm.GetSeatTotalDayData(); seatWeek = SeatAlgorithm.GetSeatTotalWeekData(); groupDay = SeatGroupAlgorithm.GetGroupTotalDayData(); groupWeek = SeatGroupAlgorithm.GetGroupTotalWeekData(); siteWeek = SitePerformanceAlgorithm.GetSitePerformanceWeek(); Invoke(new EventHandler(delegate { this.ucGroupDayOrder.listDay = groupDay; this.ucGroupDayOrder.RefreshChart(); this.ucGroupDayOrder2.listDay = groupWeek; this.ucGroupDayOrder2.RefreshChart(); this.ucGroup1.listGroupDay = groupDay; this.ucGroup1.RefreshChart(); this.ucGroupWeekCall2.listGroupWeek = groupWeek; this.ucGroupWeekCall2.RefreshChart(); this.ucSeat1.listSeatDay = seatDay; this.ucSeat1.RefreshChart(); this.ucSeatWeekOrder1.listSeatWeek = seatWeek; this.ucSeatWeekCall1.RefreshChart(); this.ucSeatCall1.listSeatDay = seatDay; this.ucSeatCall1.RefreshChart(); this.ucSeatWeekCall1.listSeatWeek = seatWeek; this.ucSeatWeekCall1.RefreshChart(); this.usSitePerformance1.listWeek = siteWeek; this.usSitePerformance1.RefreshChart(); })); } catch (Exception ex) { Log.UpdateLog(DateTime.Now + ":" + ex); } } )); t.Start(); }