Beispiel #1
0
		void m_CheckForProgrammDataReload_Tick (object sender, EventArgs e)
			{
			DispatcherTimer CheckForProgrammDataReload = sender as DispatcherTimer;
			CheckForProgrammDataReload.Stop ();
			if (m_ManagedProgrammManagement == null)
				{
				m_ManagedProgrammManagement = new ManagedProgrammManagement ();
				m_ManagedProgrammManagement.CheckOrSwitchPreloadedProgrammData ();
				m_ManagedProgrammManagement.ActuallProgrammData = m_ManagedProgrammManagement.CheckOrLoadActuallProgrammData ();
				if (m_ManagedProgrammManagement.ActuallProgrammData == null)
					{
					WMB.Basics.ReportErrorToEventViewer ("RootWindow.m_CheckForProgrammDataReload_Tick",
						 "m_ManagedProgrammManagement.ActuallProgrammData = null");
					m_CheckForProgrammDataReload.Interval = TimeSpan.FromSeconds (5);
					m_CheckForProgrammDataReload.Start ();
					return;
					}
				StartPlayerLoop ();
				}
			else
				{
				ReloadShouldBePerformed = m_ManagedProgrammManagement.ShouldProgrammDataReloaded ();
				}
			RescheduleCheckForProgrammDataReload ();
			}
Beispiel #2
0
		private void CreateAndStartCopyProcess (String CentralServerName)
			{
			ManagedProgrammManagement ProgrammManagement = new ManagedProgrammManagement ();
			String ServerWPMediaRoot = Path.Combine ("\\\\" + CentralServerName, CVM.CommonValues.XML_SENDER_ROOT_DIRECTORY);
			ProgrammManagement.BeginCopyFromServerToClient (ServerWPMediaRoot, m_CVM.WPMediaRoot);
			}
Beispiel #3
0
		bool CheckIfLogoWindowShouldUsed ()
			{
			ManagedProgrammManagement ProgrammManagement = new ManagedProgrammManagement ();
			return ProgrammManagement.LogoWindowShouldUsed ();
			}
		void SetNewManagedProgrammManagementThread_DoWork (object sender, DoWorkEventArgs e)
			{
			EventForChangingManagedProgrammManagement.WaitOne (-1);
			if (NewManagedProgrammManagement != null)
				ActuallManagedProgrammManagement = NewManagedProgrammManagement;
			EventForChangingManagedProgrammManagement.Reset ();
			}
		private void StartRenew (ManagedProgrammManagement NewChangedManagedProgrammManagement)
			{
			if ((SetNewManagedProgrammManagementThread != null)
			    && (SetNewManagedProgrammManagementThread.IsBusy))
				return;
			SetNewManagedProgrammManagementThread = new BackgroundWorker ();
			SetNewManagedProgrammManagementThread.RunWorkerCompleted += 
				new RunWorkerCompletedEventHandler (SetNewManagedProgrammManagementThread_RunWorkerCompleted);
			SetNewManagedProgrammManagementThread.DoWork += new DoWorkEventHandler (SetNewManagedProgrammManagementThread_DoWork);
			SetNewManagedProgrammManagementThread.RunWorkerAsync();
			}
Beispiel #6
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");
			}