示例#1
0
 /// <summary>
 /// Available to override in the Kml page which filters out non-geocoded results
 /// </summary>
 protected virtual SortedList GetSearchResults(Searcharoo.Engine.Search se)
 {
     return(se.GetResults(this.SearchQuery, _Catalog));
 }
示例#2
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            us = (User)Session["user"];
            string lat = (string)Session["lat"];
            string lon = (string)Session["long"];

            we.Word_search1 = TextBox1.Text;
            we.latid        = lat;
            we.@long        = lon;
            we.Searcher_id  = us.ID;
            we.date_s       = DateTime.Now;
            data.Word_searches.InsertOnSubmit(we);
            data.SubmitChanges();
            //  string ko= Cache.Get("OurSearch.aspx").ToString();
            foreach (char ss in TextBox1.Text)
            {
                if ((ss >= 0x600 && ss <= 0x6ff) || (ss >= 0x750 && ss <= 0x77f) || (ss >= 0xfb50 && ss <= 0xfc3f) || (ss >= 0xfe70 && ss <= 0xfefc))
                {
                    Searcharoo.Engine.Search.flag = 1;

                    break;
                }
                else
                {
                    Searcharoo.Engine.Search.flag = 0;

                    break;
                }
            }
            _Catalog = Catalog.Load();

            Searcharoo.Engine.Search se = new Searcharoo.Engine.Search();
            SortedList output           = se.GetResults(TextBox1.Text, _Catalog);

            _NumberOfMatches = output.Count.ToString();
            _DisplayTime     = se.DisplayTime;
            if (output.Count > 0)
            {
                Repeater1.DataSource = null;
                Repeater1.DataBind();
                lblNoSearchResults.Visible     = false;
                _PagedResults.DataSource       = output.GetValueList();
                _PagedResults.AllowPaging      = true;
                _PagedResults.PageSize         = Preferences.ResultsPerPage; //10;
                _PagedResults.CurrentPageIndex = Request.QueryString["page"] == null ? 0 : Convert.ToInt32(Request.QueryString["page"]) - 1;

                _Matches     = se.SearchQueryMatchHtml;
                _DisplayTime = se.DisplayTime;
                string displaydate = datee;

                Repeater1.DataSource = _PagedResults;
                Repeater1.DataBind();
                Repeater1.Visible = true;
            }
            else
            {
                Repeater1.DataSource = null;
                Repeater1.DataBind();
                lblNoSearchResults.Visible = true;
            }
            //// Set the display info in the top & bottom user controls
            // ucSearchPanelHeader.Word = ucSearchPanelFooter.Word = this.SearchQuery;
            // ucSearchPanelFooter.Visible = true;
            // ucSearchPanelFooter.IsFooter = true;
            // ucSearchPanelHeader.IsSearchResultsPage = true;


            Session["lat"]  = HiddenField1.Value.ToString();
            Session["long"] = HiddenField2.Value.ToString();
            Session["user"] = us;
        }