你所有的接收端都直接从google取天气不就行了么? 

解决方案 »

  1.   

    我之前那个是GSM与PC通信,也就是GSM短信模块,可以么?
      

  2.   

    只知道可以用webservice做天气预报
      

  3.   

    用webservicehttp://www.webxml.com.cn/WebServices/WeatherWebService.asmx
      

  4.   

    不懂winform 如何实现。。 新手求学!
    不过如果是网站的话 我会使用 第3方提供的 api.
      

  5.   

    是啊,这个也是调用了API,但是我不知怎么把它的代码查出来。。
      

  6.   

    这个用数据库做挺好做的。
    1、天气、温度、风向 三个字段 建立对照表。
    2、根据数字编码 sql查询。
    3、override ToString()方法 解析成你自己想要的
      

  7.   


    protected void Button1_Click(object sender, EventArgs e)
            {
                if (TextBox1.Text.Trim ()!= "")
                {
                    DataClasses1DataContext context = new DataClasses1DataContext();
                    string[] str = new string[3];
                    str[0] = TextBox1.Text.Substring(0, 2);
                    str[1] = TextBox1.Text.Substring(2, 3);
                    str[2] = TextBox1.Text.Substring(5, 3);
                    string str1 = "";
                    if (str[1].Substring(0, 1) == "1")
                    {
                        str1 = "温度:零下" + str[1].Substring (1)+"度";
                    }
                    else
                    {
                        str1 = "温度:" + str[1].Substring(1) + "度";
                    }
                    var linqdata = from table in context.天气情况
                                   where table.编码 == str[0]
                                   select table.天气;
                    var linqdata1 = from table in context.风向
                                    where table.编码 == str[2]
                                    select table.风向1;
                    Label1.Text = "天气:" + linqdata.ToList()[0] + "  " + str1 + "  " + "风向:" + linqdata1.ToList()[0];
                }
            }
      

  8.   

     static void codeToString()
            {
                string code= Console.ReadLine();
                if (code.Trim()!= "")
                {
                    DataClasses1DataContext context = new DataClasses1DataContext();
                    string[] str = new string[3];
                    str[0] = code.Substring(0, 2);
                    str[1] = code.Substring(2, 3);
                    str[2] = code.Substring(5, 3);
                    string str1 = "";
                    if (str[1].Substring(0, 1) == "1")
                    {
                        str1 = "温度:零下" + str[1].Substring(1) + "度";
                    }
                    else
                    {
                        str1 = "温度:" + str[1].Substring(1) + "度";
                    }
                    var linqdata = from table in context.天气情况
                                   where table.编码 == str[0]
                                   select table.天气;
                    var linqdata1 = from table in context.风向
                                    where table.编码 == str[2]
                                    select table.风向1;
                    Console.WriteLine("天气:" + linqdata.ToList()[0] + " " + str1 + " " + "风向:" + linqdata1.ToList()[0]);
                    Console.ReadLine();  
                }
            }DataClasses1DataContext 是Linq to sql classes. 数据库操作用这个简单方便
      

  9.   

    做成后台网站也可以。
    前台传入code码 后台转换完 返回字符串