InitOverview() private method

private InitOverview ( ) : void
return void
Esempio n. 1
0
        private void buttonDelete_Click(object sender, System.EventArgs e)
        {
            int docid = 0;

            if (_luke.IndexReader == null)
            {
                _luke.ShowStatus(_luke.resources.GetString("NoIndex"));
                return;
            }
            if (_luke.ReadOnly)
            {
                _luke.ShowStatus(_luke.resources.GetString("Readonly"));
                return;
            }
            try
            {
                docid = Int32.Parse(textDocNum.Text);

                _ShowDoc(+1);
                _luke.IndexReader.DeleteDocument(docid);
                _luke.InitOverview();
            }
            catch (Exception exc)
            {
                _luke.ShowStatus(exc.Message);
            }
        }
Esempio n. 2
0
        private void buttonSearchDelete_Click(object sender, System.EventArgs e)
        {
            if (_luke.IndexReader == null)
            {
                _luke.ShowStatus(_luke.resources.GetString("NoIndex"));
                return;
            }
            if (_luke.ReadOnly)
            {
                _luke.ShowStatus(_luke.resources.GetString("Readonly"));
                return;
            }

            try
            {
                foreach (ListViewItem item in listSearch.SelectedItems)
                {
                    int docId = Int32.Parse(item.SubItems[1].Text);
                    _luke.IndexReader.DeleteDocument(docId);
                    listSearch.Items.Remove(item);
                }
            }
            catch (Exception exc)
            {
                _luke.ShowStatus(exc.Message);
            }
            _luke.InitOverview();
        }