Exemple #1
0
		private void Window_Loaded (object sender, RoutedEventArgs e)
			{
			m_Creator = new CreateDataForLeisureDisplay ();
			m_Creator.Run ();
			Close ();
			}
Exemple #2
0
		void RunCreation ()
			{

			WMB.Basics.DoEvents ();
			if (CVM.CommonValues.IsTestRun)
				WMB.Basics.ReportInformationToEventViewer ("WPMediaCreateStandBildTVUnits.RunCreation",
							 "CentralService.RunCreation - Stared");

#region CreateDataForLeisureDisplay
			WMB.Basics.DoEvents();
			if (CVM.CommonValues.IsTestRun)
				WMB.Basics.ReportInformationToEventViewer("WPMediaCreateStandBildTVUnits.RunCreation",
							 "LeisureDisplayData.Run - started");
			try
				{
				AEAGLeisureManagementFunctions.CreateDataForLeisureDisplay LeisureDisplayData = new CreateDataForLeisureDisplay();
				LeisureDisplayData.Run();
				}
			catch (Exception Excp)
				{
				WMB.Basics.ReportErrorToEventViewer("CreateStandbildTVUnits.RunCreation",
					"Beim Erzeugen der Sauna&Tennis Buchungen trat folgender Fehler auf:\r\n"
					+ Excp.Message);
				}

			WMB.Basics.DoEvents();
			if (CVM.CommonValues.IsTestRun)
				WMB.Basics.ReportInformationToEventViewer("WPMediaCreateStandBildTVUnits.RunCreation",
							 "LeisureDisplayData.Run - ended");
			
#endregion


#region CreateDataForBannerAndButtonDisplay
			if (CVM.CommonValues.IsTestRun)
				WMB.Basics.ReportInformationToEventViewer("WPMediaCreateStandBildTVUnits.RunCreation",
							 "BannerAndButtonDisplayData.Run - started");
			try
				{
				WPMediaCreateBannerAndButtonFunctions.CreateDataForBannerAndButtonDisplay BannerAndButtonDisplayData = new CreateDataForBannerAndButtonDisplay();
				BannerAndButtonDisplayData.Run();
				}
			catch (Exception Excp)
				{
				WMB.Basics.ReportErrorToEventViewer("CreateStandbildTVUnits.RunCreation",
					"Beim Erzeugen der Banner&Button Daten trat folgender Fehler auf:\r\n"
					+ Excp.Message);
				}
			if (CVM.CommonValues.IsTestRun)
				WMB.Basics.ReportInformationToEventViewer("WPMediaCreateStandBildTVUnits.RunCreation",
							 "BannerAndButtonDisplayData.Run - ended");

			
#endregion


#region CreateStandbildTV

			WMB.Basics.DoEvents();
			if (CVM.CommonValues.IsTestRun)
				WMB.Basics.ReportInformationToEventViewer("WPMediaCreateStandBildTVUnits.RunCreation",
							 "CreateUnit.Create () - started");
			try
				{
				WPMediaCreateStandbildTVUnitsDll.CreateStandbildTVUnits CreateUnit = new CreateStandbildTVUnits();
				CreateUnit.InsertNewTimingCall += new InsertNewTimingEvent(CreateUnit_InsertNewTimingCall);
				CreateUnit.GetFinalPicturesCall += new GetFinalPicturesEvent(CreateUnit_GetFinalPicturesCall);
				String ComputerName = WMB.Basics.GetComputerName().ToUpper();
				//String LocalWPMediaRoot = CommonDataBase.DataBase.GetLocalWPMediaRoot();
				String LocalWPMediaRoot = WMB.Basics.WPMediaServerRootDirectory;
				CreateUnit.RootDirectoryForEntryGeneration = Path.Combine(LocalWPMediaRoot, "Source");
				String CommonControlServerName = Properties.Settings.Default.CommonControlServer;
				CreateUnit.CreateAllRequiredCentralComponents();
				}
			catch (Exception Excp)
				{
				WMB.Basics.ReportErrorToEventViewer("CreateStandbildTVUnits.RunCreation",
					"Beim Erzeugen der StandbildTVUnits trat folgender Fehler auf:\r\n"
					+ Excp.Message);
				}

			WMB.Basics.DoEvents();
			if (CVM.CommonValues.IsTestRun)
				WMB.Basics.ReportInformationToEventViewer("WPMediaCreateStandBildTVUnits.RunCreation",
							 "CreateUnit.Create () - ended");

			
#endregion


#region StartExternalProgramm ' s
			Process ProcessBaseObject = WMB.Basics.StartExternalProgramm("WPMediaDataBaseProcessing.exe", "");
			if (ProcessBaseObject == null)
				{
				WMB.Basics.ReportErrorToEventViewer("WPMediaCreateStandBildTVUnits.RunCreation",
					"WPMediaDataBaseProcessing.exe - not Started");
				}
			Process ProcessLogObject = WMB.Basics.StartExternalProgramm("WPMediaCollectPlayersLogFiles.exe", "");
			if (ProcessLogObject == null)
				{
				WMB.Basics.ReportErrorToEventViewer("WPMediaCreateStandBildTVUnits.RunCreation",
					"WPMediaCollectPlayersLogFiles.exe - not Started");
				}
			
#endregion


#region CreateProgrammDataSet und CentralService.CreateBeitragsSerializationEntries
			WMB.Basics.DoEvents();
			if (CVM.CommonValues.IsTestRun)
				WMB.Basics.ReportInformationToEventViewer("WPMediaCreateStandBildTVUnits.RunCreation",
							 "CreateProgrammDataSet und CentralService.CreateBeitragsSerializationEntries - started");

			try
				{
				ManagedProgrammManagement ProgrammManagement = new ManagedProgrammManagement();
				m_CreatedProgrammDefinitionFiles = ProgrammManagement.CreateProgrammDataSet();
				WPMediaCentralService.WPMediaCentralServices CentralService = new WPMediaCentralService.WPMediaCentralServices();
				if (!CentralService.CreateBeitragsSerializationEntries(m_CreatedProgrammDefinitionFiles))
					{
					WMB.Basics.ReportErrorToEventViewer("CreateStandbildTVUnits.RunCreation",
						"Beim Lauf von \"CreateProgrammDataSet\" trat ein Fehler auf");
					}
				}
			catch (Exception Excp)
				{
				WMB.Basics.ReportErrorToEventViewer("CreateStandbildTVUnits.RunCreation",
					"Beim Lauf von \"CreateProgrammDataSet\" trat folgender Fehler auf:\r\n"
					+ Excp.Message);
				}
			WMB.Basics.DoEvents();
			if (CVM.CommonValues.IsTestRun)
				WMB.Basics.ReportInformationToEventViewer("WPMediaCreateStandBildTVUnits.RunCreation",
							 "CreateProgrammDataSet und CentralService.CreateBeitragsSerializationEntries - ended");

#endregion


#region DoInternetPictureProcessing - Managen der Bilder und Thumbnails
			if (CVM.CommonValues.IsTestRun)
				WMB.Basics.ReportInformationToEventViewer("WPMediaCreateStandBildTVUnits.RunCreation",
							 "DoInternetPictureProcessing - started");
			try
				{
				DoInternetPictureProcessing();
				}
			catch (Exception Excp)
				{
				WMB.Basics.ReportErrorToEventViewer("CreateStandbildTVUnits.RunCreation",
					"Beim Lauf von \"DoInternetPictureProcessing\" trat folgender Fehler auf:\r\n"
					+ Excp.Message);
				}

			WMB.Basics.DoEvents();
			if (CVM.CommonValues.IsTestRun)
				WMB.Basics.ReportInformationToEventViewer("WPMediaCreateStandBildTVUnits.RunCreation",
							 "DoInternetPictureProcessing - ended");

#endregion


#region HTML Programmvorschau Creation
			WMB.Basics.DoEvents();
			if (CVM.CommonValues.IsTestRun)
				WMB.Basics.ReportInformationToEventViewer("WPMediaCreateStandBildTVUnits.RunCreation",
							 "HTMLCreatorInstance.CreateHTML () - started");
			try
				{
#if DEBUG
				m_CreatedProgrammDefinitionFiles = new List<string> () {"\\\\Webserver2\\WPMediaSender\\WohnPark\\XMLs\\WPMediaProgramm.ser"};
#endif

				foreach (String ProgrammDefinitionFileName in m_CreatedProgrammDefinitionFiles)
					{
					try
						{
						if (CVM.CommonValues.IsTestRun)
							WMB.Basics.ReportInformationToEventViewer("WPMediaCreateStandBildTVUnits.RunCreation",
										 "HTML Creation for \"" + ProgrammDefinitionFileName + "\" should Start");
						if (!File.Exists(ProgrammDefinitionFileName))
							{
							WMB.Basics.ReportErrorToEventViewer
								("CreateStandbildTVUnits.RunCreation",
									 "Der File \"" + ProgrammDefinitionFileName +
									 "\" existiert nicht\r\n");
							continue;
							}
						HTMLCreator HTMLCreatorInstance = new HTMLCreator();
						HTMLCreatorInstance.SetData(ProgrammDefinitionFileName);
						HTMLCreatorInstance.CreateHTML();
						if (CVM.CommonValues.IsTestRun)
							WMB.Basics.ReportInformationToEventViewer("WPMediaCreateStandBildTVUnits.RunCreation",
										 "HTML Creation for \"" + ProgrammDefinitionFileName + "\" ended");

						}
					catch (Exception OneFileExcp)
						{
						WMB.Basics.ReportErrorToEventViewer("CreateStandbildTVUnits.RunCreation",
							"Beim Erzeugen der InternetProgrammVorschau für \"" + ProgrammDefinitionFileName
							+ "\" trat folgender Fehler auf:\r\n"
							+ OneFileExcp.ToString ());
						}
					WMB.Basics.DoEvents();
					}
				}
			catch (Exception Excp)
				{
				WMB.Basics.ReportErrorToEventViewer("CreateStandbildTVUnits.RunCreation",
					"Beim Erzeugen der InternetProgrammVorschau(en) trat folgender Fehler auf:\r\n"
					+ Excp.ToString ());
				}
			if (CVM.CommonValues.IsTestRun)
				WMB.Basics.ReportInformationToEventViewer("WPMediaCreateStandBildTVUnits.RunCreation",
							 "HTMLCreatorInstance.CreateHTML () - ended");

			
#endregion


#region Aktualisieren der BeitragsBeschreibungen

			try
				{
				WMB.DataWrapper.Instance.DoActualizeAll();
				}
			catch (Exception Excp)
				{
				WMB.Basics.ReportErrorToEventViewer ("Bei WMB.DataWrapper.Instance.DoActualizeAll trat folgender Fehler auf:\r\n"
					+ Excp.ToString ());
				}
#endregion
			Close ();
			if (CVM.CommonValues.IsTestRun)
				WMB.Basics.ReportInformationToEventViewer("WPMediaCreateStandBildTVUnits.RunCreation",
							 "CentralService.RunCreation - Ended");
			}