Esempio n. 1
0
		private void FillLocationTypeChoice(ChoiceWrapper cho, bool addCompositeTypes)
		{
			cho.Clear();
			LocationTypeInfo typeInfo;
			if (addCompositeTypes)
			{
				typeInfo = Location.LocationTypeInfo(LocationType.Any);
				if (typeInfo.ShowFor(mLocDb.DatabaseType))
					cho.Add(typeInfo.FriendlyName, LocationType.Any);

				typeInfo = Location.LocationTypeInfo(LocationType.AnyPortal);
				if (typeInfo.ShowFor(mLocDb.DatabaseType))
					cho.Add(typeInfo.FriendlyName, LocationType.AnyPortal);
			}
			int customIndex = 0;
			foreach (LocationType type in Enum.GetValues(typeof(LocationType)))
			{
				if (type != LocationType.Any && type != LocationType.AnyPortal && type != LocationType._Unknown)
				{
					if (type == LocationType.Custom)
					{
						customIndex = cho.Count;
					}
					typeInfo = Location.LocationTypeInfo(type);
					if (typeInfo.ShowFor(mLocDb.DatabaseType))
						cho.Add(typeInfo.FriendlyName, type);
				}
			}
			cho.Selected = addCompositeTypes ? 0 : customIndex;
		}
Esempio n. 2
0
		//
		#region Atlas > Route Tab
		//
		private void LoadRouteChoice(ChoiceWrapper choice, char firstLetter)
		{
			choice.Clear();
			choice.Add("<Custom>", Location.NO_LOCATION);
			foreach (Location loc in mLocDb.GetAlphaIndex(firstLetter))
			{
				choice.Add(loc.Name, loc);
			}
			choice.Selected = 0;
		}