Пример #1
0
        public frmResults(LuceneIREngine IREngine, string topic)
        {
            InitializeComponent();
            myIREngine = IREngine;
            topicID    = topic;
            pageNumber = 0;

            // build the results collection
            numResults = myIREngine.BuildResults();

            // setup escape key actions
            this.CancelButton = btnClose;

            // setup datagrid
            SetupDataGrid(myIREngine.GetResultSummaryColDetails());
            PopulateDataGrid(0);

            // setup buttons
            btnPrevious.Enabled = false;
            if (numResults <= 10)
            {
                btnNext.Enabled = false;
            }

            // report total results and query time
            lblTotalResults.Text = "Total Results: " + numResults;
            lblQueryTime.Text    = "Time to query: " + myIREngine.QueryTime + " sec";
        }
Пример #2
0
        public frmQuery(LuceneIREngine IREngine)
        {
            InitializeComponent();
            myIREngine          = IREngine;
            chkProcess.Checked  = true;
            tbProcQuery.Text    = "";
            lblQuery.Visible    = false;
            tbProcQuery.Visible = false;
            this.ActiveControl  = txtQuery;

            // build query autocomplete options
            allSugs = myIREngine.GetQuerySuggestions();
            lbSuggestions.Visible = false;

            // this button was used for testing purposes
            btnAutoQuery.Visible = false;
        }