/// <summary> /// 本日天気セット /// </summary> private void SetTodayWether() { //ウェザーリストが取得できていない場合は更新しない if (WetherDtlList == null) { return; } //時間帯を取得 string nowTimeId = getTimeId(); foreach (var wehter in this.WetherDtlList) { //NULL回避 if (wehter.date == null) { continue; } //本日の天気を検索 if (wehter.date.Value.Date == DateTime.Now.Date && nowTimeId == wehter.timeId) { //本日天気セット this.WetherToday = new MsgWeatherInfoDtl60(wehter); //抜ける return; } } //抜けてきてしまった場合は、取得できていない。nullを設定 this.WetherToday = null; }
/// <summary> /// 前回天気をセットする /// </summary> private void SetTodayWetherLast() { WetherTodayLast = new MsgWeatherInfoDtl60(WetherToday); }