示例#1
0
		private void Window_Loaded (object sender, RoutedEventArgs e)
			{
			WMB.WPMediaApplicationState.Instance.Properties["UsedDomain"] = Settings.Default.UsedDomain;
			CVM.LoginHandler.ApplicationName = "AltErlaaInfo";
//#if DEBUG
			String[] Rollen = CVM.LoginHandler.CheckUser("heinz", "monika");
			WMB.WPMediaApplicationState.Instance.Properties["UserName"] = "******";
			WMB.WPMediaApplicationState.Instance.Properties["PassWord"] = "******";
//#else
//			String[] Rollen = CVM.LoginHandler.CheckUser("", "");
//#endif
			if (Rollen == null)
				{
				Close();
				return;
				}
			WMB.WPMediaApplicationState.Instance.Properties["Roles"] = Rollen;
			WMB.WPMediaApplicationState.Instance.Properties["DefaultConnectionStringName"] = "AltErlaaInfoConnectionString";


			//WMB.WPMediaApplicationState.Instance.Properties["UserName"] = "******";
			//WMB.WPMediaApplicationState.Instance.Properties["WPMediaToken"]
			//	= WMB.WPMediaApplicationState.Instance.Properties["UserName"].ToString() + ";SecurityToken";
			m_CVM = new CVM.CommonValues ();
			PreparePlayableMaterialDllInstance = new PreparePlayableMaterialDLL ();
			PreparePlayableMaterialDllInstance.GetAVIInputFormatCall += new PreparePlayableMaterialDLL.GetAVIInputFormatEvent (PreparePlayableMaterialDllInstance_GetAVIInputFormatCall);
			PreparePlayableMaterialDllInstance.OnStart (new string[] {});
			}
		public ManagedSimpleTimingsControl ()
			{
			InitializeComponent ();
			m_CVM = new CVM.CommonValues ();
			m_XAMLHandling = new XAMLHandling (m_CVM);
			//m_XAMLHandling.ShowGridLines = true;
			this.Loaded +=new RoutedEventHandler(ManagedSimpleTimingsControl_Loaded);
			}
示例#3
0
		private void Window_Loaded (object sender, RoutedEventArgs e)
			{
			m_CVM = new CommonValues();
			m_CheckForProgrammDataReload = new DispatcherTimer();
			m_CheckForProgrammDataReload.Interval = TimeSpan.FromMilliseconds (100);
			m_CheckForProgrammDataReload.Tick += new EventHandler (m_CheckForProgrammDataReload_Tick);
			m_CheckForProgrammDataReload.Start ();

			m_DaylyRestartTimer = new DispatcherTimer ();
			m_DaylyRestartTimer.Interval = DateTime.Now.AddDays (1).Date - DateTime.Now - TimeSpan.FromSeconds (1);
			m_DaylyRestartTimer.Tick += new EventHandler (m_DaylyRestartTimer_Tick);
			m_DaylyRestartTimer.Start ();
			Cursor = Cursors.None;
			ResizeMode = ResizeMode.NoResize;
			}
示例#4
0
		private void Window_Loaded (object sender, RoutedEventArgs e)
			{
			if (WMB.Basics.IAmActiveBefore ())
				{
				WMB.Basics.ReportErrorToEventViewer ("WPMediaPlayingDataController.Window_Loaded",
					"Start wird abgebrochen, weil schon eine Instanz aktiv ist");
				Close ();
				return;
				}
			m_CVM = new CommonValues();
			m_XAMLHandling = new XAMLHandling (m_CVM);
			m_CVM.SetVideoSize ();

			Width = 0;
			Height = 0;
			MaxWidth = 0;
			MaxHeight = 0;
			MinWidth = 0;
			MinHeight = 0;
			Top = 0;
			Left = 0;
			this.Topmost = false;

			CreateTimeWindow ();
			if (CheckIfLogoWindowShouldUsed () == true)
				CreateLogoWindow ();

			this.WindowStartupLocation = WindowStartupLocation.Manual; 
			m_StartDataCopyProcess = new DispatcherTimer();
			m_StartDataCopyProcess.Tick += new EventHandler (m_StartDataCopyProcess_Tick);
			m_StartDataCopyProcess.Interval = TimeSpan.FromSeconds (60);
#if DEBUG
			m_StartDataCopyProcess.Interval = TimeSpan.FromSeconds (1);
			m_StartDataCopyProcess.Start ();
			return;
#endif
			m_StartDataCopyProcess.Start ();
			m_ShowTimeTimer = new DispatcherTimer();
			m_ShowTimeTimer.Interval = TimeSpan.FromSeconds (1);
			m_ShowTimeTimer.Tick += new EventHandler (m_ShowTimeTimer_Tick);
			m_ShowTimeTimer.Start ();
			m_StartPlayerTimer = new DispatcherTimer ();
			m_StartPlayerTimer.Tick += new EventHandler (m_StartPlayerTimer_Tick);
			m_StartPlayerTimer.Interval = TimeSpan.FromSeconds (10);
			m_StartPlayerTimer.Start ();
			Mouse.OverrideCursor = Cursors.None;
			}
示例#5
0
		public void SetParameter (CVM.CommonValues Cvm, String [] Arguments, int VideoWidth,
						int VideoHeight, double CompletePlayLengthInSeconds)
			{
			m_CVM = Cvm;
			m_XAML = new XAMLHandling (m_CVM);
			m_Arguments = Arguments;
			if (m_Arguments.Length == 0)
				return;
			if (!File.Exists (m_Arguments [0]))
				{
				CloseRequestedCall ("");
				return;
				}
			m_WPMediaProgramm = m_CVM.GetExternalProgrammDetails (m_Arguments,
						ref m_ProgrammClass, ref m_ProgrammInstance);
			m_ProgrammRoot = m_CVM.GetProgrammDirectory ();
			m_XAML = new XAMLHandling (m_CVM);
			m_XAML.ShowGridLines = false;
			}
示例#6
0
		private void PackageDataControl_OnLoaded (object Sender, RoutedEventArgs E)
			{
			
			m_CVM = new CVM.CommonValues ();
			m_XAMLHandler = new CVM.XAMLHandling (m_CVM);
			m_RootGrid = m_XAMLHandler.CreateGrid(new int[] { 200, 400 }, new int[] { 5, 95 });
			this.Content = m_RootGrid;
			m_PackageDataElemente = new TreeView ();
			m_PackageDataElemente.Margin = (Thickness)m_TConverter.ConvertFromString("0, 0, 5, 0");
			Grid.SetColumn(m_PackageDataElemente, 0);
			Grid.SetRow (m_PackageDataElemente, 1);
			m_ContentArea = new TabControl ();
			CVM.DataSetViewer.ContentTabControl = m_ContentArea;
			m_RootGrid.Children.Add(m_ContentArea);
			Grid.SetColumn(m_ContentArea, 1);
			Grid.SetRow (m_ContentArea, 0);
			Grid.SetRowSpan (m_ContentArea, 2);
			FillGraphicsHandlerElements (m_PackageDataElemente);
			m_RootGrid.Children.Add (m_PackageDataElemente);
			m_XAMLHandler.SetColumnAsPositionMover(m_RootGrid, 0);
			}
示例#7
0
		protected void Page_Load (object sender, EventArgs e)
			{
			String LogicalUserName = String.Empty;
			String[] LogicalRollen = null;
			InternetSecurityFunctions.RunRequestStarupSecurity(Request, Session, ref LogicalUserName, ref LogicalRollen);

			m_CVM = new CommonValues(true);
			m_XAMLHandling = new XAMLHandling (m_CVM);
			if (Request.QueryString ["Entry"] != null)
				{
				String EntryName = Request.QueryString ["Entry"].ToString ();
				if (EntryName == "AEAGLeisure")
					{
					String DayToExpand = "Heute";
					if (Request.QueryString ["DayToExpand"] != null)
						DayToExpand = Request.QueryString ["DayToExpand"].ToString ();
					PerformShowOverview (DayToExpand);
					return;
					}
				}
			if ((Request.QueryString ["Table"] != null)
				&& (Request.QueryString ["Display"] != null)
				&& (Request.QueryString ["DateTime"] != null))
				{
				String TableName = Request.QueryString ["Table"].ToString ();
				String DisplayBlock = Request.QueryString ["Display"].ToString ();
				String DateToDisplay = Request.QueryString ["DateTime"].ToString ();
				String HinweisDate = String.Empty;
				TimeSpan Difference = DateTime.Parse (DateToDisplay).Date - DateTime.Now.Date;
				if (Math.Abs (Difference.TotalMinutes) < 1) 
					HinweisDate = TagesTable [0];
				if (Math.Abs (Difference.TotalMinutes - 1440) < 1) 
					HinweisDate = TagesTable [1];
				if (Math.Abs (Difference.TotalMinutes - 2880) < 1)
					HinweisDate = TagesTable [2];
				PerformShowOverview (HinweisDate);
				PerformShowEntry (TableName, DisplayBlock, DateToDisplay);
				return;
				}
			}
示例#8
0
		void SetParameter ()
			{
			VideoFileName = WMB.Basics.GetCommandLineContent(m_Arguments,
						WPMediaManagement.ManagedProgrammData.Param_VideoFileName);
			String VideoControlFileName = WMB.Basics.GetCommandLineContent (m_Arguments,
						WPMediaManagement.ManagedProgrammData.Param_VideoControlFileName);
			if (File.Exists (VideoControlFileName))
				{
				m_HostCVM.LoadAndProcessAutoFile (VideoControlFileName);
				m_VideoPlayingData = m_HostCVM.DeSerializedDesriptionObject as CVM.WPMediaVideoPlayingData;
				m_VideoPlayingData.SetData ();
				}
			String OverlayControlFileName = WMB.Basics.GetCommandLineContent (m_Arguments,
						WPMediaManagement.ManagedProgrammData.Param_StandBildControlFileName);
			if (File.Exists (OverlayControlFileName))
				{
				CVM.CommonValues HelpCVM = new CVM.CommonValues ();
				HelpCVM.LoadAndProcessAutoFile (OverlayControlFileName);
				m_StandbildPlayingData = HelpCVM.DeSerializedDesriptionObject as CVM.WPMediaStandbildPlayingData;
				}
			PlayingIndex = 0;
			}
示例#9
0
		public void SetParameter (CVM.CommonValues cvm, String [] Arguments,
			int VideoWidth, int VideoHeight, double CompleteDuration)
			{
			try
				{
				m_CVM = cvm;
				m_OldArguments = Arguments;
				if (CompleteDuration > 1)
					ExpectedStopTime = m_CVM.GetDateTimeNow.AddSeconds (CompleteDuration);
				}
			catch (Exception Excp)
				{
				WMB.Basics.ReportErrorToEventViewer ("MainDynamicPage.SetParameter",
					"Folgender Fehler trat auf:\r\n" + Excp.ToString());
				WMB.Basics.ReportErrorToEventViewer ("MainDynamicPage.SetParameter",
							 "Bei folgenden Parameter Settings \"" + String.Join (" ", Arguments) + "\"");

				}

			}
示例#10
0
		void CreateExternesProgrammGenerationEntry (DataRow [] ShowAbleFiles, System.Web.UI.ControlCollection ParentContainer)
			{
			foreach (DataRow ShowAbleFile in ShowAbleFiles)
				{
				String SubPathAndName = ShowAbleFile ["SubPathAndName"].ToString ();
				String ArchiveID = ShowAbleFile ["ArchiveID"].ToString ();
				String ArchivePhysicalPath = Dh.GetArchivePhysicalPath (ArchiveID);
				String AutoFileName = Path.Combine (ArchivePhysicalPath, SubPathAndName);
				CVM.CommonValues m_CVM = new CommonValues (true);
				m_CVM.LoadAndProcessAutoFile (AutoFileName);
				WPMediaStandbildPlayingData m_StandBildPlayingData
					= m_CVM.DeSerializedDesriptionObject as CVM.WPMediaStandbildPlayingData;
				if (m_StandBildPlayingData == null)
					continue;
				String PlayingOrder = m_StandBildPlayingData.ActiveSortField ();

				int NumberOfEntries = m_StandBildPlayingData.NamesOfActiveDescriptions.Count;
				String NumberOfEntriesString = Convert.ToString (NumberOfEntries);
				String NumberOfPlayingEntries = Convert.ToString (m_StandBildPlayingData.NamesOfActiveDescriptions.Count);
				TableRow MaterialRow = new TableRow ();
				MaterialRow.CssClass = "CSS_MaterialRow";
				ParentContainer.Add (MaterialRow);
				TableCell MaterialFormatCell = new TableCell ();
				MaterialFormatCell.CssClass = "CSS_MaterialFormatCell";
				MaterialRow.Controls.Add (MaterialFormatCell);
				MaterialFormatCell.Text = "Karteien";

				TableCell MaterialNameCell = new TableCell ();
				MaterialNameCell.CssClass = "CSS_StandBildMaterialNameCell";
				MaterialRow.Controls.Add (MaterialNameCell);

				List<String> StandBildIndizessFiles = GetStandBildIndizessFiles (Dh, m_StandBildPlayingData);
				if (StandBildIndizessFiles.Count == 0)
					MaterialNameCell.Text = m_StandBildPlayingData.TableName + " ("
					                        + PlayingOrder + ", " + NumberOfPlayingEntries +
					                        ") - Keine aktuellen Einträge dzt. vorhanden";
				else
					{
					bool FirstTime = true;
					StringBuilder TextEntries = new StringBuilder();

					foreach (String StandBildIndexFileName in StandBildIndizessFiles)
						{
						String PureFileName = Path.GetFileName (StandBildIndexFileName);
						String HttpName = CVM.CommonValues.WEB_ROOT_SITE + "Common/WPMediaFinalInternetSource/"
						                  + m_StandBildPlayingData.TableName + "/" + PureFileName;
						String TypeName = PureFileName.Replace ("StandBildArchiv", "").Replace (".xml", "");
						TextEntries.Append ("<a href=\"" + HttpName + "\" target=\"_blank\">Einträge "
						                    + TypeName + "</strong></a><br>");
						if (FirstTime)
							{
							TextEntries.Append ("<br>"); 
							FirstTime = false;
							}
						}
					MaterialNameCell.Text = TextEntries.ToString ();
					}

				TableCell MaterialQualityCell = new TableCell ();
				MaterialQualityCell.CssClass = "CSS_MaterialQualityCell";
				MaterialRow.Controls.Add (MaterialQualityCell);
				MaterialQualityCell.Text = NumberOfEntriesString + " Einträge";

				TableCell MaterialSizeCell = new TableCell ();
				MaterialSizeCell.CssClass = "CSS_MaterialSizeCell";
				MaterialRow.Controls.Add (MaterialSizeCell);
				MaterialSizeCell.Text = ShowAbleFiles [0] ["FileSizeInkB"].ToString () + "kB";

				}

			}
示例#11
0
	private void InsertCommandsForTableData (String ServerWPMediaRoot, String ClientWPMediaRoot,
				String ArchiveFileName, List<String> Commands)
		{
		CVM.CommonValues m_CVMHelper = new CommonValues();
		m_CVMHelper.LoadAndProcessAutoFile (ArchiveFileName);
		foreach (String TargetDirectory in m_CVMHelper.ProcessableDirectories)
			{
			int SkipLength = ClientWPMediaRoot.Length + 1;
			String RemainingPath = TargetDirectory.Substring (SkipLength);
			String SourceDirectory = Path.Combine (ServerWPMediaRoot, RemainingPath);
			if (!Directory.Exists (TargetDirectory))
				Directory.CreateDirectory (TargetDirectory);
			//String Command = String.Format(" RoboCopy.exe \"{0}\" \"{1}\" /MIR /ns /nc /nfl /ndl /np /XF *.xml",
			//			   SourceDirectory, TargetDirectory);
			String Command = String.Format(" RoboCopy.exe \"{0}\" \"{1}\" /E /ns /nc /nfl /ndl /np /XF *.xml",
						   SourceDirectory, TargetDirectory);
			if (!Commands.Contains(Command))
				Commands.Add (Command);
			}
		}
		private void DoStartup ()
			{
			if (m_DataAccess != null)
				return;
			m_DataAccess = new WCFStandardsNS.WCFStandards ();	// default is WPMedia
			m_CVM = new CommonValues ();
			m_XAMLHandling = new XAMLHandling (m_CVM);
			}
示例#13
0
		private void SchedulingWindow_Loaded (object sender, RoutedEventArgs e)
			{
			m_ProgrammManagement = new WPMediaManagement.ManagedProgrammManagement ();
			CommonDataBase.CommonBasics.LoadWPMediaParameter ();
			m_CVM = new CVM.CommonValues ();
			m_XAMLHandling = new CVM.XAMLHandling (m_CVM);
			WMB.WPMediaApplicationState.Instance.Properties ["DataBase"] = DataBase;

			//CVM.LoginHandler.ApplicationName = "WPTV";
			//String userName = String.Empty;
			//m_Rollen = CVM.LoginHandler.CheckUser (ref userName);
			//if (m_Rollen == null)
			//	{
			//	Close ();
			//	return;
			//	}
			Cursor = Cursors.Wait;

			m_IntelliSenseFactory = new IntelliSenseAutoCompletionFactoryRoutines (DataBase);
			m_ControlFactory.m_Factory = m_IntelliSenseFactory;

			//m_XAMLHandling.ShowGridLines = true;
			Width = 900;
			Height = 650;
			m_RootGrid = m_XAMLHandling.CreateGrid (new int [] { 100 }, new int [] { 55, 70, 40 });
			this.Content = m_RootGrid;
			this.Background = SystemColors.ControlLightBrush;
			CreateAllGrids ();

			CreateAllControls ();

			FillSenderComboBox ();

			SetEventHandler ();
			Cursor = Cursors.Arrow;

			if (!ExternalControlServer.HookedInTheCommandProcessingChain ("SchedulingWindow"))
				{
				ExternalControlServer.MessageReceivedCall += new ExternalControlServer.MessageReceivedEvent
					(ExternalRequest_MessageReceivedCall);
				ExternalControlServer.HookeIntoTheCommandProcessingChain ("SchedulingWindow");
				}
//			ExternalControlServer.StartListening ();


			}
示例#14
0
		public AEAGLeisureDisplay ()
			{
			InitializeComponent ();
			m_CVM = new CommonValues();
			m_XAMLHandling = new XAMLHandling (m_CVM);
			}
示例#15
0
		private void UserControl_Loaded (object sender, RoutedEventArgs e)
			{
			m_CVM = new CommonValues ();
			m_XAML = new XAMLHandling (m_CVM);
			Grid EditGrid = m_XAML.CreateGrid (new int [] { 1}, new int [] { 10, 10, 8, 5000});
			Content = EditGrid;
			EditGrid.RowDefinitions [0].MinHeight = 40;
			EditGrid.RowDefinitions [0].MaxHeight = 40;
			EditGrid.RowDefinitions [1].MinHeight = 40;
			EditGrid.RowDefinitions [1].MaxHeight = 40;
			EditGrid.RowDefinitions [2].MinHeight = 30;
			EditGrid.RowDefinitions [2].MaxHeight = 30;

			m_MainControlButtons = m_XAML.CreateGrid (new int [] { 5, 3, 1 }, new int [] { 1 });
			EditGrid.Children.Add (m_MainControlButtons);
			Grid.SetRow (m_MainControlButtons, 0);
			Grid.SetColumn (m_MainControlButtons, 0);
			FillMainControl (m_MainControlButtons);

			m_DateControlButtons = m_XAML.CreateGrid (new int [] { 18, 6, 75 }, new int [] { 1 });
			EditGrid.Children.Add (m_DateControlButtons);
			Grid.SetRow (m_DateControlButtons, 1);
			Grid.SetColumn (m_DateControlButtons, 0);

			m_TimeControlButtons = m_XAML.CreateGrid (new int [] { 1 }, new int [] { 1 });
			EditGrid.Children.Add (m_TimeControlButtons);
			Grid.SetRow (m_TimeControlButtons, 2);
			Grid.SetColumn (m_TimeControlButtons, 0);

			m_BookingControlButtons = m_XAML.CreateGrid (new int [] { 1 }, new int [] { 1 });
			EditGrid.Children.Add (m_BookingControlButtons);
			Grid.SetRow (m_BookingControlButtons, 3);
			Grid.SetColumn (m_BookingControlButtons, 0);
			}
示例#16
0
		public bool CreateLayoutAsWebPage (DataSet FormatierDataSet, System.Web.UI.Page PageObject,
				Object ParentObject, DateTime DayToDisplay, DataRow BlockRow, DataRow ContentRow,
				DataRow [] TextInBlocks, double OriginalWidth, double OriginalHeight)
			{
			m_CVM = new CommonValues (true);
			m_XAMLHandling = new XAMLHandling (m_CVM);


			System.Web.UI.WebControls.Panel ParentPanel = ParentObject as System.Web.UI.WebControls.Panel;

			Panel HeadLinePanel = new Panel ();
			ParentPanel.Controls.Add (HeadLinePanel);
			Panel TablePanel = new Panel ();
			ParentPanel.Controls.Add (TablePanel);

			Table ParentTable = new Table ();
			ParentTable.CssClass = "CSS_GlobalContentTable";
			TablePanel.Controls.Add (ParentTable);

			Panel DescriptionPanel = new Panel ();
			ParentPanel.Controls.Add (DescriptionPanel);
			Table DescriptionTable = new Table ();
			DescriptionPanel.Controls.Add (DescriptionTable);

			if (TextInBlocks.Length != 1)
				{
				ParentTable.Caption = "Es war kein TextInBlocks Eintrag vorhanden";
				return false;
				}
			DataSet LocalFormatierDataSet = WMB.Basics.GetDataSetFromRowContent (ContentRow);
			String DataBaseItem = TextInBlocks [0] ["DataBaseItem"].ToString ();
			String DataBaseItemContentName = TextInBlocks [0] ["DataBaseItem"].ToString ();
			if ((String.IsNullOrEmpty (DataBaseItemContentName))
				|| (ContentRow.Table.Columns [DataBaseItemContentName] == null))
				{
				ParentTable.Caption = "AEAGWebLesisureDisplay.CreateLayoutAsWebPage" +
					"Das DataBase Item \"" + DataBaseItemContentName
					+ "\" ist in der Table  \"" + ContentRow.Table.TableName + "\" nicht enthalten";
				return false;
				}
			String [] QuotedRessources = ContentRow [DataBaseItemContentName].ToString ().Split ('|');
			int MaxNumberOfRows = 0;
			int TimingRowHeight = 0;
			int FirstColumnWidth = 0;
			if ((QuotedRessources [0].IndexOf ("Badminton") != -1)
				|| (QuotedRessources [0].IndexOf ("Tennis") != -1))
				{
				MaxNumberOfRows = 6;
				TimingRowHeight = 2;
				FirstColumnWidth = 5;
				}
			else
				{
				MaxNumberOfRows = 11;
				TimingRowHeight = 3;
				FirstColumnWidth = 10;
				}
			String AktualizingDateCheck = WMB.Basics.GetSelectFormattedDateTime (DayToDisplay.AddDays (-3).Date);
			DataRow [] LatestBookings = LocalFormatierDataSet.Tables ["Bookings"].Select
				(String.Format ("BookingDateTime > '{0}' and BookingStatus = 'B'", AktualizingDateCheck), "BookingDateTime Desc");
			
			if (LatestBookings.Length == 0)
				return InsertNoActuallBookingsAvailable (ParentTable, FormatierDataSet,
				BlockRow, ContentRow, TextInBlocks,
				OriginalWidth, OriginalHeight, QuotedRessources);
			DateTime LatestBookingTime = DateTime.Parse (LatestBookings [0] ["BookingDateTime"].ToString ());
			bool FirstRun = true;
			DataRow [] Associated = null;
			int RessourceIndex = 2;
			DateTime DayToSearchFor = DayToDisplay;
			int ColumnPercentage = 10;
			foreach (String QuotedRessource in QuotedRessources)
				{
				String Ressource = QuotedRessource.Trim (new char [] { '"', ' ' });
				Associated =
					LocalFormatierDataSet.Tables ["FullBookableUnits"].Select ("RessourceNameID = '" + Ressource + "'",
																			   "DisplayInColumnOrder");
				if (FirstRun)
					{
					FirstRun = false;
					int [] Rows = new int [MaxNumberOfRows];
					int [] Columns = new int [Associated.Length + 1];
					int FillIndex = 0;
					Rows [FillIndex++] = 2;
					Rows [FillIndex++] = TimingRowHeight;
					while (FillIndex < Rows.Length)
						Rows [FillIndex++] = 2;
					FillIndex = 0;
					Columns [FillIndex++] = FirstColumnWidth;
					while (FillIndex < Columns.Length)
						Columns [FillIndex++] = 2;

					if (Columns.Length > 8)
						ColumnPercentage = (80/(Columns.Length - 1)) * 15;
					else
						ColumnPercentage = (80 / (Columns.Length - 1)) * 8;
					FillTopHeader (HeadLinePanel, LatestBookingTime);
					TableRow HeadRow = new TableRow ();
					ParentTable.Rows.Add (HeadRow);
					HeadRow.CssClass = "CSS_TimeHeadRow";

					//TableCell ColumnDescriptionCell = new TableCell ();
					//ColumnDescriptionCell.CssClass = "CSS_ColumnGroupCell";
					//HeadRow.Cells.Add (ColumnDescriptionCell);


					FillDateHeader (HeadRow, DayToSearchFor, DayToDisplay);
					FillTimeHeadLine (HeadRow, Associated, ColumnPercentage);
					}
				TableRow UnitRow = new TableRow ();
				ParentTable.Rows.Add (UnitRow);
				UnitRow.CssClass = "CSS_TimeHeadRow";
				FillRessourceNameColumn (UnitRow, Ressource, RessourceIndex);
				int TimeColumnIndex = 1;
				foreach (DataRow FullBookableUnitsRow in Associated)
					{
					FillOccupationEntry (UnitRow, LocalFormatierDataSet.Tables ["Bookings"], FullBookableUnitsRow,
										 DayToSearchFor, RessourceIndex, TimeColumnIndex, ColumnPercentage);
					TimeColumnIndex++;
					}
				RessourceIndex++;
				}

			InsertDescriptiveText (DescriptionTable);
			return true;
			}
示例#17
0
		public WPMediaCentralServices ()
			{
			m_CVM = new CommonValues ();
			m_XAMLHandling = new XAMLHandling (m_CVM);
			}
示例#18
0
		private WPMediaStandbildPlayingData GetWPMediaStandbildPlayingDataFromAssembledFile (String FileName)
			{
			CVM.CommonValues Helper = new CommonValues();
			Helper.LoadAndProcessAutoFile (FileName);
			return (WPMediaStandbildPlayingData) Helper.DeSerializedDesriptionObject;
			}
示例#19
0
/*
	public void CreateGalleriePlayingData (String PictureElementsFileRootDirectory,
					String TableName, DataRow TableTableRow)
		{
		CVM.CommonValues m_CVM = new CVM.CommonValues ();
		XAMLHandling m_XAMLHandling = new XAMLHandling (m_CVM);
		LocalWPMediaRoot = CommonDataBase.DataBase.GetLocalWPMediaRoot ();
		String TableDirectory = Path.Combine (PictureElementsFileRootDirectory, TableName);
		List<FileInfo> ExistingFiles = WMB.Basics.GetFileInfoEntriesFromDirectory
			(TableDirectory, new string [] { ControlFileExtension }, 1);
		return;
		}		
*/		
		
	public void CreateStandbildPlayingData (String WPMediaServerRootDirectory, 
			String PackageFilesRootDirectory, String TableName, DataRow tableDefinitionRow)
		{
		if (WMB.Basics.IsTestRun)
			{
			int NumberOfFiles = WMB.Basics.GetFilesFromDirectory
				(Path.Combine(PackageFilesRootDirectory, TableName), new string[] { "*.pkg" }, 1).Count; 

			WMB.Basics.ReportInformationToEventViewer("WPMediaCentralServices.CreateStandbildPlayingData",
				"PackageFilesRootDirectory =\r\n\"" + PackageFilesRootDirectory + "\" Tabelle =\r\n\""
				+ TableName + "\" " + Convert.ToString(NumberOfFiles) + " Files");
			}
		DateTime DateTimeToHandle = DateTime.Now;
		CVM.CommonValues m_CVM = new CVM.CommonValues();
		XAMLHandling m_XAMLHandling = new XAMLHandling (m_CVM);
		LocalWPMediaRoot = CommonDataBase.DataBase.GetLocalWPMediaRoot ();
		String TableDirectory = Path.Combine (PackageFilesRootDirectory, TableName);
		List<FileInfo> ExistingFiles = WMB.Basics.GetFileInfoEntriesFromDirectory
			(TableDirectory, new string [] { ControlFileExtension }, 1);
		if (ExistingFiles == null)
			return;
		WPMediaStandbildPlayingData Description = new WPMediaStandbildPlayingData();

//ToDo	Checking for IsActive on this day - new Implementation	
		List<MMUnitUsageData> PossibleDataFromDataBase
			= Data.DbServer3.WPMediaAddOnData.GetWPMediaAddOnDataStandBildUsagePerTabelle
				(TableName, Data.DbServer3.WPMediaAddOnData.Timings
					.GetPossiblyInvolvedConnectedIds(DateTimeToHandle)[TableName]);


		Dictionary<DateTime, List<MMUnitUsageData>> AvtiveThisDayParameter 
				= new Dictionary<DateTime, List<MMUnitUsageData>>()
					{
						{ DateTimeToHandle,
						GetDayMMUnitUsageData
							(PossibleDataFromDataBase, DateTimeToHandle)
						}
					};

			//TODO
			//MMUnitUsageTreeEntry Root = MMUnitUsageTreeEntry.GetUsageTree (null, null, null, null);

			//int WeekDay = (int) DateTime.Now.DayOfWeek;
			//List<MMUnitUsageData> DownloadEntriesStandBildUsageData = Root.Childs[MMUnitUsageTreeEntry.ALL_ACTIVE_ENTRIES].ContentList;
			//	MMUnitUsageTreeEntry RootsChilds = Root.Childs [MMUnitUsageTreeEntry.ALL_ACTIVE_ENTRIES];
			//List<MMUnitUsageData> AllDayUsageData = RootsChilds.Childs[MMUnitUsageTreeEntry.ALL_DAY_ENTRIES].ContentList;
			//List<MMUnitUsageData> ThisWeekDayUsageData = RootsChilds.Childs[WMB.Basics.ShortWeekDayNames[WeekDay]].ContentList;

			//Description.NamesOfLocalToDownloadDescriptions = new List<string> ();
			//foreach (MMUnitUsageData UsageData in DownloadEntriesStandBildUsageData)
			//	{
			//	Description.NamesOfLocalToDownloadDescriptions.Add(UsageData.PackageFileNamePart);
			//	}
			//foreach (MMUnitUsageData UsageData in AllDayUsageData)
			//	{
			//	Description.NamesOfTodayActiveDescriptions.Add(UsageData.PackageFileNamePart);
			//	}
			//foreach (MMUnitUsageData UsageData in ThisWeekDayUsageData)
			//	{
			//	Description.NamesOfTodayActiveDescriptions.Add(UsageData.PackageFileNamePart);
			//	}

			Description.NamesOfTodayActiveDescriptions = new List<string>();
			foreach (MMUnitUsageData UsageData in AvtiveThisDayParameter[DateTimeToHandle])
				{
				Description.NamesOfTodayActiveDescriptions.Add(UsageData.PackageFileNamePart);
				}

			foreach (String PackageFileName in Description.NamesOfTodayActiveDescriptions)
			{
			bool Found = false;
			foreach (FileInfo FInfo in ExistingFiles)
				{
				if (FInfo.Name.ToLower () == Path.GetFileName (PackageFileName).ToLower ())
					Found = true;
				}
			if (!Found)
				{
				WMB.Basics.ReportErrorToEventViewer("WPMediaCentralService.CreateStandbildPlayingData",
					"Der PackageFile \"" + PackageFileName + "\" fehlt");
				}
			}
		int SkipLength = PackageFilesRootDirectory.Length + 1 - "Source\\".Length;

		if (WMB.Basics.IsTestRun)
			WMB.Basics.ReportInformationToEventViewer ("WPMediaCentralServices.CreateStandbildPlayingData",
			    "NamesOfLocalToDownloadDescriptions = " + Convert.ToString (Description.NamesOfLocalToDownloadDescriptions.Count)
			    + "\r\nNamesOfTodayActiveDescriptions = " + Convert.ToString (Description.NamesOfTodayActiveDescriptions.Count));
	
		String EntryTimingType = tableDefinitionRow[CVM.CommonValues.WPMEDIA_ENTRY_TIMING_TYPE].ToString();
		String PlayingOrder = tableDefinitionRow [CVM.CommonValues.WPMEDIA_ENTRY_PLAYING_ORDER].ToString ();
		double EntryDuration = 8;
		if (tableDefinitionRow [CVM.CommonValues.WPMEDIA_ENTRY_ENTRY_DURATION] != null)
			{
			if (!String.IsNullOrEmpty (tableDefinitionRow [CVM.CommonValues.WPMEDIA_ENTRY_ENTRY_DURATION].ToString ()))
				EntryDuration = Convert.ToDouble (tableDefinitionRow [CVM.CommonValues.WPMEDIA_ENTRY_ENTRY_DURATION]);
			}
		double OutsideSetDuration = -1;
		if (tableDefinitionRow [CVM.CommonValues.WPMEDIA_OUTSIDE_SET_DURATION] != null)
			{
			if (!String.IsNullOrEmpty (tableDefinitionRow [CVM.CommonValues.WPMEDIA_OUTSIDE_SET_DURATION].ToString ()))
				OutsideSetDuration = Convert.ToDouble (tableDefinitionRow [CVM.CommonValues.WPMEDIA_OUTSIDE_SET_DURATION]);
			}
		String MeaningOfOutsideSetDuration = tableDefinitionRow [CVM.CommonValues.WPMEDIA_MEANING_OF_OUTSIDE_SET_DURATION].ToString ();
		Description.TableName = TableName;
		Description.TableDefinitionTable = tableDefinitionRow.Table.Clone ();
		DataRow TableDefinitionRow = Description.TableDefinitionTable.NewRow ();
		TableDefinitionRow.ItemArray = tableDefinitionRow.ItemArray;
		Description.TableDefinitionTable.Rows.Add (TableDefinitionRow);
		Description.NameOfProcessingModule = tableDefinitionRow ["Type"].ToString ();

		Description.NamesOfActiveDescriptions = new List<string> ();
		Description.SortFields = new List<string> ();
		Description.LastWriteTimesOfNamesOfActiveDescriptions = new List<DateTime> ();
		Description.PlayLengthOfEachDescription = new List<TimeSpan> ();
		Description.NumberOfPagesOfEachDescription = new List<int> ();
		Description.NameOfPlayingDataDescription = TableName;
		Description.OverallPlayLength = 0;
		int OverallNumberOfPictures = 0;
		String TableType = tableDefinitionRow [CVM.CommonValues.WPMEDIA_ENTRY_TYPE_OF_TABLE].ToString ();
		ManagedTimingsControl TimingsCheckerClass = new ManagedTimingsControl ();
		CVM.ITimingsInterface TimingsCheckerInterface = TimingsCheckerClass as ITimingsInterface;
		TimingsCheckerInterface.m_TimingsTypenDataSet = m_DataBase.GetCommonDataSet ("Select * from TimingTypen");
		foreach (String PackageFileName in Description.NamesOfTodayActiveDescriptions)
			{
			FileInfo Entry = new FileInfo(Path.Combine(PackageFilesRootDirectory, PackageFileName));
			String ID = Path.GetFileNameWithoutExtension (Entry.FullName);
			DataTable UsedTimings;
			if (TimingsCheckerInterface.IsActive (ID, out UsedTimings) == false)
				continue;
			int NumberOfPages = 0;
			String SortField = PlayingOrder;
			TimeSpan PlayLengthForThisEntry = TimeSpan.Zero;
			List <double> PageDurations = new List<double> ();

			GraphicsHandling GraphicsHandler = new GraphicsHandling (LocalWPMediaRoot);
			if (GraphicsHandler.GetInstatiatedPackage (Entry.FullName) == null)
				{
				WMB.Basics.ReportErrorToEventViewer("WPMediaCentralServices.CreateStandbildPlayingData",
					"Der File\r\n\"" + Entry.FullName + "\"\r\nkonnte nicht als gültiges Package aufgelöst werden.\r\n"
					+ "In der Folge werden damit Fehler auftreten");
				continue;
				}
			List<TimeSpan> DurationForEachPage = new List<TimeSpan> ();
			foreach (double PageDuration in GraphicsHandler.PageDurations)
				{
				PlayLengthForThisEntry += TimeSpan.FromSeconds(PageDuration);
				DurationForEachPage.Add(TimeSpan.FromSeconds(PageDuration));
				}
			SortField = GraphicsHandler.GetFilledSortField (SortField);
			NumberOfPages = GraphicsHandler.PageDurations.Count;
			GraphicsHandler.Close ();
			Description.StandBildTVVersion = "PKG_Version";
			Description.DurationOfEachPageInEachDescription.Add (DurationForEachPage);
			Description.FillTimingsForEachDescription (ID, UsedTimings);

			if ((NumberOfPages == 0)
				|| (PlayLengthForThisEntry == TimeSpan.Zero))
				{
				WMB.Basics.ReportErrorToEventViewer ("WPMediaCentralServices.CreateStandbildPlayingData",
					Entry.FullName + " in der Table \"" + TableName + "\" hat eine PlayLength von 0");
				continue;
				}
			Description.NamesOfActiveDescriptions.Add (Entry.FullName.Substring (SkipLength));
			if (String.IsNullOrEmpty(Description.SubDirectoryWhereTheDescriptionsAreLocated))
				{
				Description.SubDirectoryWhereTheDescriptionsAreLocated = Path.GetDirectoryName
					(Entry.FullName.Substring (SkipLength));
				}
			
			Description.LastWriteTimesOfNamesOfActiveDescriptions.Add (Entry.LastWriteTime);
			Description.SortFields.Add (SortField);
			Description.NumberOfPagesOfEachDescription.Add (NumberOfPages);
			OverallNumberOfPictures += NumberOfPages;
			Description.OverallPlayLength += PlayLengthForThisEntry.TotalSeconds;
			Description.PlayLengthOfEachDescription.Add (PlayLengthForThisEntry);
			}
		if (OutsideSetDuration > 0)
			{
			if (MeaningOfOutsideSetDuration == CVM.CommonValues.WPMEDIA_MEANING_OF_OUTSIDE_SET_DURATION_MAX)
				if (OutsideSetDuration < Description.OverallPlayLength)
					Description.OverallPlayLength = OutsideSetDuration;
			if (MeaningOfOutsideSetDuration == CVM.CommonValues.WPMEDIA_MEANING_OF_OUTSIDE_SET_DURATION_FIX)
				Description.OverallPlayLength = OutsideSetDuration;
			}
		Description.OverallNumberOfPicturesToShow = OverallNumberOfPictures;
		String ControlFileName = Description.TableName;
		if (tableDefinitionRow ["DefinitionNameToCreate"] != Convert.DBNull)
			if (!String.IsNullOrEmpty (tableDefinitionRow ["DefinitionNameToCreate"].ToString ()))
				ControlFileName = tableDefinitionRow ["DefinitionNameToCreate"].ToString ();
//TODO	String PlayingDataDirectory = Path.Combine(LocalWPMediaRoot, XML_SENDER_AUTO_CONTROL_DIRECTORY);
		String PlayingDataDirectory = Path.Combine(WPMediaServerRootDirectory, XML_SENDER_AUTO_CONTROL_DIRECTORY);
		if (!Directory.Exists (PlayingDataDirectory))
			Directory.CreateDirectory (PlayingDataDirectory);
		String FileName = Path.Combine (PlayingDataDirectory, ControlFileName + AUTO_CONTROL_FILE_EXT_EXTENSION_SHORT);
		Description.FillIndexIndizess ();
		WPMediaStandbildPlayingData EarlierDescription
			= GetWPMediaStandbildPlayingDataFromAssembledFile (FileName);
//		EarlierDescription.ClearAllRandomElements();
		if (PlayingDataObjectsAreEqual(EarlierDescription, Description))
			return;

		MemoryStream ContentOfPlayingData = AssembleContentOfPlayingData(Description,
			Convert.ToString(Description.OverallPlayLength), Description.TableName, "StandbildTV");
		bool CorrectDeleted = true;
		if (File.Exists (FileName))
			{
			CorrectDeleted = CommonDataBase.CommonBasics.SecureFileDelete (FileName, null);
			}
		if (CorrectDeleted)
			{
			FileStream TargetFile = File.Open (FileName, FileMode.Create, FileAccess.Write);
			ContentOfPlayingData.WriteTo(TargetFile);
			TargetFile.Close ();
			}
		ContentOfPlayingData.Close ();
		}
		private void Application_Startup (object sender, StartupEventArgs e)
			{
			if (WMB.Basics.IsTestRun)
				{
				WMB.Basics.ReportInformationToEventViewer("PlayingDataProcessApplication.Application_Startup",
					"\"PlayingDataProcessApplication\" ist als Process aktiv\r\n"
					+ "mit folgenden anderen Proccess ID's\r\n"
					+ String.Join("\r\n", CVM.CommonValues.GetMyAndTheOtherProcessIDs()));
				}
			if (e.Args.Length > 0)
				{
				String [] Elements = (e.Args [0]).Split (';');

				if (Elements.Length > 1)
					IsMultiTableRun = true;
				else
					IsMultiTableRun = false;
				//    {
				//    WMB.Basics.ReportInformationToEventViewer ("PlayingDataProcessApplication.Application_Startup",
				//        "Mehr Control File Aufrufe sind nicht implementiert:\r\n" + e.Args [0]);
				//    throw new NotImplementedException ("Mehr Control File Aufrufe sind nicht implementiert");
				//    }
				}

			DateTime FirstStartTime = DateTime.Now;

			DispatcherTimer DoubleRunCheckTimer = new DispatcherTimer();
			DoubleRunCheckTimer.Interval = TimeSpan.FromMilliseconds (2000);
			DoubleRunCheckTimer.Tick += DoubleRunCheckTimer_Tick;
			DoubleRunCheckTimer.Tag = FirstStartTime;
			DoubleRunCheckTimer.Start ();


			if ((DateTime.Now - FirstStartTime).TotalSeconds > 5)
				WMB.Basics.ReportErrorToEventViewer ("Delayed_____Start.PlayingDataProcessApplication.Application_Startup",
											  "Diese Instanz von \"PlayingDataProcessApplication\" wurde "
											+ "mit einer Verzögerung von  "
											+ Convert.ToString ((DateTime.Now - FirstStartTime).TotalSeconds)
											+ " gestarted.\r\n");

			String StopTimeString = String.Empty;
			if ((e.Args.Length == 1)
				&& (File.Exists (e.Args [0])
				&& ((String.Compare( Path.GetExtension (e.Args [0]), ".stb", true) == 0)
					|| (String.Compare (Path.GetExtension (e.Args [0]), ".ser", true) == 0)
					|| (String.Compare (Path.GetExtension (e.Args [0]), ".ext", true) == 0)
					|| (String.Compare (Path.GetExtension (e.Args [0]), ".pkg", true) == 0))))
				{
				m_Arguments = new String [e.Args.Length + 5];
				m_Arguments [0] = CVM.CommonValues.GetControlFileNameFromUnitName (e.Args [0]);
				m_Arguments [1] = CVM.CommonValues.WPMEDIA_SHOW_ONLY_THIS_FILE_PARAMETER + "\"" + e.Args [0] + "\"";
// sac
				StopTimeString = DateTime.Now.AddSeconds (15).ToString( );
				if (String.Compare (Path.GetExtension (e.Args [0]), ".ext", true) == 0)
					{
					StopTimeString = String.Empty;
					}
				if (String.Compare (Path.GetExtension (e.Args [0]), ".ser", true) == 0)
					{
					StopTimeString = DateTime.Now.AddHours (12).ToString ();
					}
				if (String.Compare (Path.GetExtension (e.Args [0]), ".pkg", true) == 0)
					{
					StopTimeString = String.Empty;
					}
				m_Arguments [2] = CVM.CommonValues.WPMEDIA_STOP_TIME_PARAMETER + StopTimeString;
				Rectangle [] SimulatedVideoRectangle = CVM.CommonValues.ConvertPhysicalScreenBounds (CVM.CommonValues.GetPhysicalScreenBounds ());
				m_Arguments [3] = CVM.CommonValues.WPMEDIA_VIDEO_WIDTH_PARAMETER + Convert.ToString (SimulatedVideoRectangle [0].Width / 2);
				m_Arguments [4] = CVM.CommonValues.WPMEDIA_VIDEO_HEIGHT_PARAMETER + Convert.ToString (SimulatedVideoRectangle [0].Height / 2);
				m_Arguments [5] = CVM.CommonValues.WPMEDIA_TYPE_OF_BEITRAG + WPMediaManagement.ManagedProgrammData.Type_UtilityDisplay;
				//WMB.Basics.ReportErrorToEventViewer ("PlayingDataProcessApplication.Application_Startup",
				//    "ProgrammDirectory = \"" + CVM.CommonValues.sGetProgrammDirectory () + "\"");

				}
			else
				{
				m_Arguments = new String [e.Args.Length];
				for (int i = 0; i != e.Args.Length; ++i)
					{
					m_Arguments [i] = e.Args [i];
					if (m_Arguments [i].IndexOf (CVM.CommonValues.WPMEDIA_STOP_TIME_PARAMETER) != -1)
						{
						StopTimeString = m_Arguments [i].Substring
							(CVM.CommonValues.WPMEDIA_STOP_TIME_PARAMETER.Length).Replace ("\"", "");
						}
					}
				
				}
			CVM.CommonValues m_CVM = new CVM.CommonValues ();
			m_CVM.CreateMultiTableEnvironmentCall += new WMB.CreateMultiTableEnvironmentEvent (CreateMultiTableEnvironmentCall);
			try
				{

				DataRow SenderRow = WPMediaManagement.SingletonManagedProgrammManagement.Instance
					.ActuallManagedProgrammManagement.ActuallProgrammData.GetSenderRow ();
				DataRow PlayerRow = WPMediaManagement.SingletonManagedProgrammManagement.Instance
					.ActuallManagedProgrammManagement.ActuallProgrammData.GetMaschinenRow ();
				m_CVM.m_Arguments = WMB.Basics.ConvertCommandlineToNameCollection(m_Arguments); 

				m_CVM.SetVideoSize (m_Arguments, IsMultiTableRun);
				}
			catch (Exception Excp)
				{
				WMB.Basics.ReportErrorToEventViewer ("PlayingDataProcessApplication.Application_Startup",
					"Folgender Fehler trat auf:\r\n" + Excp.ToString());
				WMB.Basics.ReportErrorToEventViewer ("PlayingDataProcessApplication.Application_Startup",
							 "Bei folgenden Parameter Settings \"" + String.Join (";\r\n", m_Arguments) + "\"");
				Shutdown (-1);
				}

			this.MainWindow = new WPMediaPlayingDataProcess.PlayingDataProcessMainWindow ();
			if (!String.IsNullOrEmpty (StopTimeString))
				{
				DateTime EmergencyStopTime = m_CVM.GetDateTimeNowReal (DateTime.Parse (StopTimeString));
				m_EmergencyStopTimer = new DispatcherTimer ();
				m_EmergencyStopTimer.Tag = MainWindow;
				if ((EmergencyStopTime - DateTime.Now).TotalSeconds < 86500)
					{
					TimeSpan StopInterval = EmergencyStopTime - DateTime.Now;
					if (StopInterval > TimeSpan.FromTicks (1))
						m_EmergencyStopTimer.Interval = StopInterval;
					else
						m_EmergencyStopTimer.Interval = TimeSpan.FromTicks (1);
					
					}
				else
					m_EmergencyStopTimer.Interval = TimeSpan.FromDays (1);
				m_EmergencyStopTimer.Tick += new EventHandler (EmergencyStopTimer_Tick);
				m_EmergencyStopTimer.Start ();

				if (WMB.Basics.IsTestRun)
					WMB.Basics.ReportInformationToEventViewer ("PlayingDataProcessApplication.Application_Startup",
					           "\"PlayingDataProcessApplication\" ist aktiviert");

				}


			((PlayingDataProcessMainWindow) this.MainWindow).SetParameter (m_CVM, m_Arguments, m_CVM.VideoWidth, m_CVM.VideoHeight, m_CVM.TargetAspectRatio);
			((PlayingDataProcessMainWindow) this.MainWindow).CloseRequestedCall += new CloseRequested (App_CloseRequestedCall);
			this.MainWindow.Left = m_CVM.XPosition;
			this.MainWindow.Top = m_CVM.YPosition;
			this.MainWindow.Width = 1;
			this.MainWindow.Height = 1;
			this.MainWindow.Background = System.Windows.Media.Brushes.Black;
			this.MainWindow.Show();
			//this.MainWindow.Left = m_CVM.XPosition;
			//this.MainWindow.Top = m_CVM.YPosition;
			this.MainWindow.Width = m_CVM.VideoWidth;
			this.MainWindow.Height = m_CVM.VideoHeight;
			}
示例#21
0
		public List<String> GetMaterialFileNamesFromControlFile (String LocalWPMediaRoot, String VideoControlFileName)
			{
			CVM.CommonValues CVMHelper = new CommonValues ();
			CVMHelper.LoadAndProcessAutoFile (VideoControlFileName);
			CVM.WPMediaVideoPlayingData VideoPlayingData = CVMHelper.DeSerializedDesriptionObject as CVM.WPMediaVideoPlayingData;
			if (VideoPlayingData == null)
				{
				WMB.Basics.ReportErrorToEventViewer ("ManagedProgrammManagement.GetMaterialFileNamesFromControlFile",
					"Der VideoControlFile \"" + VideoControlFileName + "\" ist nicht vorhanden");
				return new List<String> () {""};
				}
			VideoPlayingData.SetData ();
			return VideoPlayingData.GetListOfPlayableMaterials ();
			}
示例#22
0
		public ManagedProgrammManagement ()
			{
			m_CVM = new CommonValues ();
			ProgrammDefinitionFileName = GetProgrammDefinitionName ();
			RobocopyAvtivitiesShouldBeSerialized = true;
			}
		private void UserControl_Loaded (object sender, RoutedEventArgs e)
			{
			if (DesignerProperties.GetIsInDesignMode (this))
				return;
			m_AutomaticDataCollection = new DispatcherTimer();
			m_AutomaticDataGeneration = new DispatcherTimer();
			m_CVM = new CommonValues ();
			m_XAML = new XAMLHandling (m_CVM);
			Grid BasicGrid = m_XAML.CreateGrid (new int [] { 1, 1, 1, 1, 1, 1 }, new int [] { 1, 5000, 1 });
			BasicGrid.RowDefinitions [0].MinHeight = 30;
			BasicGrid.RowDefinitions [0].MaxHeight = 40;
			BasicGrid.RowDefinitions [1].MinHeight = 60;
			BasicGrid.RowDefinitions [2].MinHeight = 30;
			BasicGrid.RowDefinitions [2].MaxHeight = 40;
			TextBox HeadLine = new TextBox ();
			BasicGrid.Children.Add (HeadLine);
			Grid.SetColumn (HeadLine, 0);
			Grid.SetRow (HeadLine, 0);
			Grid.SetColumnSpan (HeadLine, 6);
			
			m_WorkingAreaGrid.ShowGridLines = true;
			Grid.SetColumn (m_WorkingAreaGrid, 0);
			Grid.SetRow (m_WorkingAreaGrid, 1);
			Grid.SetColumnSpan (m_WorkingAreaGrid, 6);
			BasicGrid.Children.Add (m_WorkingAreaGrid);
			m_LeisureBookingControl.DataAccess = m_DataBase;
			m_LeisureBookingControl.CloseRequestedCall += new CloseRequested (m_LeisureBookingControl_CloseRequestedCall);
			if (IsAutoRun)
				{
				Grid.SetColumn (m_LeisureBookingControl, 0);
				Grid.SetRow (m_LeisureBookingControl, 0);
				m_WorkingAreaGrid.Children.Add (m_LeisureBookingControl);
				HeadLine.Text = "Datenübernahme zur Mieterinformation";

				m_AutomaticDataCollection.Tick += new EventHandler (AutomaticDataCollection_Tick);
				m_AutomaticDataCollection.Interval = TimeSpan.FromSeconds (20);
				m_AutomaticDataCollection.Start ();

				m_AutomaticDataGeneration.Tick += new EventHandler (m_AutomaticDataGeneration_Tick);
				m_AutomaticDataGeneration.Interval = TimeSpan.FromSeconds (1);
				m_AutomaticDataGeneration.Start ();
				}
			else
			if (InAdministratorMode)
				{
				Button LeisureBookingButton = new Button ();
				LeisureBookingButton.Content = "Buchung";
				BasicGrid.Children.Add (LeisureBookingButton);
				Grid.SetColumn (LeisureBookingButton, 0);
				Grid.SetRow (LeisureBookingButton, 2);
				LeisureBookingButton.Click += new RoutedEventHandler (LeisureBookingButton_Click);

				Button AutomaticLeisureBookingButton = new Button ();
				AutomaticLeisureBookingButton.Content = "Start Automat";
				BasicGrid.Children.Add (AutomaticLeisureBookingButton);
				Grid.SetColumn (AutomaticLeisureBookingButton, 1);
				Grid.SetRow (AutomaticLeisureBookingButton, 2);
				AutomaticLeisureBookingButton.Click += new RoutedEventHandler (AutomaticLeisureBookingButton_Click);

				Button RessourcesManagementButton = new Button ();
				RessourcesManagementButton.Content = "Ressourcen";
				BasicGrid.Children.Add (RessourcesManagementButton);
				Grid.SetColumn (RessourcesManagementButton, 2);
				Grid.SetRow (RessourcesManagementButton, 2);
				RessourcesManagementButton.Click += new RoutedEventHandler (RessourcesManagementButton_Click);
	
				Button CreationRulesButton = new Button ();
				CreationRulesButton.Content = "CreationRules";
				BasicGrid.Children.Add (CreationRulesButton);
				Grid.SetColumn (CreationRulesButton, 3);
				Grid.SetRow (CreationRulesButton, 2);
				CreationRulesButton.Click += new RoutedEventHandler (CreationRulesButton_Click);

				Button HandlingRulesButton = new Button ();
				HandlingRulesButton.Content = "HandlingRules";
				BasicGrid.Children.Add (HandlingRulesButton);
				Grid.SetColumn (HandlingRulesButton, 4);
				Grid.SetRow (HandlingRulesButton, 2);
				HandlingRulesButton.Click += new RoutedEventHandler (HandlingRulesButton_Click);

				HeadLine.Text = "Bitte wählen Sie aus";
				}
			Button FertigButton = new Button ();
			FertigButton.Content = "Fertig";
			BasicGrid.Children.Add (FertigButton);
			Grid.SetColumn (FertigButton, 5);
			Grid.SetRow (FertigButton, 2);
			FertigButton.Click += new RoutedEventHandler (FertigButton_Click);
			RootGrid.Children.Add (BasicGrid);
			}
示例#24
0
public bool SetData (String ManagedProgrammDataFileName)
	{
	m_CVM = new CommonValues();
	m_ManagedProgrammDataFileName = ManagedProgrammDataFileName;
	m_ManagedProgrammData = WMB.Basics.DeSerializeObjectFromFile
				(m_ManagedProgrammDataFileName) as ManagedProgrammData;
	if (m_ManagedProgrammData == null)
		{
		WMB.Basics.ReportErrorToEventViewer ("HTMLCreator.SetData",
			"Aus dem File \"" + m_ManagedProgrammDataFileName
			+ "\" konnte kein \"ManagedProgrammManagement\" Element erzeugt werden");
		return false;
		}
	m_HTMLDirectory = Path.Combine(System.IO.Path.GetDirectoryName (System.IO.Path.GetDirectoryName (ManagedProgrammDataFileName)),
		CVM.CommonValues.SENDER_SUB_PATH_HTML_PROGRAMM);
	//m_HTMLDirectory = Path.Combine (m_HTMLDirectory, "NewVersion");
	if (!Directory.Exists (m_HTMLDirectory))
		Directory.CreateDirectory (m_HTMLDirectory);
	m_HTMLFileNameToCreate = Path.Combine (m_HTMLDirectory, HTML_PROGRAMM_SCHEMA_NAME);
	m_DataHandling = new DataHandling ();
	return true;

	}
示例#25
0
		private void Page_Loaded (object sender, RoutedEventArgs e)
			{
			if (DesignerProperties.GetIsInDesignMode (this))
				return;
			if (String.IsNullOrEmpty (TableToProcess))
				{
				LastSelectedTableRows = null;
				CloseRequestedCall (this, "");
				return;
				}
			DrawingWidth = 600;
			m_CVM = new CommonValues ();
			m_XAML = new XAMLHandling (m_CVM);
			m_XAML.WebPageIsRequestedCall += new XAMLHandling.WebPageIsRequestedEvent (m_XAML_WebPageIsRequestedCall);
			m_XAML.ShowTextFrames = true;
			m_XAML.ShowGridLines = true;
			HeadLine.Content = "Es wird die Tabelle \"" + TableToProcess + "\" bearbeitet";
			RootGrid.DataContext = this;
			//CreateAdaptedSelectionDefinitions (SchemaDataSet);
			if (IsTreeViewStructuredTable ())
				{
				AvailableEntriesListBox.Visibility = Visibility.Collapsed;
				AvailableEntriesTreeView.Visibility = Visibility.Visible;
				LoadAndFillTableEntriesIntoTreeView ();
				}
			else
				{
				AvailableEntriesListBox.Visibility = Visibility.Visible;
				AvailableEntriesTreeView.Visibility = Visibility.Collapsed;
				LoadAndFillTableEntriesIntoListView ();
				}
			m_ManagedTimingsControl = new ManagedTimingsControl ();
			m_ManagedTimingsControl.ConnectedType = TableToProcess;
			m_ManagedTimingsControl.DataAccess = m_DataBase;
			TimingsGrid.Children.Add (m_ManagedTimingsControl);
			m_ManagedTimingsControl.ConnectedID = String.Empty;
			
			if (InAdministratorMode)
				Administrator_Button.IsEnabled = true;
			UpdateLayout ();
			//WindowWidth = ActualWidth;
			//WindowHeight = ActualHeight + ((Window) Parent).
			if (ExternalControlServer.ActuallCommands.ContainsKey ("StartEntry"))
				{
				String IDToSelect = ExternalControlServer.ActuallCommands ["StartEntry"];
				ListBoxItem FoundItem = null;
				foreach (ListBoxItem Entry in AvailableEntriesListBox.Items)
					{
					if (String.Compare ((Entry.Tag as String), IDToSelect, StringComparison.OrdinalIgnoreCase) == 0)
						{
						FoundItem = Entry;
						break;
						}
					}
				if (FoundItem != null)
					{
					AvailableEntriesListBox.SelectedItem = FoundItem;
					SelectButton_Click (null, null);
					if ((ExternalControlServer.ActuallCommands.ContainsKey ("ProcessingType"))
						&& (ExternalControlServer.ActuallCommands ["ProcessingType"] == "Delete"))
						{
						DeleteButton_Click (null, null);
						ExternalControlServer.ClearCommands (null);
						}
					}
				ExternalControlServer.ClearCommands (new String [] {"StartTable", "StartEntry", "ProcessingType"});
//				ExternalControlServer.ReportProcessingEndedBack ();
				}
			}
示例#26
0
		public CreateStandbildTVUnits ()
			{
			m_CVM = new CommonValues ();
			m_XAMLHandling = new XAMLHandling (m_CVM);
			DateTimeToCheck = DateTime.Now;
			}