예제 #1
0
		private void InsertDisplayableBus (DisplayableStation ParentStation, Linie Lin)
			{
			DisplayableBus NewDisplayableBus = new DisplayableBus()
				{
				Parent = ParentStation,
				NameID = Lin.NameID,
				Richtung = Lin.Richtung
				};
			ParentStation.DisplayableLinien.Add (NewDisplayableBus);
			}
예제 #2
0
		private void InsertDisplayableNightLine (DisplayableStation ParentStation, Linie Lin)
			{
			DisplayableNightLine NewDisplayableNightLine = new DisplayableNightLine()
				{
				Parent = ParentStation,
				NameID = Lin.NameID,
				Richtung = Lin.Richtung
				};
			ParentStation.DisplayableLinien.Add (NewDisplayableNightLine);
			}
예제 #3
0
		public void CreateConfigurationEnvironment (WienerLinienVerwaltungDataModell VerwaltungsModell)
			{
			foreach (Station Stat in VerwaltungsModell.Stationen)
				{
				DisplayableStation NewStation = new DisplayableStation()
					{
						Parent = this
					};
				NewStation.ID = Stat.ID;
				NewStation.NameID = Stat.NameID;
				NewStation.Title = Stat.Title;
				NewStation.ColorARGBWert = Stat.ColorARGBWert;
				DisplayableStationen.Add(NewStation);

				foreach (Linie Lin in Stat.Linien)
					{
					switch ((LineType) Enum.Parse (typeof (LineType), Lin.LineType))
						{
						case LineType.Error:
							break;
						case LineType.ptMetro:
							InsertDisplayableUBahn (NewStation, Lin);
							break;
						case LineType.ptBusCity:
							InsertDisplayableBus (NewStation, Lin);
							break;
						case LineType.ptBusNight:
							InsertDisplayableNightLine (NewStation, Lin);
							break;
						}
					}
				}
			ConnectStationenToDisplayAbleStationen (VerwaltungsModell);
			ConnectTrafficLineToDisplayAbleLine ();
			CreateDisplayableDepartures ();
			foreach (Distanz Dist in VerwaltungsModell.Distanzen)
				{
				DistanzenDictionary [Dist.MaschineNameID.ToUpper ()] = Dist;
				}

			}