public bool SetParameter (CVM.CommonValues cvm, String [] Arguments, int VideoWidth, int VideoHeight, double TargetAspectRatio, String PrintQueueName) { m_CVM = cvm; m_Arguments = Arguments; m_PrintQueueName = PrintQueueName; System.Drawing.Rectangle VideoRectangle = m_CVM.VideoRectangle; this.WindowStartupLocation = WindowStartupLocation.Manual; m_RootButtonFileName = m_CVM.GetButtonFileName (CVM.CommonValues.BUTTON_ROOT_FILE_NAME); if (!File.Exists (m_RootButtonFileName)) { WMB.Basics.ReportErrorToEventViewer ("WPMediaNavigation.SetParameter", "Der Root Button File \"" + m_RootButtonFileName + "\" konnte nicht gefunden werden"); return false; } FileInfo FileAttributes = new FileInfo (m_RootButtonFileName); m_LastWriteTimeForRootButtonPage = FileAttributes.LastWriteTime; m_ButtonPageStack = new List<ButtonPageData> (); AddNewButtonPage (m_RootButtonFileName, false); m_CheckForChangedRootPageTimer = new DispatcherTimer(); m_CheckForChangedRootPageTimer.Interval = TimeSpan.FromSeconds(300); #if DEBUG m_CheckForChangedRootPageTimer.Interval = TimeSpan.FromSeconds(30); #endif m_CheckForChangedRootPageTimer.Tick += new EventHandler(m_CheckForChangedRootPageTimer_Tick); m_CheckForChangedRootPageTimer.Start (); return true; }
public void SetParameter (CVM.CommonValues Cvm, String [] Arguments, int VideoWidth, int VideoHeight) { m_CVM = Cvm; m_Arguments = Arguments; if (m_Arguments.Length > 1) { foreach (String ArgumentContent in m_Arguments) { if (ArgumentContent.IndexOf (CVM.CommonValues.WPMEDIA_DURATION_PARAMETER) == 0) { m_SecondsToStop = Convert.ToDouble (ArgumentContent.Substring (CVM.CommonValues.WPMEDIA_DURATION_PARAMETER.Length)); } if (ArgumentContent.IndexOf (CVM.CommonValues.WPMEDIA_STOP_TIME_PARAMETER) == 0) { m_StopTime = DateTime.Parse (ArgumentContent.Substring (CVM.CommonValues.WPMEDIA_STOP_TIME_PARAMETER.Length)); } } } this.WindowStartupLocation = WindowStartupLocation.Manual; m_StarterPage = new RTFPage (); m_StarterPage.SetParameter (m_CVM, m_Arguments, VideoWidth, VideoHeight, m_SecondsToStop); m_StarterPage.CloseRequestedCall += new CVM.CloseRequested (m_StarterPage_CloseRequestedCall); }
private void Application_Startup(object sender, StartupEventArgs e) { m_Arguments = new String [e.Args.Length]; for (int i = 0; i != e.Args.Length; ++i) { m_Arguments [i] = e.Args [i]; } m_CVM = new CVM.CommonValues (); m_CVM.SetVideoSize (m_Arguments); this.MainWindow = new TaskBarHiding (); this.MainWindow.Width = CVM.CommonValues.NavigationWindowGeometry.Width; this.MainWindow.MinWidth = CVM.CommonValues.NavigationWindowGeometry.Width; this.MainWindow.MaxWidth = CVM.CommonValues.NavigationWindowGeometry.Width; this.MainWindow.Left = CVM.CommonValues.NavigationWindowGeometry.X; this.MainWindow.Height = (int) CVM.CommonValues.TaskBarHeight; this.MainWindow.MinHeight = (int) CVM.CommonValues.TaskBarHeight; this.MainWindow.MaxHeight = (int) CVM.CommonValues.TaskBarHeight; this.MainWindow.Top = CVM.CommonValues.NavigationWindowGeometry.Height; this.MainWindow.LocationChanged += new EventHandler (MainWindow_LocationChanged); this.MainWindow.Topmost = true; ((TaskBarHiding)this.MainWindow).SetParameter (m_CVM, m_Arguments); this.MainWindow.Show (); }
private void Application_Startup (object sender, StartupEventArgs e) { m_CVM = new CVM.CommonValues (); m_Arguments = new String [e.Args.Length]; for (int i = 0; i != e.Args.Length; ++i) { m_Arguments [i] = e.Args [i]; } m_CVM.SetVideoSize (m_Arguments); Rectangle [] PhysicalDimensions = CVM.CommonValues.GetPhysicalScreenBounds (); Rectangle [] LogicalDimensions = CVM.CommonValues.ConvertPhysicalScreenBounds (PhysicalDimensions); System.Drawing.Rectangle VideoRect = m_CVM.GetVideoWindowGeometry (); int VideoWidth = VideoRect.Width; int VideoHeight = VideoRect.Height; int XPosition = VideoRect.X; int YPosition = VideoRect.Y; this.MainWindow = new Window1 (); ((Window1)this.MainWindow).SetParameter (m_CVM, m_Arguments, VideoWidth, VideoHeight); this.MainWindow.Left = XPosition; this.MainWindow.Top = YPosition; this.MainWindow.Width = VideoWidth; this.MainWindow.Height = VideoHeight; this.MainWindow.Show (); }
public XAMLHandling (CVM.CommonValues Cvm) { m_CVM = Cvm; ShowTextFrames = false; FramingAroundPercentage = 20; MaxPercentage = 100 + FramingAroundPercentage; MaxFactor = MaxPercentage / 100; }
public SimpleInputWindow () { InitializeComponent (); ShowGridLines = false; m_CVM = new CVM.CommonValues (); m_XAML = new XAMLHandling (m_CVM); ValueChangeRequested = false; RunAsColorPicker = false; }
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; } }
public void Run () { m_DataBase = new WCFStandardsNS.WCFStandards (); m_DataBase.DefaultConnectionStringName = "WPMediaAddOnDataConnectionString"; m_CVM = new CVM.CommonValues (); m_BannerFileName = m_CVM.GetBannerCreationFileName ("Haus"); if (!Directory.Exists (Path.GetDirectoryName (m_BannerFileName))) Directory.CreateDirectory (Path.GetDirectoryName (m_BannerFileName)); m_AllHotNewsTexte = new ArrayList (); m_AllNewsTexte = new ArrayList (); CreateBannerData (); m_ButtonRootDirectory = Path.GetDirectoryName (m_CVM.GetButtonCreationFileName ("Haus", "x")); m_WPMediaDataPages = Path.GetDirectoryName (m_CVM.GetButtonCreationHTMLFileName ("x")); if (!Directory.Exists (m_ButtonRootDirectory)) Directory.CreateDirectory (m_ButtonRootDirectory); if (!Directory.Exists (m_WPMediaDataPages)) Directory.CreateDirectory (m_WPMediaDataPages); CreateButtonData (); }
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 void SetParameter (CVM.CommonValues cvm, String [] Arguments, int VideoWidth, int VideoHeight, double TargetAspectRatio) { WPMediaManagement.SingletonManagedProgrammManagement.Instance.CheckForLoad (); m_CVM = cvm; m_Arguments = Arguments; UseOnlyWhenIndexOfIsIn = FillUseOnlyWhenIndexOfIsIn (m_CVM); if (WMB.Basics.IsTestRun) CommonDataBase.CommonBasics.ShowWPMediaParameter (UseOnlyWhenIndexOfIsIn); m_LoadWPMediaParameterReturnValue = CommonDataBase.CommonBasics.LoadWPMediaParameter (UseOnlyWhenIndexOfIsIn); if (m_LoadWPMediaParameterReturnValue == false) WMB.Basics.ReportErrorToEventViewer ("PlayingDataProcessMainWindow.SetParameter", "Bei folgenden Parameter Settings entstand ein \"m_LoadWPMediaParameterReturnValue\" Fehler\"\r\n" + String.Join (";\r\n", m_Arguments) + "\""); System.Drawing.Rectangle VideoRectangle = m_CVM.VideoRectangle; this.WindowStartupLocation = WindowStartupLocation.Manual; m_MainDynamicPage = new MainDynamicPage (); m_MainDynamicPage.CloseRequestedCall += new CloseRequested (m_MainDynamicPage_CloseRequestedCall); m_MainDynamicPage.SetParameter (m_CVM, m_Arguments, m_CVM.VideoWidth, m_CVM.VideoHeight, m_CVM.SecondsToStop); m_MainDynamicPage.LogWPMediaActivitiesCall = new CVM.LogWPMediaActivities (PlayingDataProcessInterface_LogWPMediaActivitiesCall); }
public ManagedSelectedMaterialControl () { InitializeComponent (); m_CVM = new CVM.CommonValues (); m_XAMLHandling = new CVM.XAMLHandling (m_CVM); }
private void Window_Loaded (object sender, RoutedEventArgs e) { NameScope.SetNameScope (this.RootGrid, new NameScope ()); m_CVM = new CVM.CommonValues (); double CalculatedHeight = CreateFieldDefinitions (CreateRowDefinitions ()); if (CalculatedHeight < CVM.CommonValues.ScreenHeight / 3) this.Height = CalculatedHeight; else { this.Height = CVM.CommonValues.ScreenHeight / 3; } this.Width = CVM.CommonValues.ScreenWidth / 4; this.Title = m_TitelText; }
public ManagedMaterialControl () { InitializeComponent (); m_CVM = new CVM.CommonValues (); m_XAMLHandling = new CVM.XAMLHandling (m_CVM); //m_XAMLHandling.ShowGridLines = true; }
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 PreparePlayableMaterialDLL () { InitializeComponent(); // //TODO: Add the constructor code here // m_CVM = new CVM.CommonValues (); m_BasicSleepTime = BASIC_SLEEP_TIME_IN_SECONDS * 1000; m_MaxDeleteRetry = MAX_DELETE_RETRY; }
public void SetParameter (CVM.CommonValues CVM, String [] Arguments) { m_CVM = CVM; m_Arguments = Arguments; SetWindowsContent (); }
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; }