/// <summary> /// Do this modal /// </summary> /// <param name="dwParentId"></param> public void DoModal(int parentId) { _parentWindowID = parentId; _parentWindow = GUIWindowManager.GetWindow(_parentWindowID); if (null == _parentWindow) { _parentWindowID = 0; return; } GUIWindowManager.IsSwitchingToNewWindow = true; GUIWindowManager.RouteToWindow(GetID); // activate this window... GUIMessage msg = new GUIMessage(GUIMessage.MessageType.GUI_MSG_WINDOW_INIT, GetID, 0, 0, -1, 0, null); OnMessage(msg); GUIWindowManager.IsSwitchingToNewWindow = false; _running = true; GUILayerManager.RegisterLayer(this, GUILayerManager.LayerType.Dialog); while (_running && GUIGraphicsContext.CurrentState == GUIGraphicsContext.State.RUNNING) { GUIWindowManager.Process(); if (!GUIGraphicsContext.Vmr9Active) { Thread.Sleep(50); } } GUILayerManager.UnRegisterLayer(this); }
public void DoModal(int dwParentId) { _parentWindowId = dwParentId; _parentWindow = GUIWindowManager.GetWindow(_parentWindowId); if (null == _parentWindow) { _parentWindowId = 0; return; } GUIWindowManager.IsSwitchingToNewWindow = true; GUIWindowManager.RouteToWindow(GetID); GUILayerManager.RegisterLayer(this, GUILayerManager.LayerType.Dialog); // active this window... (with its own OnPageLoad) PageLoad(); GUIWindowManager.IsSwitchingToNewWindow = false; _keyboard.IsVisible = true; _keyboard.Position = _keyboard.TextEntered.Length; while (_keyboard.IsVisible && GUIGraphicsContext.CurrentState == GUIGraphicsContext.State.RUNNING) { GUIWindowManager.Process(); } PageDestroy(); }
public void DoModal(int dwParentId) { //Log.Debug("TvMiniGuide: DoModal"); _parentWindowID = dwParentId; _parentWindow = GUIWindowManager.GetWindow(_parentWindowID); if (null == _parentWindow) { //Log.Debug("TvMiniGuide: parentwindow = null"); _parentWindowID = 0; return; } GUIWindowManager.IsSwitchingToNewWindow = true; GUIWindowManager.RouteToWindow(GetID); // activate this window... GUIMessage msg = new GUIMessage(GUIMessage.MessageType.GUI_MSG_WINDOW_INIT, GetID, 0, 0, -1, 0, null); OnMessage(msg); GUIWindowManager.IsSwitchingToNewWindow = false; _running = true; GUILayerManager.RegisterLayer(this, GUILayerManager.LayerType.Dialog); while (_running && GUIGraphicsContext.CurrentState == GUIGraphicsContext.State.RUNNING) { GUIWindowManager.Process(); } Close(); }
public virtual void PageLoad(int ParentID) { CloseRoutedWindow(); _parentWindowID = ParentID; _parentWindow = GUIWindowManager.GetWindow(_parentWindowID); if (_parentWindow == null) { _parentWindowID = 0; return; } GUIWindowManager.IsSwitchingToNewWindow = true; lock (thisLock) { GUIWindowManager.RouteToWindow(GetID); GUIMessage msg = new GUIMessage(GUIMessage.MessageType.GUI_MSG_WINDOW_INIT, GetID, 0, 0, _parentWindowID, 0, null); OnMessage(msg); _running = true; } GUIWindowManager.IsSwitchingToNewWindow = false; while (IsAnimating(AnimationType.WindowOpen) && GUIGraphicsContext.CurrentState == GUIGraphicsContext.State.RUNNING) { GUIWindowManager.Process(); } }
protected override void OnPageLoad() { base.OnPageLoad(); m_bOverlay = GUIGraphicsContext.Overlay; GUIWindowManager.IsSwitchingToNewWindow = true; GUIWindowManager.RouteToWindow(GetID); Reset(); SetSummaryInfo(); SetOverallProgressLabel(); ControlColorDisabled = btnStart.DisabledColor; ControlColorUnfocused = checkSaveInAlbumFolder.DisabledColor; EnableControls(true); }
private void FileItemDialog() { // active this window... GUIWindowManager.IsSwitchingToNewWindow = true; GUIWindowManager.RouteToWindow(GetID); GUIMessage msg = new GUIMessage(GUIMessage.MessageType.GUI_MSG_WINDOW_INIT, GetID, 0, 0, m_dwParentWindowID, 0, null); OnMessage(msg); string strFileOperation = ""; if (m_iFileMode == 1) { strFileOperation = GUILocalizeStrings.Get(116); } else { strFileOperation = GUILocalizeStrings.Get(115); } SetHeading(strFileOperation); SetLine(1, 505); SetButtonsHidden(true); ShowProgressBar(true); SetPercentage(0); GUIWindowManager.Process(); // calc nr of files m_dwTotalSize = 0; m_iNrOfItems = 0; FileItemGetNrOfFiles(m_itemSourceItem); // set number of objects strFileOperation += " " + m_iNrOfItems.ToString() + " " + GUILocalizeStrings.Get(507) + " ("; if (m_dwTotalSize > 1024 * 1024) { strFileOperation += (m_dwTotalSize / (1024 * 1024)).ToString() + " MB)"; } else if (m_dwTotalSize > 1024) { strFileOperation += (m_dwTotalSize / 1024).ToString() + " KB)"; } else { strFileOperation += m_dwTotalSize.ToString() + " Bytes)"; } SetNewHeading(strFileOperation); SetLine(1, GUILocalizeStrings.Get(508) + " \"" + destinationFolder + "\" ?"); m_bButtonYes = false; m_bCanceled = false; m_bBusy = false; m_bButtonNo = false; m_bAlways = false; m_bNever = false; m_bReload = false; m_iFileNr = 1; sourceFolder = Path.GetDirectoryName(m_itemSourceItem.Path); GUIWindowManager.IsSwitchingToNewWindow = false; m_bRunning = true; while (m_bRunning && GUIGraphicsContext.CurrentState == GUIGraphicsContext.State.RUNNING) { GUIWindowManager.Process(); } }