示例#1
0
		private void ConnectStationenToDisplayAbleStationen (WienerLinienVerwaltungDataModell VerwaltungsModell)
			{
			foreach (Station Stat in VerwaltungsModell.Stationen)
				{
				foreach (LocationStop Loc in LocationStops)
					{
					//if ((Loc.GeoLat == Stat.Lat)
					//    && (Loc.GeoLon == Stat.Lon))
					if (Stat.RblNummer == Loc.Attributes["rbl"])
						{
						Loc.ConnectedDisplayableStation = GetDisplayableStation (Stat.ID);
						Loc.ConnectedDisplayableStation.ConnectedLocations.Add(Loc);
						}
					}
				}
			}
示例#2
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;
				}

			}
		private void WienerLinienVerwaltungControl_OnLoaded (object Sender, RoutedEventArgs E)
			{
			if (!Roles.IsUserInRole ("Administrator"))
				return;
			DataModell = new WienerLinienVerwaltungDataModell();
			DataModell.SaveAllChangesCall += DataModell_SaveAllChangesCall;
			DataModell.LoadTables(VerwaltungDataSet);
			DataContext = DataModell;
			CheckModell = WienerLinienDataModell.LoadFromSaveStore();
			}
		public Distanz(WienerLinienVerwaltungDataModell ParentParameter, DataRow BasisRowParameter)
			: base(BasisRowParameter, "AltErlaaInfoConnectionString")
			{
			Parent = ParentParameter;
			}
		public Linie (WienerLinienVerwaltungDataModell ParentParameter, DataRow BasisRowParameter)
			: base(BasisRowParameter, "AltErlaaInfoConnectionString")
			{
			Parent = ParentParameter;
			StationID = (Guid) BasisRow ["StationID"];

			}
		static String SaveToSaveStore(String FileName, WienerLinienVerwaltungDataModell MappingData)
			{
			FileName = Basics.ConvertToCorrectFileNameElement(FileName);
			if (File.Exists(SaveStoreDirectoryName + "\\" + FileName + ".ser"))
				{
				File.Delete(SaveStoreDirectoryName + "\\" + FileName + ".ser");
				}
			MappingData.TablesDataSet.AcceptChanges ();
			Basics.SerializeObjectToFile(SaveStoreDirectoryName + "\\" + FileName + ".ser", MappingData);
			return FileName;
			}