コード例 #1
0
ファイル: YahooEngine.cs プロジェクト: fenbf/search3D
        public static void Test()
        {
            YahooSearchService yahoo = new YahooSearchService();

            Yahoo.API.ImageSearchResponse.ResultSet resultSet = yahoo.ImageSearch("YahooExample", "satriani", "all", 10, 1, "any", true);

            StringWriter sw = new StringWriter();
            foreach (Yahoo.API.ImageSearchResponse.ResultType result in resultSet.Result)
            {
                System.Diagnostics.Debug.WriteLine("Title: {0}", result.Title);
                System.Diagnostics.Debug.WriteLine("Summary: {0}", result.Summary);
                System.Diagnostics.Debug.WriteLine("URL: {0}", result.Url);
                System.Diagnostics.Debug.WriteLine("==============================================================");
            }
        }
コード例 #2
0
ファイル: TestHarness.cs プロジェクト: fenbf/search3D
        private void btnImage_Click(object sender, System.EventArgs e)
        {
            YahooSearchService yahoo = new YahooSearchService();

            Yahoo.API.ImageSearchResponse.ResultSet resultSet = yahoo.ImageSearch("YahooExample", "maddona", "all", 10, 1, "any", true );

            StringWriter sw = new StringWriter();
            foreach (Yahoo.API.ImageSearchResponse.ResultType result in resultSet.Result)
            {
                sw.WriteLine("Title: {0}", result.Title);
                sw.WriteLine("Summary: {0}", result.Summary);
                sw.WriteLine("URL: {0}", result.Url);
                sw.WriteLine("===============================================================");
            }

            txtResult.Text = sw.ToString();
        }