private List <MsgText> GetMsgTextByCurrentConditions() { if (this.lstboxDisasterKind.SelectedIndex < 0) { return(null); } if (this.lstboxLanguageKind.SelectedIndex < 0) { return(null); } if (this.lstboxCityType.SelectedIndex < 0) { return(null); } DisasterKind kindInfo = lstboxDisasterKind.SelectedItem as DisasterKind; MsgTextDisplayLanguageKind selectedLangKind = this.lstboxLanguageKind.SelectedItem as MsgTextDisplayLanguageKind; MsgTextCityType selectedCityType = this.lstboxCityType.SelectedItem as MsgTextCityType; if (kindInfo == null || selectedLangKind == null || selectedCityType == null) { return(null); } List <MsgText> msgInfo = BasisData.FindMsgTextInfoByDisasterCode(kindInfo.Code); if (msgInfo == null) { return(null); } List <MsgText> result = null; foreach (MsgText txt in msgInfo) { if (txt.LanguageKindID != selectedLangKind.ID) { continue; } if (txt.CityTypeID != selectedCityType.ID) { continue; } if (result == null) { result = new List <MsgText>(); } MsgText copy = new MsgText(); copy.DeepCopyFrom(txt); result.Add(copy); } return(result); }
/// <summary> /// [도시 유형 종류] 초기 설정. /// </summary> /// <returns></returns> private bool InitializeCityTypeListBox() { this.lstboxCityType.Items.Clear(); if (BasisData.MsgTextCityType == null || BasisData.MsgTextCityType.Count < 1) { return(false); } foreach (MsgTextCityType city in BasisData.MsgTextCityType) { MsgTextCityType copy = new MsgTextCityType(); copy.DeepCopyFrom(city); this.lstboxCityType.Items.Add(copy); } return(true); }