示例#1
0
        /// <summary>
        /// perform a search
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnSearch_Click(object sender, EventArgs e)
        {
            if (hoot == null)
            {
                loadhoot();
            }

            listBox1.Items.Clear();
            DateTime dt = DateTime.Now;

            listBox1.BeginUpdate();

            foreach (var d in hoot.FindDocumentFileNames(txtSearch.Text))
            {
                listBox1.Items.Add(d);
            }
            listBox1.EndUpdate();
            lblStatus.Text = "Search = " + listBox1.Items.Count + " items, " + DateTime.Now.Subtract(dt).TotalSeconds + " s";
        }