Wednesday, March 20, 2019

Essay --

/* * procure 2005 dotlucene.net * * Licensed under the Apache License, Version 2.0 (the License) * you may not exercising this file except in compliance with the License. * You may obtain a copy of the License at * * http//www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable legal philosophy or agreed to in writing, software * distributed under the License is distributed on an AS IS BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * chatter the License for the specific language governing permissions and * limitations under the License. */ development dustusing System.Diagnosticsusing System.Drawingusing System.IOusing System.Windows.Formsusing Lucene.Net.Analysis.Standardusing Lucene.Net.Documentsusing Lucene.Net.Indexusing Lucene.Net.QueryParsersusing Lucene.Net.Searchusing DesktopSearch1.Iconsusing DesktopSearch1.Parsingnamespace DesktopSearch1/// /// Summary description for Form1./// exoteric class Form1 System.Windows.For ms.Form undercover string pathIndex reclusive IndexWriter indexWriter surreptitious string patterns = *.doc, *.xls, *.ppt, *.htm, *.txtprivate SystemImageList imageListDocumentsprivate IndexSearcher searcher = null// statisticsprivate long bytesTotal = 0private int countTotal = 0private int countSkipped = 0private System.Windows.Forms.TextBox textBoxPathprivate System.Windows.Forms.Button buttonBrowseprivate System.Windows.Forms.Button buttonIndexprivate System.Windows.Forms.Label labelStatusprivate System.Windows.Forms.TextBox textBoxQueryprivate System.Windows.Forms.Button buttonSearchprivate System.Windows.Forms.ListView listViewResults... ...ond) throw first private void listViewResults_DoubleClick(object sender, System.EventArgs e)if (this.listViewResults.SelectedItems.Count = 1)returnstring path = (string) this.listViewResults.SelectedItems0.TagProcess.Start(path)private void textBoxQuery_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)if (e.KeyCode == Keys.Enter)s earch()private void buttonBrowse_Click(object sender, System.EventArgs e)this.folderBrowserDialog1.SelectedPath = this.textBoxPath.Textif (this.folderBrowserDialog1.ShowDialog() == DialogResult.OK)this.textBoxPath.Text = this.folderBrowserDialog1.SelectedPathprivate void buttonClean_Click(object sender, System.EventArgs e)Directory.Delete(this.pathIndex, true)checkIndex()

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.