Ejemplo n.º 1
0
		public void InsertVeranstaltungsTyp ()
			{
			AVEventEntry VeranstaltungsTypEntry = new AVEventEntry ();
			AVEntries.Insert (0, VeranstaltungsTypEntry);
			VeranstaltungsTypEntry.OriginalToken = "VeranstaltungsTyp";
			VeranstaltungsTypEntry.Token = "TypID";
			if (TypIDToCreate == Guid.Empty)
				VeranstaltungsTypEntry.ContentLines.Add ("Nicht definiert");
			else
				VeranstaltungsTypEntry.ContentLines.Add(DataModell.TypCacheInstance.AvailableTyp[TypIDToCreate].NameID);
			VeranstaltungsTypEntry.ContentLines.Add (TypIDToCreate.ToString( ));
			VeranstaltungsTypEntry.DataDependencyId = null;	//Guid.Parse( System.Guid.Empty.ToString ());
			}
Ejemplo n.º 2
0
		public void InsertTorenFuehrer()
			{
			AVEventEntry TourenFuehrerEntry = new AVEventEntry();
			AVEntries.Add(TourenFuehrerEntry);
			TourenFuehrerEntry.OriginalToken = "TourenFuehrer";
			TourenFuehrerEntry.Token = "TourenFuehrer";
			if (TourenFuehrerPerson != null)
				{
				TourenFuehrerEntry.ContentLines.Add($"{TourenFuehrerPerson.Vorname} {TourenFuehrerPerson.Name}");
				TourenFuehrerEntry.ContentLines.Add($"{TourenFuehrerPerson.Id}");
				}
			else
				{
				TourenFuehrerEntry.ContentLines.Add("");
				TourenFuehrerEntry.ContentLines.Add("");
				}
			TourenFuehrerEntry.DataDependencyId = DataDependencyEnums.RootFDDIDsForAVEvent.TourenfuehrerRoot;	//Guid.Parse("AF1DFD7B-A552-4111-873F-0254789092EF");
			}
Ejemplo n.º 3
0
		public void SetVisibleTimingsElemente ()
			{
			foreach (XElement Entry in AddOnInformations.XPathSelectElements (ADD_EVENT_EVENT_TIMINGS))
				{
				String TimingTypID = Entry.XPathSelectElement (ADD_EVENT_EVENT_TIMINGS_TYP).Value;
				DateTime TimeA = DateTime.Parse (Entry.XPathSelectElement (ADD_EVENT_TIME_A).Value);
				DateTime TimeB = DateTime.Parse (Entry.XPathSelectElement (ADD_EVENT_TIME_B).Value);
				AVEventEntry NewTiming = new AVEventEntry ();
				AVEntries.Add (NewTiming);
				NewTiming.OriginalToken = TimingTypID;
				NewTiming.Token = ADD_EVENT_EVENT_TIMINGS; 
				NewTiming.ContentLines.Add (TimingTypID);
				NewTiming.ContentLines.Add (TimeA.ToString ());
				NewTiming.ContentLines.Add (TimeB.ToString ());
				if (TimingTypID == ADD_EVENT_EVENT_VON_BIS)
					NewTiming.DataDependencyId = DataDependencyEnums.RootFDDIDsForAVEvent.TerminEventVonBisRoot;	//Guid.Parse("4DC6CBCA-B0FD-42DA-8439-13D529A72D63"); //Termin
				if (TimingTypID == ADD_EVENT_ANZ_VON_BIS)
					NewTiming.DataDependencyId = DataDependencyEnums.RootFDDIDsForAVEvent.TimingsStandBildAnzVonBisRoot;	//Guid.Parse("B5067704-95D5-4EAD-9546-4DED2850EF28");	//Timings
				if (TimingTypID == ADD_EVENT_BANNER_VON_BIS)
					NewTiming.DataDependencyId = DataDependencyEnums.RootFDDIDsForAVEvent.TimingsBannerAnzVonBisRoot;
				}
			}
Ejemplo n.º 4
0
		public void InsertVeranstalter ()
			{
			AVEventEntry VeranstalterEntry = new AVEventEntry ();
			AVEntries.Add (VeranstalterEntry);
			VeranstalterEntry.OriginalToken = "Veranstalter";
			VeranstalterEntry.Token = "Veranstalter";
			VeranstalterEntry.ContentLines.Add ("Veranstalter");
			VeranstalterEntry.ContentLines.Add (VeranstalterID);
			if (TypIDToCreate == DataDependencyEnums.FDDIDsForAktiverSport.TypAktiverSport)
				VeranstalterEntry.DataDependencyId = DataDependencyEnums.FDDIDsForAktiverSport.VeranstalterTyp;   //Guid.Parse( "d9bc12f9-042e-4f40-87fa-e82e47742cba");
			else if (TypIDToCreate == DataDependencyEnums.FDDIDsForBergwanderung.TypBergwanderung)
				VeranstalterEntry.DataDependencyId = DataDependencyEnums.FDDIDsForBergwanderung.VeranstalterTyp; //Guid.Parse( "d9bc12f9-042e-4f40-87fa-e82e47742cba");
			else if (TypIDToCreate == DataDependencyEnums.FDDIDsForRadTour.TypRadTour)
				VeranstalterEntry.DataDependencyId = DataDependencyEnums.FDDIDsForRadTour.VeranstalterTyp; //Guid.Parse( "d9bc12f9-042e-4f40-87fa-e82e47742cba");
			else if (TypIDToCreate == DataDependencyEnums.FDDIDsForWanderung.TypWanderung)
				VeranstalterEntry.DataDependencyId = DataDependencyEnums.FDDIDsForWanderung.VeranstalterTyp; //Guid.Parse( "d9bc12f9-042e-4f40-87fa-e82e47742cba");
			else
				{
				TypIDToCreate = DataDependencyEnums.FDDIDsForNichtDefiniert.TypNichtDefiniert;
				VeranstalterEntry.DataDependencyId = Guid.Empty;	//Guid.Parse( "d9bc12f9-042e-4f40-87fa-e82e47742cba");
				}
			
			}
Ejemplo n.º 5
0
		public void FillTheEvent ( String[] InputLines)
			{
			int InputLineIndex = StartingLine - 1;
			AVEventEntry TokenEntry = null;
			while (InputLineIndex++ < EndingLine)
				{
				String EntryID = String.Empty;
				String FoundToken = String.Empty;
				if (StartOfEntry(InputLines[InputLineIndex].Trim(), ref EntryID, ref FoundToken))
					{
					if ((String.IsNullOrEmpty (FoundToken))
					    && (InputLineIndex > 1))
						continue;
					if (TokenEntry != null)
						{
						TokenEntry.EndingLine = InputLineIndex - 1;
						TokenEntry.FillContentLines(InputLines);
						}
					TokenEntry = new AVEventEntry();
					TokenEntry.EventsRoot = EventsRoot;
					TokenEntry.Parent = this;
					AVEntries.Add(TokenEntry);
					TokenEntry.StartingLine = InputLineIndex;
					TokenEntry.OriginalToken = FoundToken;
					if (!String.IsNullOrEmpty(EntryID))
						{
						TokenEntry.TokenRow = WMB.DataWrapper.Instance.SplitToken[EntryID];
						if (String.IsNullOrEmpty(TokenEntry.TokenRow["DataElementeTemplatesID"].ToString()))
							throw new Exception("TokenEntry.TokenRow [\"DataElementeTemplatesID\"] missing");
						}
					else
						{
						TokenEntry.DataDependencyId = null;
						}
					}
				}
			if (TokenEntry != null)
				{
				TokenEntry.EndingLine = InputLineIndex - 1;
				TokenEntry.FillContentLines(InputLines);
				}
			if (AVEntries.Count > 0) //		Check for Multi Line Titel
				{
				if ((AVEntries[0].StartingLine - StartingLine) > 1)
					{
					StringBuilder NewTitle = new StringBuilder();
					NewTitle.Append(Title);
					int Index = StartingLine + 1;
					while (Index < AVEntries[0].StartingLine)
						NewTitle.Append(" " + InputLines[Index++].Trim());
					Title = NewTitle.ToString();
					}
				}
			Title = Title.Replace(" Drucken", "");
			InsertVeranstaltungsTyp();
			InsertTorenFuehrer();
			AVEntries [0].DataDependencyId = DataDependencyEnums.RootFDDIDsForAVEvent.AVEventRootRoot;	//Guid.Parse( "4B610645-A3FE-426B-AB25-3DFBED90AE1C");
			InsertVeranstalter();
			if (this.ConnectedPlainTextContent != null)
				SetVisibleTimingsElemente();
			}