/// <summary> /// Performs a base uinut if the window. This includes the following tasks /// - Setting the reference to the window in MP /// - Setting the reference to the control list of the MP window /// </summary> protected override void BaseInit() { //_osdWindow = GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_OSD) as GUIVideoOSD; _osdWindow = GUIWindowManager.GetWindow(HeadWeb.GUIOnlineVideoOSD.WINDOW_ONLINEVIDEOS_OSD) as GUIVideoOSD; if (_osdWindow != null) _controlList = _osdWindow.controlList; }
/// <summary> /// Constructor, which creates all elements /// </summary> public VideoOSDWindow() { _osdWindow = GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_OSD) as GUIVideoOSD; if (_osdWindow != null) { _controlList = _osdWindow.controlList; GenerateElements(); } }
/// <summary> /// Performs a base uinut if the window. This includes the following tasks /// - Setting the reference to the window in MP /// - Setting the reference to the control list of the MP window /// </summary> protected override void BaseInit() { _osdWindow = GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_OSD) as GUIVideoOSD; _baseWindow = _osdWindow; if (_osdWindow != null) { _controlList = _osdWindow.controlList; } }
/// <summary> /// Constructor, which creates all elements /// </summary> public VideoOSDWindow() { //_osdWindow = GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_OSD) as GUIVideoOSD; _osdWindow = GUIWindowManager.GetWindow(HeadWeb.GUIOnlineVideoOSD.WINDOW_ONLINEVIDEOS_OSD) as GUIVideoOSD; if (_osdWindow != null) { _controlList = _osdWindow.controlList; GenerateElements(); } }
public override bool OnMessage(GUIMessage message) { _needToClearScreen = true; if (_isOsdVisible) { return OnOsdMessage(message); } switch (message.Message) { case GUIMessage.MessageType.GUI_MSG_WINDOW_INIT: { base.OnMessage(message); _osdWindow = (GUIVideoOSD)GUIWindowManager.GetWindow((int)Window.WINDOW_OSD); HideControl(GetID, (int)Control.LABEL_ROW1); HideControl(GetID, (int)Control.LABEL_ROW2); HideControl(GetID, (int)Control.LABEL_ROW3); HideControl(GetID, (int)Control.BLUE_BAR); if (!SettingsLoaded) LoadSettings(); GUIWindowManager.IsOsdVisible = false; GUIWindowManager.IsPauseOsdVisible = g_Player.Paused; _isOsdVisible = false; _isPauseOsdVisible = g_Player.Paused; m_dwOSDTimeOut = DateTime.Now; _showStep = false; _showStatus = false; _showTime = false; _showSkipBar = false; _timeStamp = ""; _timeCodePosition = 0; _timeStatusShowTime = 0; _updateTimer = DateTime.Now; _vmr7UpdateTimer = DateTime.Now; _IsDialogVisible = false; _needToClearScreen = false; _isVolumeVisible = false; _isForbiddenVisible = false; NotifyDialogVisible = false; _volumeTimer = DateTime.MinValue; _forbiddenTimer = DateTime.MinValue; screenState = new FullScreenState(); NotifyDialogVisible = false; ResetAllControls(); // make sure the controls are positioned relevant to the OSD Y offset ScreenStateChanged(); _needToClearScreen = true; UpdateGUI(); if (!screenState.Paused) { for (int i = (int)Control.PANEL1; i < (int)Control.PANEL2; ++i) { HideControl(GetID, i); } } GUIGraphicsContext.IsFullScreenVideo = true; GUILayerManager.RegisterLayer(this, GUILayerManager.LayerType.Osd); RenderVolume(false); RenderForbidden(false); //return base.OnMessage(message); return true; } case GUIMessage.MessageType.GUI_MSG_WINDOW_DEINIT: { lock (this) { if (_isOsdVisible) { GUIMessage msg = new GUIMessage(GUIMessage.MessageType.GUI_MSG_WINDOW_DEINIT, _osdWindow.GetID, 0, 0, GetID, 0, null); _osdWindow.OnMessage(msg); // Send a de-init msg to the OSD } _isOsdVisible = false; _isPauseOsdVisible = false; GUIWindowManager.IsOsdVisible = false; GUIWindowManager.IsPauseOsdVisible = false; GUIGraphicsContext.IsFullScreenVideo = false; GUILayerManager.UnRegisterLayer(this); /*imgVolumeMuteIcon.SafeDispose(); imgVolumeBar.SafeDispose(); imgActionForbiddenIcon.SafeDispose(); dlg.SafeDispose(); _osdWindow.SafeDispose();*/ base.OnMessage(message); } return true; } case GUIMessage.MessageType.GUI_MSG_SETFOCUS: goto case GUIMessage.MessageType.GUI_MSG_LOSTFOCUS; case GUIMessage.MessageType.GUI_MSG_LOSTFOCUS: if (_isOsdVisible) { return true; } if (message.SenderControlId != (int)Window.WINDOW_FULLSCREEN_VIDEO) { return true; } break; } return base.OnMessage(message); }