public void WeatherConditionSettingWindowClosed(object sender, IList<WeatherConditionSetting> list)
        {
            WeatherConditionSettingWindowViewModel model = (WeatherConditionSettingWindowViewModel)sender;

            model.CloseWindowEvent -= WeatherConditionSettingWindowClosed;
            if (setting != null) setting.Close();
            setting = null;

            //设置了气象条件
            if (list != null)
            {
                var sourcList = this.dataSource;
                int startIndex = 0, endIndex = 0;
                foreach (WeatherConditionSetting item in list)
                {
                    try
                    {
                        startIndex = this.dataSource.Where(t => t.TowerName == item.StartTowerName).Single().ID;
                        endIndex = this.dataSource.Where(t => t.TowerName == item.EndTowerName).Single().ID;
                        //筛选需要修改的序列信息
                        var sourceList = sourcList.Where(t => t.ID >= startIndex && t.ID <= endIndex).ToList();

                        foreach (TowerSerial serial in sourceList)
                        {
                            this.dataSource.Where(k => k.ID == serial.ID).First().WeatherCondition = item.WeatherCondition;
                        }
                    }
                    catch (Exception ex)
                    {
                        string msg = ex.Message;
                    }
                }
            }
        }
        public void doWeatherConditionSetting()
        {
            //塔位号
            List<string> list = this.dataSource.Select(item => item.TowerName).ToList();

            setting = new WeatherConditionSettingWindow();

            ((WeatherConditionSettingWindowViewModel)(setting.DataContext)).CloseWindowEvent += WeatherConditionSettingWindowClosed;
            ((WeatherConditionSettingWindowViewModel)(setting.DataContext)).TowerNameList = list;
            setting.ShowDialog();
        }