public MainWindow() { InitializeComponent(); thislock = new object(); config = new double[ExternalFunctions.GetConfigSize()]; ExternalFunctions.GetConfig(config); WrongTime = new double[ExternalFunctions.GetMaxTimeSize()]; ExternalFunctions.GetMaxTime(WrongTime); m_GridCameraWindow.Children.Add(new CameraWindow()); ThreadStart ts = new ThreadStart(DisplayInfos); t = new Thread(ts); t.Start(); playbeep = new Thread(new ParameterizedThreadStart(_Beep)); playfiletune = new Thread(new ParameterizedThreadStart(_PlayTune)); countDownTimer = new DispatcherTimer(); countDownTimer.Interval = new TimeSpan(10000000); //时间间隔为一秒 countDownTimer.Tick += new EventHandler(timer_Tick); HourArea.Text = Default.SetTimeHour.ToString(); MinuteArea.Text = Default.SetTimeMinute.ToString(); SecondArea.Text = Default.SetTimeSecond.ToString(); Int32 hour = Convert.ToInt32(HourArea.Text); Int32 minute = Convert.ToInt32(MinuteArea.Text); Int32 second = Convert.ToInt32(SecondArea.Text); //处理倒计时的类 processCount = new ProcessCount(hour * 3600 + minute * 60 + second); CountDown += new CountDownHandler(processCount.ProcessCountDown); ExternalFunctions.ConfigDisable(4); }