Beispiel #1
0
 public void Deserialize(string language, JSON_WeatherSetParam json)
 {
     this.Deserialize(json);
     this.localizeFields(language);
 }
Beispiel #2
0
 public void Deserialize(JSON_WeatherSetParam json)
 {
     if (json == null)
     {
         return;
     }
     this.mIname = json.iname;
     this.mName  = json.name;
     this.mStartWeatherIdLists.Clear();
     if (json.st_wth != null)
     {
         foreach (string str in json.st_wth)
         {
             this.mStartWeatherIdLists.Add(str);
         }
     }
     this.mStartWeatherRateLists.Clear();
     if (json.st_rate != null)
     {
         foreach (int num in json.st_rate)
         {
             this.mStartWeatherRateLists.Add(num);
         }
     }
     if (this.mStartWeatherIdLists.Count > this.mStartWeatherRateLists.Count)
     {
         for (int index = 0; index < this.mStartWeatherIdLists.Count - this.mStartWeatherRateLists.Count; ++index)
         {
             this.mStartWeatherRateLists.Add(0);
         }
     }
     this.mChangeClockMin = json.ch_cl_min;
     this.mChangeClockMax = json.ch_cl_max;
     if (this.mChangeClockMin > this.mChangeClockMax)
     {
         this.mChangeClockMax = this.mChangeClockMin;
     }
     this.mChangeWeatherIdLists.Clear();
     if (json.ch_wth != null)
     {
         foreach (string str in json.ch_wth)
         {
             this.mChangeWeatherIdLists.Add(str);
         }
     }
     this.mChangeWeatherRateLists.Clear();
     if (json.ch_rate != null)
     {
         foreach (int num in json.ch_rate)
         {
             this.mChangeWeatherRateLists.Add(num);
         }
     }
     if (this.mChangeWeatherIdLists.Count <= this.mChangeWeatherRateLists.Count)
     {
         return;
     }
     for (int index = 0; index < this.mChangeWeatherIdLists.Count - this.mChangeWeatherRateLists.Count; ++index)
     {
         this.mChangeWeatherRateLists.Add(0);
     }
 }