/// <summary> /// Initialize the window /// </summary> /// <param name="fullscreenMode">Indicate, if is fullscreen mode</param> protected void InitializeWindow(bool fullscreenMode) { LoadSettings(); _showFirstAvailableSubPage = false; _numberOfRequestedUpdates = 0; lblMessage.Label = ""; lblMessage.Visible = false; // Activate teletext grabbing in the server TVHome.Card.GrabTeletext = true; // Set the current page to the index page currentPageNumber = 0x100; currentSubPageNumber = 0; // Remember the start time _startTime = DateTime.MinValue; _trottling = DateTime.MinValue; // Initialize the render _renderer = new TeletextPageRenderer(); _renderer.TransparentMode = _transparentMode; _renderer.FullscreenMode = fullscreenMode; _renderer.HiddenMode = _hiddenMode; _renderer.PageSelectText = Convert.ToString(currentPageNumber, 16); _renderer.PercentageOfMaximumHeight = _percentageOfMaximumHeight; _waiting = false; // Create an update thread and set it's priority to lowest _updateThreadStop = false; _updateThread = new Thread(UpdatePage); _updateThread.Name = "Teletext Updater"; _updateThread.Priority = ThreadPriority.BelowNormal; _updateThread.IsBackground = true; _updateThread.Start(); // Load the mp logo page into teletext data array LoadLogoPage(); // Request an update RequestUpdate(); }
/// <summary> /// Initialize the window /// </summary> /// <param name="fullscreenMode">Indicate, if is fullscreen mode</param> protected void InitializeWindow(bool fullscreenMode) { LoadSettings(); _numberOfRequestedUpdates = 0; // Create an update thread and set it's priority to lowest _updateThreadStop = false; _updateThread = new Thread(UpdatePage); _updateThread.Name = "Teletext Updater"; _updateThread.Priority = ThreadPriority.BelowNormal; _updateThread.IsBackground = true; _updateThread.Start(); lblMessage.Label = ""; lblMessage.Visible = false; // Activate teletext grabbing in the server ForTheRecordMain.Navigator.StartGrabbingTeletext(); // Set the current page to the index page currentPageNumber = 0x100; currentSubPageNumber = 0; // Remember the start time _startTime = DateTime.MinValue; // Initialize the render _renderer = new TeletextPageRenderer(); _renderer.TransparentMode = _transparentMode; _renderer.FullscreenMode = fullscreenMode; _renderer.HiddenMode = _hiddenMode; _renderer.PageSelectText = Convert.ToString(currentPageNumber, 16); _renderer.PercentageOfMaximumHeight = _percentageOfMaximumHeight; // Initialize the images if (imgTeletextForeground != null) { imgTeletextForeground.ColorKey = Color.HotPink.ToArgb(); _renderer.Width = imgTeletextForeground.Width; _renderer.Height = imgTeletextForeground.Height; } if (imgTeletextBackground != null) { imgTeletextBackground.ColorKey = Color.HotPink.ToArgb(); _renderer.Width = imgTeletextBackground.Width; _renderer.Height = imgTeletextBackground.Height; } // Load the mp logo page into teletext data array LoadLogoPage(); // Request an update _numberOfRequestedUpdates++; }