public override string GetLocalizedValue(ProductVersion value) { return(ProductVersions.GetLocalizedName(value)); }
private new void PopulateComboBox(bool isResidential, bool isHouseboat) { if (isResidential) { mNewLotType = LotType.Residential; mCombo.ValueList.Clear(); List <KeyValuePair <ResidentialLotSubType, string> > list = new List <KeyValuePair <ResidentialLotSubType, string> >(Responder.Instance.EditTownModel.ResidentialSubTypes); list.Sort(OnSort); foreach (KeyValuePair <ResidentialLotSubType, string> pair in list) { if (pair.Key == mCurrentResidentialSubType) { mCombo.ValueList.Add(pair.Value, pair.Key); mCombo.CurrentSelection = (uint)(mCombo.ValueList.Count - 1); } else if (pair.Key != ResidentialLotSubType.kEP10_PrivateLot) { mCombo.ValueList.Add(pair.Value, pair.Key); } } mOkButton.Enabled = true; } else { mNewLotType = LotType.Commercial; mCombo.ValueList.Clear(); if (mCurrentCommercialSubType == CommercialLotSubType.kCommercialUndefined) { mCombo.ValueList.Add(Responder.Instance.LocalizationModel.LocalizeString("Ui/Caption/EditTown/ChangeLotType:ChooseLotType", new object[0]), CommercialLotSubType.kCommercialUndefined); mCombo.CurrentSelection = (uint)(mCombo.ValueList.Count - 1); mOkButton.Enabled = false; } List <KeyValuePair <CommercialLotSubType, string> > list = new List <KeyValuePair <CommercialLotSubType, string> >(Responder.Instance.EditTownModel.GetCommercialSubTypes(false, isHouseboat)); list.Sort(OnSort); foreach (KeyValuePair <CommercialLotSubType, string> pair in list) { mCombo.ValueList.Add((pair.Key == CommercialLotSubType.kEP11_BaseCampFuture ? pair.Value + " (" + ProductVersions.GetLocalizedName(ProductVersion.EP11) + ")" : pair.Value), pair.Key); if (pair.Key == mCurrentCommercialSubType) { mCombo.CurrentSelection = (uint)(mCombo.ValueList.Count - 1); mOkButton.Enabled = true; } } } mCombo.CurrentSelection = mCombo.CurrentSelection; mCombo.Invalidate(); mCombo.Enabled = mCombo.ValueList.Count > 1; }