Ejemplo n.º 1
0
    public void Init()
    {
        _paramTerrain      = (TerrainParameter)AssetDatabase.LoadAssetAtPath(_terrainParamPath, typeof(TerrainParameter));
        _paramWeather      = (WeatherParameter)AssetDatabase.LoadAssetAtPath(_weatherParamPath, typeof(WeatherParameter));
        _paramTemperature  = (TemperatureParameter)AssetDatabase.LoadAssetAtPath(_temperatureParamPath, typeof(TemperatureParameter));
        _paramMana         = (ManaParameter)AssetDatabase.LoadAssetAtPath(_manaParamPath, typeof(ManaParameter));
        _paramRain         = (RainParameter)AssetDatabase.LoadAssetAtPath(_rainParamPath, typeof(RainParameter));
        _biomeDistribution = (BiomeDistribution)AssetDatabase.LoadAssetAtPath(_biomeDistributionPath, typeof(BiomeDistribution));
        _terrainColor      = (ColorRangeDistribution)AssetDatabase.LoadAssetAtPath(_terrainColorRangePath, typeof(ColorRangeDistribution));
        _weatherColor      = (ColorRangeDistribution)AssetDatabase.LoadAssetAtPath(_weatherColorRangePath, typeof(ColorRangeDistribution));
        _manaColor         = (ColorRangeDistribution)AssetDatabase.LoadAssetAtPath(_manaColorRangePath, typeof(ColorRangeDistribution));
        _rainColor         = (ColorRangeDistribution)AssetDatabase.LoadAssetAtPath(_rainColorRangePath, typeof(ColorRangeDistribution));

        _serializedObj             = new SerializedObject(this);
        _propertyParamTerrain      = _serializedObj.FindProperty("_paramTerrain");
        _propertyParamWeather      = _serializedObj.FindProperty("_paramWeather");
        _propertyParamTemperature  = _serializedObj.FindProperty("_paramTemperature");
        _propertyParamMana         = _serializedObj.FindProperty("_paramMana");
        _propertyParamRain         = _serializedObj.FindProperty("_paramRain");
        _propertyBiomeDistribution = _serializedObj.FindProperty("_biomeDistribution");
        _propertyTerrainColorRange = _serializedObj.FindProperty("_terrainColor");
        _propertyWeatherColorRange = _serializedObj.FindProperty("_weatherColor");
        _propertyManaColorRange    = _serializedObj.FindProperty("_manaColor");
        _propertyRainColorRange    = _serializedObj.FindProperty("_rainColor");
        _propertyWidth             = _serializedObj.FindProperty("_width");
        _propertyHeight            = _serializedObj.FindProperty("_height");
        _propertySeed = _serializedObj.FindProperty("_seed");

        _noticeTxt    = string.Empty;
        _worldTexture = null;
        _tileData     = null;
        _executor.Clear();
    }
Ejemplo n.º 2
0
    public IEnumerator GenerateWeatherMap(
        int width,
        int height,
        float xOffset,
        float yOffset,
        TemperatureParameter para,
        IReturn <float[]> ret)
    {
        _width  = width;
        _height = height;
        _para   = para;

        _temperatureMap = new float[_width * _height];

        var weatherMonad = new BlockMonad <float[]>(r =>
                                                    _weatherGen.GenerateWeatherMap(_width, _height, xOffset, yOffset, _para.WEATHER_GEN_PARA, r));

        yield return(weatherMonad.Do());

        _varietyStatus = _weatherGen.VarietyStatus;
        var varietyMap = weatherMonad.Result;

        _GenerateMainTemperature(varietyMap);

        ret.Accept(_temperatureMap);
    }
Ejemplo n.º 3
0
        public static string GetFormat(TemperatureParameter parameter)
        {
            switch (parameter)
            {
            case TemperatureParameter.Celsius:
            case TemperatureParameter.Fahrenheit:
                return("°");

            case TemperatureParameter.Kelvin:
                return("K");

            default:
                return("°");
            }
        }
Ejemplo n.º 4
0
        public double ActualDouble(TemperatureParameter parameter)
        {
            switch (parameter)
            {
            case TemperatureParameter.Celsius:
                return(Celsius);

            case TemperatureParameter.Fahrenheit:
                return(Fahrenheit);

            case TemperatureParameter.Kelvin:
                return(Kelvin);

            default:
                return(Celsius);
            }
        }
Ejemplo n.º 5
0
        public string Actual(TemperatureParameter temperatureParameter)
        {
            switch (temperatureParameter)
            {
            case TemperatureParameter.Celsius:
                return(Celsius.ToString("0") + '°');

            case TemperatureParameter.Fahrenheit:
                return(Fahrenheit.ToString("0") + '°');

            case TemperatureParameter.Kelvin:
                return(Kelvin.ToString("0"));

            default:
                return(Celsius.ToString("0") + '°');
            }
        }
Ejemplo n.º 6
0
        /// <summary>
        /// 准备温感点位数据,Id和position位置信息
        /// </summary>
        /// <param name="floorName"></param>
        private void PrepareTemperature(string floorName)
        {
            List <TemperaturePoint> temperaturePoints = new List <TemperaturePoint>();
            string sql = StaticSql.TEMPERATURE_POINT;

            using (var db = new IntegrateDbContext())
            {
                List <TemperaturePointOriginal> temperaturePointOriginals = db.Database.SqlQuery <TemperaturePointOriginal>(sql).ToList();
                temperaturePointOriginals.ForEach(item =>
                {
                    BoundingBox boundingbox = JsonConvert.DeserializeObject <BoundingBox>(item.BoundingBox);
                    double x     = (boundingbox.max.x + boundingbox.min.x) * 0.5;
                    double y     = (boundingbox.max.y + boundingbox.min.y) * 0.5;
                    double z     = (boundingbox.max.z + boundingbox.min.z) * 0.5;
                    var position = string.Format("{0},{1},{2}", x, y, z);
                    temperaturePoints.Add(new TemperaturePoint {
                        objectId = item.Id, position = position
                    });
                });
            }

            foreach (TemperaturePoint dr in temperaturePoints)
            {
                List <TemperatureParameter> temperaturePointsParameters = null;
                if (m_tempMap.ContainsKey(floorName))
                {
                    temperaturePointsParameters = m_tempMap[floorName];
                }
                else
                {
                    temperaturePointsParameters = new List <TemperatureParameter>();
                    m_tempMap.Add(floorName, temperaturePointsParameters);
                }

                TemperatureParameter tempPara = new TemperatureParameter();
                string[]             xyz      = dr.position.Split(',');
                tempPara.px = Convert.ToDouble(xyz[0]);
                tempPara.py = Convert.ToDouble(xyz[1]);
                tempPara.pz = Convert.ToDouble(xyz[2]);
                tempPara.id = dr.objectId;
                temperaturePointsParameters.Add(tempPara);
            }
        }
Ejemplo n.º 7
0
 public void Set(TemperatureParameter t)
 {
     TemperatureParameter = t;
 }
Ejemplo n.º 8
0
 public static void ChangeParameter(TemperatureParameter newPar)
 {
     Parameter = newPar;
 }
Ejemplo n.º 9
0
        internal static string GenerateLockDetailDescription(HeWeatherModel model, bool isNight, TemperatureParameter parameter, DateTime desiredDate)
        {
            var todayIndex = Array.FindIndex(model.DailyForecast, x =>
            {
                return(x.Date.Date == desiredDate.Date);
            });

            if (isNight && desiredDate.Hour < 12)
            {
                todayIndex--;
            }
            if (todayIndex < 0)
            {
                todayIndex = 0;
            }
            var    主语    = model.NowWeather.Now.Condition;
            string zhuyu = loader.GetString("xianzai");

            if (Tools.Random.Next(200) >= 100)
            {
                if (isNight)
                {
                    主语    = model.DailyForecast[todayIndex].Condition.NightCond;
                    zhuyu = loader.GetString("wanjian");
                }
                else
                {
                    主语    = model.DailyForecast[todayIndex].Condition.DayCond;
                    zhuyu = loader.GetString("jintian");
                }
            }
            string        binyu;
            StringBuilder decoration = new StringBuilder();

            if (Tools.Random.Next(200) >= 100)
            {
                if (Tools.Random.Next(200) >= 100 && model.NowWeather.Temprature.Celsius < 0)
                {
                    decoration.Append(wendudi.SelectRandomString() + ", ");
                }
                else if (Tools.Random.Next(200) >= 100 && model.NowWeather.Temprature.Celsius > 25)
                {
                    decoration.Append(wendugao.SelectRandomString() + ", ");
                }
                if (Tools.Random.Next(200) >= 100 && model.DailyForecast[todayIndex].Humidity > 80)
                {
                    decoration.Append(shiduda[0] + ", ");
                }
                if (model.NowWeather.Visibility != null)
                {
                    if (Tools.Random.Next(200) >= 100 && model.NowWeather.Visibility.KM < 0.5)
                    {
                        decoration.Append(nengjiandudi[0] + ", ");
                    }
                }
                if (Tools.Random.Next(200) >= 100)
                {
                    switch (主语)
                    {
                    case WeatherCondition.unknown:
                        return(loader.GetString("unknown_weather"));

                    case WeatherCondition.sunny:
                    case WeatherCondition.few_clouds:
                    case WeatherCondition.partly_cloudy:
                    case WeatherCondition.calm:
                    case WeatherCondition.light_breeze:
                    case WeatherCondition.moderate:
                    case WeatherCondition.fresh_breeze:
                        decoration.Append(haotianqi.SelectRandomString() + ", ");
                        break;

                    case WeatherCondition.overcast:
                    case WeatherCondition.cloudy:
                    case WeatherCondition.windy:
                        break;

                    case WeatherCondition.strong_breeze:
                    case WeatherCondition.high_wind:
                        break;

                    case WeatherCondition.gale:
                    case WeatherCondition.strong_gale:
                    case WeatherCondition.storm:
                    case WeatherCondition.violent_storm:
                    case WeatherCondition.hurricane:
                    case WeatherCondition.tornado:
                    case WeatherCondition.tropical_storm:
                        decoration.Append(huaitianqi.SelectRandomString() + ", ");
                        break;

                    case WeatherCondition.shower_rain:
                        break;

                    case WeatherCondition.heavy_shower_rain:
                    case WeatherCondition.thundershower:
                    case WeatherCondition.heavy_thunderstorm:
                    case WeatherCondition.hail:
                        decoration.Append(huaitianqi.SelectRandomString() + ", ");
                        break;

                    case WeatherCondition.light_rain:
                    case WeatherCondition.moderate_rain:
                        break;

                    case WeatherCondition.heavy_rain:
                    case WeatherCondition.extreme_rain:
                        decoration.Append(huaitianqi.SelectRandomString() + ", ");
                        break;

                    case WeatherCondition.drizzle_rain:
                        break;

                    case WeatherCondition.storm_rain:
                    case WeatherCondition.heavy_storm_rain:
                    case WeatherCondition.severe_storm_rain:
                    case WeatherCondition.freezing_rain:
                        decoration.Append(huaitianqi.SelectRandomString() + ", ");
                        break;

                    case WeatherCondition.light_snow:
                        break;

                    case WeatherCondition.moderate_snow:
                    case WeatherCondition.heavy_snow:
                    case WeatherCondition.snowstorm:
                        decoration.Append(huaitianqi.SelectRandomString() + ", ");
                        break;

                    case WeatherCondition.sleet:
                    case WeatherCondition.rain_snow:
                    case WeatherCondition.shower_snow:
                    case WeatherCondition.snow_flurry:
                        break;

                    case WeatherCondition.mist:
                        break;

                    case WeatherCondition.foggy:
                    case WeatherCondition.haze:
                    case WeatherCondition.sand:
                    case WeatherCondition.dust:
                    case WeatherCondition.volcanic_ash:
                    case WeatherCondition.duststorm:
                    case WeatherCondition.sandstorm:
                        decoration.Append(huaitianqi.SelectRandomString() + ", ");
                        break;

                    case WeatherCondition.hot:
                    case WeatherCondition.cold:
                        break;

                    default:
                        break;
                    }
                }
            }
            switch (主语)
            {
            case WeatherCondition.unknown:
                return(loader.GetString("unknown_weather"));

            case WeatherCondition.sunny:
                binyu = sunny.SelectRandomString();
                break;

            case WeatherCondition.cloudy:
                binyu = cloudy.SelectRandomString();
                break;

            case WeatherCondition.few_clouds:
                binyu = few_clouds.SelectRandomString();
                break;

            case WeatherCondition.partly_cloudy:
                binyu = partly_cloudy.SelectRandomString();
                break;

            case WeatherCondition.overcast:
                binyu = overcast.SelectRandomString();
                break;

            case WeatherCondition.windy:
                binyu = windy.SelectRandomString();
                break;

            case WeatherCondition.calm:
            case WeatherCondition.light_breeze:
            case WeatherCondition.moderate:
            case WeatherCondition.fresh_breeze:
                binyu = breeze.SelectRandomString();
                break;

            case WeatherCondition.strong_breeze:
            case WeatherCondition.high_wind:
            case WeatherCondition.gale:
            case WeatherCondition.strong_gale:
                binyu = gale.SelectRandomString();
                break;

            case WeatherCondition.storm:
            case WeatherCondition.violent_storm:
            case WeatherCondition.hurricane:
            case WeatherCondition.tornado:
            case WeatherCondition.tropical_storm:
                binyu = storm.SelectRandomString();
                break;

            case WeatherCondition.shower_rain:
            case WeatherCondition.heavy_shower_rain:
                binyu = shower.SelectRandomString();
                break;

            case WeatherCondition.thundershower:
            case WeatherCondition.heavy_thunderstorm:
                binyu = thundershower.SelectRandomString();
                break;

            case WeatherCondition.hail:
                binyu = hail.SelectRandomString();
                break;

            case WeatherCondition.drizzle_rain:
            case WeatherCondition.light_rain:
            case WeatherCondition.moderate_rain:
                binyu = moderate_rain.SelectRandomString();
                break;

            case WeatherCondition.heavy_rain:
            case WeatherCondition.extreme_rain:
                binyu = heavy_rain.SelectRandomString();
                break;

            case WeatherCondition.storm_rain:
            case WeatherCondition.heavy_storm_rain:
            case WeatherCondition.severe_storm_rain:
                binyu = storm.SelectRandomString();
                break;

            case WeatherCondition.freezing_rain:
                binyu = freezing_rain.SelectRandomString();
                break;

            case WeatherCondition.light_snow:
            case WeatherCondition.moderate_snow:
                binyu = moderate_snow.SelectRandomString();
                break;

            case WeatherCondition.heavy_snow:
                binyu = heavy_snow.SelectRandomString();
                break;

            case WeatherCondition.snowstorm:
                binyu = snowstorm.SelectRandomString();
                break;

            case WeatherCondition.sleet:
            case WeatherCondition.rain_snow:
                binyu = sleet.SelectRandomString();
                break;

            case WeatherCondition.shower_snow:
            case WeatherCondition.snow_flurry:
                binyu = shower_snow.SelectRandomString();
                break;

            case WeatherCondition.mist:
                binyu = mist.SelectRandomString();
                break;

            case WeatherCondition.foggy:
                binyu = foggy.SelectRandomString();
                break;

            case WeatherCondition.haze:
                binyu = haze.SelectRandomString();
                break;

            case WeatherCondition.sand:
            case WeatherCondition.dust:
                binyu = dust.SelectRandomString();
                break;

            case WeatherCondition.volcanic_ash:
            case WeatherCondition.duststorm:
            case WeatherCondition.sandstorm:
                binyu = duststorm.SelectRandomString();
                break;

            case WeatherCondition.hot:
                binyu = loader.GetString("bianre");
                break;

            case WeatherCondition.cold:
                binyu = loader.GetString("bianleng");
                break;

            default: return(loader.GetString("unknown_weather"));
            }
            string nowtemp;
            string tomorrowtemp;

            switch (parameter)
            {
            case TemperatureParameter.Celsius:
                nowtemp      = model.DailyForecast[todayIndex].LowTemp.Celsius + "°~" + model.DailyForecast[todayIndex].HighTemp.Celsius + '°';
                tomorrowtemp = model.DailyForecast[todayIndex + 1].LowTemp.Celsius + "°~" + model.DailyForecast[todayIndex + 1].HighTemp.Celsius + '°';
                break;

            case TemperatureParameter.Fahrenheit:
                nowtemp      = model.DailyForecast[todayIndex + 0].LowTemp.Fahrenheit + "°~" + model.DailyForecast[todayIndex + 0].HighTemp.Fahrenheit + '°';
                tomorrowtemp = model.DailyForecast[todayIndex + 1].LowTemp.Fahrenheit + "°~" + model.DailyForecast[todayIndex + 1].HighTemp.Fahrenheit + '°';
                break;

            case TemperatureParameter.Kelvin:
                nowtemp      = model.DailyForecast[todayIndex + 0].LowTemp.Kelvin + "K~" + model.DailyForecast[todayIndex + 0].HighTemp.Kelvin + "K";
                tomorrowtemp = model.DailyForecast[todayIndex + 1].LowTemp.Kelvin + "K~" + model.DailyForecast[todayIndex + 1].HighTemp.Kelvin + "K";
                break;

            default:
                nowtemp      = model.DailyForecast[todayIndex + 0].LowTemp.Celsius + "°~" + model.DailyForecast[todayIndex + 0].HighTemp.Celsius + "°";
                tomorrowtemp = model.DailyForecast[todayIndex + 1].LowTemp.Celsius + "°~" + model.DailyForecast[todayIndex + 1].HighTemp.Celsius + "°";
                break;
            }
            string tomorrowcondition;
            var    converter = new ConditiontoTextConverter();

            tomorrowcondition = (string)converter.Convert(model.DailyForecast[todayIndex + 1].Condition.DayCond, null, null, null);
            return(string.Format(loader.GetString("LockDetail"), zhuyu, binyu, decoration, nowtemp, tomorrowcondition, tomorrowtemp));
        }
Ejemplo n.º 10
0
 public void Set(TemperatureParameter t)
 {
     TemperatureParameter = t;
 }
Ejemplo n.º 11
0
 public TempViewModel(TemperatureParameter l)
 {
     this.Parameter = l;
     Title = l.GetDisplayName();
 }
Ejemplo n.º 12
0
 public TempViewModel(TemperatureParameter l)
 {
     this.Parameter = l;
     Title          = l.GetDisplayName();
 }
Ejemplo n.º 13
0
 public static string GetFormat(TemperatureParameter parameter)
 {
     switch (parameter)
     {
         case TemperatureParameter.Celsius:
         case TemperatureParameter.Fahrenheit:
             return "°";
         case TemperatureParameter.Kelvin:
             return "K";
         default:
             return "°";
     }
 }
Ejemplo n.º 14
0
 public double ActualDouble(TemperatureParameter parameter)
 {
     switch (parameter)
     {
         case TemperatureParameter.Celsius:
             return Celsius;
         case TemperatureParameter.Fahrenheit:
             return Fahrenheit;
         case TemperatureParameter.Kelvin:
             return Kelvin;
         default:
             return Celsius;
     }
 }
Ejemplo n.º 15
0
 public string Actual(TemperatureParameter temperatureParameter)
 {
     switch (temperatureParameter)
     {
         case TemperatureParameter.Celsius:
             return Celsius.ToString("0") + '°';
         case TemperatureParameter.Fahrenheit:
             return Fahrenheit.ToString("0") + '°';
         case TemperatureParameter.Kelvin:
             return Kelvin.ToString("0");
         default:
             return Celsius.ToString("0") + '°';
     }
 }
Ejemplo n.º 16
0
 internal static string GenerateLockDetailDescription(HeWeatherModel model, bool isNight, TemperatureParameter parameter, DateTime desiredDate)
 {
     var todayIndex = Array.FindIndex(model.DailyForecast, x =>
     {
         return x.Date.Date == desiredDate.Date;
     });
     if (isNight && desiredDate.Hour < 12)
     {
         todayIndex--;
     }
     if (todayIndex < 0)
     {
         todayIndex = 0;
     }
     var 主语 = model.NowWeather.Now.Condition;
     string zhuyu = loader.GetString("xianzai");
     if (Tools.Random.Next(200) >= 100)
     {
         if (isNight)
         {
             主语 = model.DailyForecast[todayIndex].Condition.NightCond;
             zhuyu = loader.GetString("wanjian");
         }
         else
         {
             主语 = model.DailyForecast[todayIndex].Condition.DayCond;
             zhuyu = loader.GetString("jintian");
         }
     }
     string binyu;
     StringBuilder decoration = new StringBuilder();
     if (Tools.Random.Next(200) >= 100)
     {
         if (Tools.Random.Next(200) >= 100 && model.NowWeather.Temprature.Celsius < 0)
         {
             decoration.Append(wendudi.SelectRandomString() + ", ");
         }
         else if (Tools.Random.Next(200) >= 100 && model.NowWeather.Temprature.Celsius > 25)
         {
             decoration.Append(wendugao.SelectRandomString() + ", ");
         }
         if (Tools.Random.Next(200) >= 100 && model.DailyForecast[todayIndex].Humidity > 80)
         {
             decoration.Append(shiduda[0] + ", ");
         }
         if (model.NowWeather.Visibility != null)
             if (Tools.Random.Next(200) >= 100 && model.NowWeather.Visibility.KM < 0.5)
             {
                 decoration.Append(nengjiandudi[0] + ", ");
             }
         if (Tools.Random.Next(200) >= 100)
             switch (主语)
             {
                 case WeatherCondition.unknown:
                     return loader.GetString("unknown_weather");
                 case WeatherCondition.sunny:
                 case WeatherCondition.few_clouds:
                 case WeatherCondition.partly_cloudy:
                 case WeatherCondition.calm:
                 case WeatherCondition.light_breeze:
                 case WeatherCondition.moderate:
                 case WeatherCondition.fresh_breeze:
                     decoration.Append(haotianqi.SelectRandomString() + ", ");
                     break;
                 case WeatherCondition.overcast:
                 case WeatherCondition.cloudy:
                 case WeatherCondition.windy:
                     break;
                 case WeatherCondition.strong_breeze:
                 case WeatherCondition.high_wind:
                     break;
                 case WeatherCondition.gale:
                 case WeatherCondition.strong_gale:
                 case WeatherCondition.storm:
                 case WeatherCondition.violent_storm:
                 case WeatherCondition.hurricane:
                 case WeatherCondition.tornado:
                 case WeatherCondition.tropical_storm:
                     decoration.Append(huaitianqi.SelectRandomString() + ", ");
                     break;
                 case WeatherCondition.shower_rain:
                     break;
                 case WeatherCondition.heavy_shower_rain:
                 case WeatherCondition.thundershower:
                 case WeatherCondition.heavy_thunderstorm:
                 case WeatherCondition.hail:
                     decoration.Append(huaitianqi.SelectRandomString() + ", ");
                     break;
                 case WeatherCondition.light_rain:
                 case WeatherCondition.moderate_rain:
                     break;
                 case WeatherCondition.heavy_rain:
                 case WeatherCondition.extreme_rain:
                     decoration.Append(huaitianqi.SelectRandomString() + ", ");
                     break;
                 case WeatherCondition.drizzle_rain:
                     break;
                 case WeatherCondition.storm_rain:
                 case WeatherCondition.heavy_storm_rain:
                 case WeatherCondition.severe_storm_rain:
                 case WeatherCondition.freezing_rain:
                     decoration.Append(huaitianqi.SelectRandomString() + ", ");
                     break;
                 case WeatherCondition.light_snow:
                     break;
                 case WeatherCondition.moderate_snow:
                 case WeatherCondition.heavy_snow:
                 case WeatherCondition.snowstorm:
                     decoration.Append(huaitianqi.SelectRandomString() + ", ");
                     break;
                 case WeatherCondition.sleet:
                 case WeatherCondition.rain_snow:
                 case WeatherCondition.shower_snow:
                 case WeatherCondition.snow_flurry:
                     break;
                 case WeatherCondition.mist:
                     break;
                 case WeatherCondition.foggy:
                 case WeatherCondition.haze:
                 case WeatherCondition.sand:
                 case WeatherCondition.dust:
                 case WeatherCondition.volcanic_ash:
                 case WeatherCondition.duststorm:
                 case WeatherCondition.sandstorm:
                     decoration.Append(huaitianqi.SelectRandomString() + ", ");
                     break;
                 case WeatherCondition.hot:
                 case WeatherCondition.cold:
                     break;
                 default:
                     break;
             }
     }
     switch (主语)
     {
         case WeatherCondition.unknown:
             return loader.GetString("unknown_weather");
         case WeatherCondition.sunny:
             binyu = sunny.SelectRandomString();
             break;
         case WeatherCondition.cloudy:
             binyu = cloudy.SelectRandomString();
             break;
         case WeatherCondition.few_clouds:
             binyu = few_clouds.SelectRandomString();
             break;
         case WeatherCondition.partly_cloudy:
             binyu = partly_cloudy.SelectRandomString();
             break;
         case WeatherCondition.overcast:
             binyu = overcast.SelectRandomString();
             break;
         case WeatherCondition.windy:
             binyu = windy.SelectRandomString();
             break;
         case WeatherCondition.calm:
         case WeatherCondition.light_breeze:
         case WeatherCondition.moderate:
         case WeatherCondition.fresh_breeze:
             binyu = breeze.SelectRandomString();
             break;
         case WeatherCondition.strong_breeze:
         case WeatherCondition.high_wind:
         case WeatherCondition.gale:
         case WeatherCondition.strong_gale:
             binyu = gale.SelectRandomString();
             break;
         case WeatherCondition.storm:
         case WeatherCondition.violent_storm:
         case WeatherCondition.hurricane:
         case WeatherCondition.tornado:
         case WeatherCondition.tropical_storm:
             binyu = storm.SelectRandomString();
             break;
         case WeatherCondition.shower_rain:
         case WeatherCondition.heavy_shower_rain:
             binyu = shower.SelectRandomString();
             break;
         case WeatherCondition.thundershower:
         case WeatherCondition.heavy_thunderstorm:
             binyu = thundershower.SelectRandomString();
             break;
         case WeatherCondition.hail:
             binyu = hail.SelectRandomString();
             break;
         case WeatherCondition.drizzle_rain:
         case WeatherCondition.light_rain:
         case WeatherCondition.moderate_rain:
             binyu = moderate_rain.SelectRandomString();
             break;
         case WeatherCondition.heavy_rain:
         case WeatherCondition.extreme_rain:
             binyu = heavy_rain.SelectRandomString();
             break;
         case WeatherCondition.storm_rain:
         case WeatherCondition.heavy_storm_rain:
         case WeatherCondition.severe_storm_rain:
             binyu = storm.SelectRandomString();
             break;
         case WeatherCondition.freezing_rain:
             binyu = freezing_rain.SelectRandomString();
             break;
         case WeatherCondition.light_snow:
         case WeatherCondition.moderate_snow:
             binyu = moderate_snow.SelectRandomString();
             break;
         case WeatherCondition.heavy_snow:
             binyu = heavy_snow.SelectRandomString();
             break;
         case WeatherCondition.snowstorm:
             binyu = snowstorm.SelectRandomString();
             break;
         case WeatherCondition.sleet:
         case WeatherCondition.rain_snow:
             binyu = sleet.SelectRandomString();
             break;
         case WeatherCondition.shower_snow:
         case WeatherCondition.snow_flurry:
             binyu = shower_snow.SelectRandomString();
             break;
         case WeatherCondition.mist:
             binyu = mist.SelectRandomString();
             break;
         case WeatherCondition.foggy:
             binyu = foggy.SelectRandomString();
             break;
         case WeatherCondition.haze:
             binyu = haze.SelectRandomString();
             break;
         case WeatherCondition.sand:
         case WeatherCondition.dust:
             binyu = dust.SelectRandomString();
             break;
         case WeatherCondition.volcanic_ash:
         case WeatherCondition.duststorm:
         case WeatherCondition.sandstorm:
             binyu = duststorm.SelectRandomString();
             break;
         case WeatherCondition.hot:
             binyu = loader.GetString("bianre");
             break;
         case WeatherCondition.cold:
             binyu = loader.GetString("bianleng");
             break;
         default: return loader.GetString("unknown_weather");
     }
     string nowtemp;
     string tomorrowtemp;
     switch (parameter)
     {
         case TemperatureParameter.Celsius:
             nowtemp = model.DailyForecast[todayIndex].LowTemp.Celsius + "°~" + model.DailyForecast[todayIndex].HighTemp.Celsius + '°';
             tomorrowtemp = model.DailyForecast[todayIndex + 1].LowTemp.Celsius + "°~" + model.DailyForecast[todayIndex + 1].HighTemp.Celsius + '°';
             break;
         case TemperatureParameter.Fahrenheit:
             nowtemp = model.DailyForecast[todayIndex + 0].LowTemp.Fahrenheit + "°~" + model.DailyForecast[todayIndex + 0].HighTemp.Fahrenheit + '°';
             tomorrowtemp = model.DailyForecast[todayIndex + 1].LowTemp.Fahrenheit + "°~" + model.DailyForecast[todayIndex + 1].HighTemp.Fahrenheit + '°';
             break;
         case TemperatureParameter.Kelvin:
             nowtemp = model.DailyForecast[todayIndex + 0].LowTemp.Kelvin + "K~" + model.DailyForecast[todayIndex + 0].HighTemp.Kelvin + "K";
             tomorrowtemp = model.DailyForecast[todayIndex + 1].LowTemp.Kelvin + "K~" + model.DailyForecast[todayIndex + 1].HighTemp.Kelvin + "K";
             break;
         default:
             nowtemp = model.DailyForecast[todayIndex + 0].LowTemp.Celsius + "°~" + model.DailyForecast[todayIndex + 0].HighTemp.Celsius + "°";
             tomorrowtemp = model.DailyForecast[todayIndex + 1].LowTemp.Celsius + "°~" + model.DailyForecast[todayIndex + 1].HighTemp.Celsius + "°";
             break;
     }
     string tomorrowcondition;
     var converter = new ConditiontoTextConverter();
     tomorrowcondition = (string)converter.Convert(model.DailyForecast[todayIndex + 1].Condition.DayCond, null, null, null);
     return string.Format(loader.GetString("LockDetail"), zhuyu, binyu, decoration, nowtemp, tomorrowcondition, tomorrowtemp);
 }