コード例 #1
0
        public void SetupQueryResultsControlForResultsDisplay(
            QueryManager qm)
        {
            Progress.Hide();             // hide any progress so popup gets focus

            //string title = qm.Query.UserObject.Name;

            //PopupResults pr = new PopupResults();
            //UIMisc.PositionPopupForm(pr);
            //pr.Text = title;

            QueryResultsControl qrc = QueryResultsControl;

            qm.LinkMember(qrc);
            Query q = qm.Query;

            if (SetupQueryResultsControlMethod != null)
            {
                SetupQueryResultsControlMethod();                                                     // let parent know that we're setting up the QueryResultsControl
            }
            qrc.BuildResultsPagesTabs(q);

            if (q.ResultsPages.Pages.Count <= 1)             // hide tabs if only one
            {
                qrc.ResultsLabel.Visible = qrc.Tabs.Visible = false;
            }

            //qrc.ConfigureResultsPage(0); // render the first page
            qrc.SelectPage(q.InitialBrowsePage);             // show the initial browse page
        }
コード例 #2
0
        /// <summary>
        /// Show popup results in a results window
        /// </summary>
        /// <param name="qm"></param>
        /// <param name="title"></param>

        public static void Show(
            QueryManager qm)
        {
            string uri;
            int    pi, posDelta = 20;

            Progress.Hide();             // hide any progress so popup gets focus

            string title = qm.Query.UserObject.Name;

            PopupResults pr = new PopupResults();

            UIMisc.PositionPopupForm(pr);
            pr.Text = title;

            QueryResultsControl qrc = pr.QueryResultsControl;

            qm.LinkMember(qrc);
            Query q = qm.Query;

            qrc.BuildResultsPagesTabs(q);

            if (q.ResultsPages.Pages.Count <= 1)             // hide tabs if only one
            {
                qrc.ResultsLabel.Visible = qrc.Tabs.Visible = false;
            }


            //qrc.ToolPanel.Visible = false; // hide tools for now (e.g. Edit Query)

            //if (q.ResultsPages.Pages.Count <= 1) // hide tabs if only one
            //{
            //	PanelControl pc = qrc.ResultsPagePanelContainer;
            //	int delta = pc.Top;
            //	pc.Top = 0;
            //	pc.Height += delta;
            //}

            pr.Show();
            //qrc.ConfigureResultsPage(0); // render the first page
            qrc.SelectPage(q.InitialBrowsePage);             // show the initial browse page

            UIMisc.BringFormToFront(pr);
            return;
        }