Beispiel #1
0
		private void Window_Loaded (object sender, RoutedEventArgs e)
			{


			m_CVM = new CommonValues ();
			m_XAMLHandling = new XAMLHandling (m_CVM);
			m_WebService = new WPMediaNetworkAccess.WPMediaDataBase ();
			m_WebService.ConnectionStringName = "WPMediaAddOnDataConnectionString";
			WMB.WPMediaApplicationState.Instance.Properties ["DataBase"] = m_WebService;

			DataSet AvailableTablesDataSet = m_WebService.GetCommonDataSet ("Select TableName from TableDefinitions");
			List<String> AvailableTables = new List<string> ();
			ListBox ProtokollBox = new ListBox ();
			RootGrid.Children.Add( ProtokollBox);
			this.Title = "Die folgenden Tabellen werden mit Verwaltungsdaten abgeglichen";
			foreach (DataRow Row in AvailableTablesDataSet.Tables [0].Rows)
				{
				String AvailableTableName = Row ["TableName"].ToString ();
				if ((m_Arguments == null)
					|| (m_Arguments.Length < 1))
					{
					AvailableTables.Add (AvailableTableName);
					ProtokollBox.Items.Add (AvailableTableName);
					}
				else
					{
					if (String.Compare( m_Arguments [0], "All", true) == 0)
						{
						AvailableTables.Add (AvailableTableName);
						ProtokollBox.Items.Add (AvailableTableName);
						}
					else
						{
						int Index = 0;
						while (Index < m_Arguments.Length)
							{
							if (String.Compare (AvailableTableName, m_Arguments [Index], true) == 0)
								{
								AvailableTables.Add (AvailableTableName);
								ProtokollBox.Items.Add (AvailableTableName);
								break;
								}
							Index++;
							}
						}
					}
				}
			m_StartTimer = new DispatcherTimer();
			m_StartTimer.Interval = TimeSpan.FromMilliseconds (1);
			m_StartTimer.Tick += new EventHandler (m_StartTimer_Tick);
			m_StartTimer.Tag = AvailableTables;
			m_StartTimer.Start ();
			}
		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;
				}
			}
		private void UserControl_Loaded (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_ProgrammDataElemente = new TreeView ();
			m_ProgrammDataElemente.Margin = (Thickness)m_TConverter.ConvertFromString("0, 0, 5, 0");
			FillProgrammManagementElements(m_ProgrammDataElemente);
			m_RootGrid.Children.Add(m_ProgrammDataElemente);
			Grid.SetColumn(m_ProgrammDataElemente, 0);
			Grid.SetRow (m_ProgrammDataElemente, 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);
			m_XAMLHandler.SetColumnAsPositionMover(m_RootGrid, 0);
			}
		public ManagedMaterialControl ()
			{
			InitializeComponent ();
			m_CVM = new CVM.CommonValues ();
			m_XAMLHandling = new CVM.XAMLHandling (m_CVM);
			//m_XAMLHandling.ShowGridLines = true;
			}
Beispiel #5
0
		private bool RunLocalStartup ()
			{
			String ErrorPlace = String.Empty;
			try
				{
				m_CVM = new CVM.CommonValues ();
				m_XAMLHandling = new CVM.XAMLHandling (m_CVM);
				m_CommonBasics = new CommonBasics ();
				//String MainModuleName = Process.GetCurrentProcess ().MainModule.FileName;
				//String ProgrammRoot= System.IO.Path.GetDirectoryName (System.IO.Path.GetDirectoryName
				//	(MainModuleName));
				String ProgrammDirectory = WMB.Basics.GetProgrammDirectory ();

				try
					{
					if (String.Compare(System.IO.Path.GetFileName(ProgrammDirectory), "InstallSystem") == 0)
						WMB.Basics.RegisterAllExeNamesForEventLogWriting(Path.Combine(System.IO.Path.GetFileName(ProgrammDirectory), "WPTV"));
					else
						WMB.Basics.RegisterAllExeNamesForEventLogWriting();

					}
				catch (Exception Excp)
					{
					WMB.Basics.ReportErrorToEventViewer ("Fehler bei RegisterAllExeNamesForEventLogWriting\r\n"
									+ " mit dem ProgrammDirectory: \"" + ProgrammDirectory + "\"\r\n" + Excp.ToString ());
					}
				ErrorPlace = "After RegisterAllExeNamesForEventLogWriting";
				m_ComputerName = WMB.Basics.GetComputerName();
				String CentralServerName = WMB.Basics.GetConfigValue (CVM.CommonValues.CONFIG_COMMON_CONTROL_SERVER);
				String LocalCheckTimeSpanName = WMB.Basics.GetConfigValue 
										(CVM.CommonValues.CONFIG_MANAGER_LOCAL_CHECK_TIMESPAN);
				if (!String.IsNullOrEmpty (LocalCheckTimeSpanName))
					{
					this.START_LOCAL_FOLLOW_UP_ACTIVITY = Convert.ToDouble (LocalCheckTimeSpanName);
					this.START_LOCAL_ROOT_ACTIVITY = START_LOCAL_FOLLOW_UP_ACTIVITY / 10;
					}
				String RemoteCheckTimeSpanName = WMB.Basics.GetConfigValue
										(CVM.CommonValues.CONFIG_MANAGER_REMOTE_CHECK_TIMESPAN);
				if (!String.IsNullOrEmpty (LocalCheckTimeSpanName))
					{
					this.START_NETWORK_FOLLOW_UP_ACTIVITY = Convert.ToDouble (LocalCheckTimeSpanName);
					this.START_NETWORK_ROOT_ACTIVITY = START_NETWORK_FOLLOW_UP_ACTIVITY / 10;
					}
				if (String.IsNullOrEmpty (CentralServerName))
					{
					WMB.Basics.ReportErrorToEventViewer ("WPMediaSystemManager.RunLocalStartup",
							"Entweder kein Config File vorhanden oder kein Eintrag für \""
							+ CVM.CommonValues.CONFIG_COMMON_CONTROL_SERVER + "\" vorhanden");
					return false;
					}
				ErrorPlace = "After CentralServerName";
				String ComputerName = WMB.Basics.GetComputerName();
				String LocalWPMediaDirectory = CommonDataBase.DataBase.GetLocalWPMediaRoot ();
				if (!Directory.Exists (LocalWPMediaDirectory))
					{
					WMB.Basics.ReportErrorToEventViewer ("WPMediaSystemManager.RunLocalStartup",
							"WPMedia Root Directory nicht angelegt (\"" + LocalWPMediaDirectory + "\")");
					return false;
					}
				String SystemManagementDirectory = Path.Combine (LocalWPMediaDirectory, CVM.CommonValues.CONFIG_COMMON_SYSTEM_MANAGER_DIRECTORY);
				if (!Directory.Exists (SystemManagementDirectory))
					{
					try
						{
						Directory.CreateDirectory (SystemManagementDirectory);
						}
					catch (Exception SMExcp)
						{
						WMB.Basics.ReportErrorToEventViewer ("WPMediaSystemManager.RunLocalStartup",
								"SystemManagementDirectory Root Directory konnte nicht angelegt werden (\""
								+ SystemManagementDirectory + "\"):\r\n" + SMExcp.ToString());
						return false;
						}
					}
				ErrorPlace = "After SystemManagementDirectory";
				m_LocalCommandSourcePath = Path.Combine(SystemManagementDirectory, CVM.CommonValues.CONFIG_COMMON_SYSTEM_MANAGER_COMMAND_ROOT);
				if (!Directory.Exists (m_LocalCommandSourcePath))
					{
					try
						{
						Directory.CreateDirectory (m_LocalCommandSourcePath);
						}
					catch (Exception LCExcp)
						{
						WMB.Basics.ReportErrorToEventViewer ("WPMediaSystemManager.RunLocalStartup",
								"LocalCommandSourcePath Root Directory konnte nicht angelegt werden (\""
								+ m_LocalCommandSourcePath + "\"):\r\n" + LCExcp.ToString());
						return false;
						}
					}
				m_LocalProcessedCommandSourcePath = Path.Combine (SystemManagementDirectory, CVM.CommonValues.CONFIG_COMMON_SYSTEM_MANAGER_PROCESSED_COMMAND_ROOT);
				if (!Directory.Exists (m_LocalProcessedCommandSourcePath))
					{
					try
						{
						Directory.CreateDirectory (m_LocalProcessedCommandSourcePath);
						}
					catch (Exception LCExcp)
						{
						WMB.Basics.ReportErrorToEventViewer ("WPMediaSystemManager.RunLocalStartup",
								"m_LocalProcessedCommandSourcePath Root Directory konnte nicht angelegt werden (\""
								+ m_LocalProcessedCommandSourcePath + "\"):\r\n" + LCExcp.ToString());
						return false;
						}
					}
				ErrorPlace = "After m_LocalProcessedCommandSourcePath";
					
				m_LocalProtokollSourcePath = Path.Combine (SystemManagementDirectory, CVM.CommonValues.CONFIG_COMMON_SYSTEM_MANAGER_LOGGING_DIRECTORY);
				if (!Directory.Exists (m_LocalProtokollSourcePath))
					{
					try
						{
						Directory.CreateDirectory (m_LocalProtokollSourcePath);
						}
					catch (Exception LPExcp)
						{
						WMB.Basics.ReportErrorToEventViewer ("WPMediaSystemManager.RunLocalStartup",
								"LocalCommandSourcePath Root Directory konnte nicht angelegt werden (\""
								+ m_LocalProtokollSourcePath + "\"):\r\n" + LPExcp.ToString());
						return false;
						}
					}
				ErrorPlace = "After m_LocalProtokollSourcePath";
				String RemoteCommands = Path.Combine(Path.Combine("\\\\" + CentralServerName,
									CVM.CommonValues.XML_SENDER_ROOT_DIRECTORY),
									CVM.CommonValues.CONFIG_COMMON_SYSTEM_MANAGER_DIRECTORY);
				m_RemoteCommandSourcePath = Path.Combine (RemoteCommands, CVM.CommonValues.CONFIG_COMMON_SYSTEM_MANAGER_COMMAND_ROOT);
				m_RemoteProtokollSourcePath = Path.Combine (RemoteCommands, CVM.CommonValues.CONFIG_COMMON_SYSTEM_MANAGER_LOGGING_DIRECTORY);
				return true;
				}
			catch (Exception Excp)
				{
				WMB.Basics.ReportErrorToEventViewer ("WPMediaSystemManager.RunLocalStartup",
							"Fehler bei Error Place " + ErrorPlace + ":\r\n" + Excp.ToString());

				return false;
				}
			}
		public ManagedPicturesControl ()
			{
			InitializeComponent ();
			m_CVM = new CVM.CommonValues ();
			m_XAMLHandling = new CVM.XAMLHandling (m_CVM);
			}
		public void SetParameter (CVM.CommonValues CVM, String [] Arguments,
						NavigationWindowType NavigationType, String LinkData,
						double SecondsToBeAlive, String PrintQueueName)
			{
			m_CVM = CVM;
			m_XAMLHandling = new CVM.XAMLHandling (m_CVM);
			m_Arguments = Arguments;
			m_NavigationType = NavigationType;
			StartupHTMLString = LinkData;
			m_SecondsToBeAlive = SecondsToBeAlive;
			m_PrintQueueName = PrintQueueName;
			}
		public ManagedSelectedMaterialControl ()
			{
			InitializeComponent ();
			m_CVM = new CVM.CommonValues ();
			m_XAMLHandling = new CVM.XAMLHandling (m_CVM);
			}