/// <summary> /// Set the tool bar tools in the upper right corner of the QueryResultsControl /// </summary> /// <param name="tools"></param> /// <param name="zoomPct">Percent to show on zoom control, hide control if negative</param> internal void SetToolBarTools( PanelControl tools, int zoomPct) { ToolPanel.Controls.Clear(); if (tools != null) { ResultsPageControl rpc = ResultsPageControl; if (rpc == null) { throw new Exception("ResultsPageControl not defined"); } int width = tools.Width; ToolPanel.Width = width; ToolPanel.Left = Width - width; rpc.SetupTools(tools); ToolPanel.Controls.Add(tools); // add tools for the view tools.Location = new Point(0, 0); // position in upper left corner Tabs.Width = (ToolPanel.Left - 6) - Tabs.Left; } SetZoomSliderPct(zoomPct); //Application.DoEvents(); // update the UI return; }
/// <summary> /// Dispose /// </summary> public new void Dispose() { if (ResultsPageControl != null) { ResultsPageControl.ResultsPagePanel = null; ResultsPageControl = null; } if (DodQm != null) { DodQm.Dispose(); DodQm = null; } base.Dispose(); return; }
/// <summary> /// Configure and display the results page, creating first if necessary /// </summary> /// <param name="page"></param> internal void ConfigureResultsPage(ResultsPage page) { ResultsPageControl = ResultsPageControl.Configure(this, page); return; }
/// <summary> /// Configure the results page control for the current page /// </summary> /// <param name="qrc"></param> /// <param name="page"></param> /// <returns></returns> static internal ResultsPageControl Configure( QueryResultsControl qrc, ResultsPage page) { qrc.RemoveExistingControlsFromResultsPageControlContainer(); // properly dispose of any existing DevExpress controls ResultsPageControl rpc = new ResultsPageControl(); // page control with common tools and display area qrc.ResultsPageControl = rpc; // link the QueryResultsControl to rpc rpc.ResultsPage = page; // set the page that the rpc references PanelControl commonTools = rpc.Tools; // the array of common tools ResultsPagePanel rpp = rpc.ResultsPagePanel; // panel containing the display, filters and DoD panels page.ResultsPagePanel = rpp; //PanelControl rppc = qrc.ResultsPageControlContainer; // panel that contains the dock panels and rendering controls for the associated page views (1 per dock panel) //QueryResultsControl.DisposeOfChildMobiusControls(rppc); // properly dispose of any existing DevExpress controls //rppc.Controls.Clear(); // clear the view while building PanelControl rppc = qrc.ResultsPageControlContainer; // panel that contains the dock panels and rendering controls for the associated page views (1 per dock panel) rpp.Location = new Point(0, 0); // make the rpp the same size as rppc before adding it to avoid a resize rpp.Size = rppc.Size; rpp.Visible = false; // don't make visible until later rpp.Parent = rppc; // associate to parent before added to parent ViewsPanel viewsPanel = rpp.ViewsPanel; // Views DockPanels and their contained rendering controls go in here Query q = qrc.CrvQuery; // be sure we have a base QM if (q != null) { // be sure the QueryManager is complete QueryManager qm = q.QueryManager as QueryManager; if (qm == null) // allocate query manager if needed { qm = new QueryManager(); q.QueryManager = qm; qm.LinkMember(q); } qm.CompleteInitialization(OutputDest.WinForms); // be sure QueryManager is complete qm.LinkMember(qrc); // be sure qrc is linked to qm } ////rpp.SuspendLayout(); ////rppc.Controls.Add(rpp); // add the results page panel to the page container panel (needed to look up control tree to get Qrc) if (page.ShowFilterPanel) { rpp.RenderFilterPanel(); rpp.FiltersDockPanel.Visibility = DockVisibility.Visible; } else { rpp.FiltersDockPanel.Visibility = DockVisibility.Hidden; } if (page.ShowDetailsOnDemand) { rpp.RenderDetailsOnDemandPanel(); rpp.DodDockPanel.Visibility = DockVisibility.Visible; } else { rpp.DodDockPanel.Visibility = DockVisibility.Hidden; } bool showBeforeLayout = (page.Views.Count == 1 && page.Views[0].ViewType == ResultsViewType.Spotfire); if (showBeforeLayout) { rpp.Visible = true; rppc.Controls.Add(rpp); // add the results page panel to the page container panel rpp.Dock = DockStyle.Fill; rpp.ViewsPanel.LayoutAndRenderViews(); // add the data views } else // layout before showing { rpp.ViewsPanel.LayoutAndRenderViews(); // add the data views rpp.Visible = true; rppc.Controls.Add(rpp); // add the results page panel to the page container panel } ////rpp.ResumeLayout(); rpp.ViewsPanel.FocusActiveView(); return(rpc); }