Exemple #1
0
        private void InitSearch()
        {
            try
            {
                string search = _data.GetDefaultSearch();
                switch (search)
                {
                case "1":    //百度
                    labelSearch.Text = "百度";
                    string_Search    = "http://www.baidu.com/s?wd=";
                    break;

                case "2":    //谷歌
                    labelSearch.Text = "谷歌";
                    string_Search    = "http://www.google.com.hk/search?hl=zh-CN&source=hp&q=";
                    break;

                case "3":    //雅虎
                    labelSearch.Text = "雅虎";
                    string_Search    = "http://sg.search.yahoo.com/search;_ylt=AwrSbjMLkPlSsSgA7Eci4gt.?p=";
                    break;

                case "4":    //SOSO
                    labelSearch.Text = "SOSO";
                    string_Search    = "http://www.soso.com/q?w=";
                    break;

                case "5":    //必应
                    labelSearch.Text = "必应";
                    string_Search    = "http://cn.bing.com/search?q=";
                    break;

                case "6":    //360
                    labelSearch.Text = "360";
                    string_Search    = "http://www.so.com/s?q=";
                    break;
                }
            }
            catch (Exception ex)
            {
                log.WriteLog(ex.ToString());
            }
        }