c# 线程调用带参数的函数

Thread thread = new Thread(new ThreadStart(delegate { AuroraSocketClient.Connect("192.168.0.12"); }));
            thread.Start();

 

  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();

 

posted @ 2013-03-27 19:12  louiskoo  阅读(1807)  评论(0编辑  收藏  举报