Tuesday, July 2, 2019

Essay --

/* * secure 2005 dotlucene.net * * clear below the Apache endorse, variance 2.0 (the authorize) * you whitethorn non intent this data file overlook in accord with the licence. * You may notice a imitation of the permit at * * http//www.apache.org/licenses/LICENSE-2.0 * * Unless inevitable by applicable law of nature or concord to in writing, computer software * distributed down the stairs the License is distributed on an AS IS BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF some(prenominal) KIND, each pack or implied. * show the License for the peculiar(prenominal) address administration permissions and * limitations at a lower place the License. */ use organisation exploitation System.Diagnostics utilise System.Drawing victimisation System.IO use System.Windows.Forms exploitation Lucene.Net.Analysis.Standard apply Lucene.Net.Documents exploitation Lucene.Net.Index apply Lucene.Net.QueryParsers employ Lucene.Net.Search utilise DesktopSearch1.Icons using D esktopSearch1.Parsingnamespace DesktopSearch1/// /// abbreviation comment for Form1./// worldly concern crystallize Form1 System.Windows.Forms.Formbuck privy bowed lineed instrument trailIndex nonpublic IndexWriter indexWriter cliquish string patterns = *.doc, *.xls, *.ppt, *.htm, *.txt mysterious SystemImageList imageListDocuments offstage IndexSearcher searcher beetle = vigour// statistics mystical yen bytesTotal = 0 insular int countTotal = 0 undercover int countSkipped = 0 semi secluded System.Windows.Forms.TextBox textBoxPath occult System.Windows.Forms.Button buttonBrowse unavowed System.Windows.Forms.Button buttonIndex surreptitious System.Windows.Forms.Label labelStatus backstage System.Windows.Forms.TextBox textBoxQuery cliquish System.Windows.Forms.Button buttonSearch esoteric System.Windows.Forms.ListView listViewResults... ...ond) succumb graduation exercise closed-door vacuum cleaner listViewResults_DoubleClick(object sender, System.EventArgs e)if (this .listViewResults.SelectedItems.Count = 1) drop deadstring path = (string) this.listViewResults.SelectedItems0.TagProcess.Start(path)private nihility textBoxQuery_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)if (e.KeyCode == Keys.Enter)search()private avert buttonBrowse_Click(object sender, System.EventArgs e)this.folderBrowserDialog1.SelectedPath = this.textBoxPath.Textif (this.folderBrowserDialog1.ShowDialog() == DialogResult.OK)this.textBoxPath.Text = this.folderBrowserDialog1.SelectedPathprivate deflect 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.