コード例 #1
0
        private void searchButton_MouseClick(object sender, MouseEventArgs e)
        {
            LuceneInit lucene = new LuceneInit(false);
            List <SampleDataFileRow> results = lucene.Search(" and ");
            QuizContainerList        qcl     = new QuizContainerList();

            /*
             * foreach (SampleDataFileRow i in results) {
             *  System.Diagnostics.Debug.WriteLine("test: " + i.LineText);
             * }
             */

            List <quizUserControl> q = qcl.getQuizList(results);

            foreach (quizUserControl item in q)
            {
                quizContainer.Controls.Add(item);
            }
        }
コード例 #2
0
        static void Main()
        {
           // initialise Lucene
           
            LuceneInit luIn = new LuceneInit(true);
            SampleDataFileReader fileReader = new SampleDataFileReader();
            IEnumerable<SampleDataFileRow> row = fileReader.ReadAllRowsDB();
            /*
            foreach (SampleDataFileRow i in row) {
                System.Diagnostics.Debug.WriteLine("debug: " + i.LineText+i.LineNumber+" id: "+i.Id);
            }
            */
            luIn.BuildIndex(row);
            

            ////
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1());


        }