Example #1
0
        private void buttonSearch_Click(object sender, EventArgs e)
        {
            if (textboxQuery.Lines.Count <string>() < 1)
            {
                return;
            }
            string text = textboxQuery.Lines[0].Trim();
            List <SearchResult> result;

            if (!text.Equals(""))
            {
                result = myIR.SearchQuery(text);
                if (result.Count > 0)
                {
                    reInterface = new ResultInterface(result, text);
                    reInterface.RefreshEvent += RefreshEvent;
                    reInterface.ShowDialog();
                }
                else
                {
                    MessageBox.Show("There's no result", "Not found", MessageBoxButtons.OK);
                }
            }
        }
Example #2
0
        private void buttonSearch_Click(object sender, EventArgs e)
        {
            if (textboxQuery.Lines.Count<string>() < 1)
                return;
            string text = textboxQuery.Lines[0].Trim();
            List<SearchResult> result;
            if (!text.Equals("")) {
                result = myIR.SearchQuery(text);
                if (result.Count > 0)
                {
                    reInterface = new ResultInterface(result,text);
                    reInterface.RefreshEvent += RefreshEvent;
                    reInterface.ShowDialog();
                }
                else
                {
                    MessageBox.Show("There's no result", "Not found", MessageBoxButtons.OK);
                }

            }
        }
Example #3
0
 void RefreshEvent(object sender, ResultInterface.RefreshEventArgs e)
 {
     List<SearchResult> result;
     result = myIR.ExpandQuery(e.query, e.items);
     reInterface.Result = result;
 }