Ejemplo n.º 1
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            mf.GetWeather(recievedValueCity);
            double temp = double.Parse(mf.weather[0].temperature) - 273.16;

            WeatherLabel.Text = temp.ToString("N1") + "C";

            getNewsFirstRow("http://feeds.bbci.co.uk/news/world/rss.xml");
            getNewsSecondRow("http://feeds.bbci.co.uk/sport/0/cricket/rss.xml?edition=uk");
            labelSource.Text   = "BBC:";
            labelCategory.Text = "Cricket:";
        }
Ejemplo n.º 2
0
        private void comboBoxCities_SelectedIndexChanged(object sender, EventArgs e)
        {
            string valuePass = Convert.ToString(comboBoxCities.Text);

            if (valuePass != null)
            {
                m1.labelCity.Text    = valuePass;
                m1.recievedValueCity = valuePass;
                mf.GetWeather(valuePass);
                double temp = double.Parse(mf.weather[0].temperature) - 273.16;
                m1.WeatherLabel.Text = temp.ToString("N1") + "C";
            }
        }