ShowStatus() private method

Updates status. Possibly async
private ShowStatus ( string message ) : void
message string
return void
Ejemplo n.º 1
0
        private void btnEditAddField_Click(object sender, System.EventArgs e)
        {
            string newName = txtNewName.Text.Trim();

            if (newName == "")
            {
                luke.ShowStatus(resources.GetString("NoFieldName"));
                return;
            }
            int index;

            if ((index = lstFields.FindString(newName)) == -1)
            {
                lstFields.Items.Add(newName);
                fields.Add(new Field(newName, "", Field.Store.NO, Field.Index.NOT_ANALYZED_NO_NORMS));
                fieldsReconstructed.Add(false);

                lstFields.SelectedIndex = lstFields.Items.Count - 1;
            }
            else
            {
                // already exist
                lstFields.SelectedIndex = index;
            }
        }
Ejemplo n.º 2
0
        private void btnEditAddField_Click(object sender, System.EventArgs e)
        {
            string newName = txtNewName.Text.Trim();

            if (newName == "")
            {
                luke.ShowStatus(resources.GetString("NoFieldName"));
                return;
            }
            int index;

            if ((index = lstFields.FindString(newName)) == -1)
            {
                lstFields.Items.Add(newName);
                //Lucene.Net_1_4_3_RC3_final:       public Field(System.String name, System.String string_Renamed, bool store, bool index, bool token):this(name, string_Renamed, store, index, token, false)
                //fields.Add(new Field(newName, "", false, false, false));
                fields.Add(new Field(newName, "", Field.Store.NO, Field.Index.NO));
                fieldsReconstructed.Add(false);

                lstFields.SelectedIndex = lstFields.Items.Count - 1;
            }
            else
            {
                // already exist
                lstFields.SelectedIndex = index;
            }
        }
Ejemplo n.º 3
0
        private void listSearch_DoubleClick(object sender, System.EventArgs e)
        {
            if (_luke.IndexReader == null)
            {
                _luke.ShowStatus(_luke.resources.GetString("NoIndex"));
                return;
            }

            if (listSearch.SelectedItems == null ||
                listSearch.SelectedItems.Count == 0)
            {
                return;
            }

            Document doc;
            int      docId;

            try
            {
                docId = Int32.Parse(listSearch.SelectedItems[0].SubItems[1].Text);

                doc = _luke.IndexReader.Document(docId);
            }
            catch (Exception exc)
            {
                _luke.ShowStatus(exc.Message);
                return;
            }

            _luke._ShowDocFields(docId, doc);

            _luke.ShowDocumentsTab();
        }
Ejemplo n.º 4
0
        private void InitPlugins()
        {
            ClearPluginsUI();

            foreach (LukePlugin plugin in plugins)
            {
                plugin.SetDirectory(_luke.Directory);
                plugin.SetIndexReader(_luke.IndexReader);
                try
                {
                    plugin.Init();
                    plugin.Anchor = AnchorStyles.Bottom | AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
                }
                catch (Exception e)
                {
                    plugins.Remove(plugin);
                    _luke.ShowStatus("PLUGIN ERROR: " + e.Message);
                    MessageBox.Show("PLUGIN ERROR: " + e.Message);
                }
                lstPlugins.Items.Add(plugin.GetPluginName());
            }

            if (lstPlugins.Items.Count > 0)
            {
                lstPlugins.SelectedIndex = 0;
            }
        }
Ejemplo n.º 5
0
        private void textTerm_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
        {
            if (e.KeyChar == Convert.ToChar((int)Keys.Enter))
            {
                if (_luke.IndexReader == null)
                {
                    _luke.ShowStatus(_luke.resources.GetString("NoIndex"));
                    return;
                }

                try
                {
                    String text  = textTerm.Text;
                    String field = comboTerms.Text;

                    if (text == null || text == string.Empty)
                    {
                        return;
                    }

                    Term t = new Term(field, text);
                    _ShowTerm(t);
                }
                catch (Exception exc)
                {
                    _luke.ShowStatus(exc.Message);
                }
            }
        }
Ejemplo n.º 6
0
 private void buttonTopTerms_Click(object sender, System.EventArgs e)
 {
     _luke.ShowStatus("");
     ShowTopTerms();
 }