コード例 #1
0
 public void LogIn(string code)
 {
     ServiceReference1.WeatherSoapClient obj = new ServiceReference1.WeatherSoapClient(
         new BasicHttpBinding(),
         new EndpointAddress("http://wsf.cdyne.com/WeatherWS/Weather.asmx"));
     obj.GetCityForecastByZIPAsync(code);
     obj.GetCityForecastByZIPCompleted += getResult;
 }
コード例 #2
0
        public void setCity()
        {
            Logger.Log("Setting city");
            ServiceReference1.WeatherSoapClient ws = new ServiceReference1.WeatherSoapClient("WeatherSoap");

            //add zip code
            city = ws.GetCityWeatherByZIP("90006").City.ToString();
            Logger.Log("Set city is " + city);
            lblTask1.Text = city;
        }