using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Xml.Linq;

namespace SOAPService
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();

        }

        private void btnQuit_Click(object sender, EventArgs e)
        {
            // End the application.
            Close();
        }

        private void btnWeather_Click(object sender, EventArgs e)
        {
            // Create an instance of the Weather service.
            NationalWeather.WeatherSoapClient Client =
                new NationalWeather.WeatherSoapClient();

            // Make a query to the Weather service.
            var WeatherResults = from Forecast
                                 in Client.GetWeather(txtCity.Text)
                                 select Forecast;

            // Combine the individual characters of the forecast into
            // a single string.
            txtResults.Text = "";
            foreach (Char Letter in WeatherResults)
                txtResults.Text = txtResults.Text + Letter;
        }
    }
}
