예제 #1
0
        private void linkSetup_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            using (SetupForm f = new SetupForm())
            {
                f.CurrentLocation = currentLocation;
                f.ShowDialog();
                currentLocation = f.CurrentLocation;
            }

            renderWeather(Weather.Parse(getWeather(currentLocation)));
        }
예제 #2
0
        public WeatherForm()
        {
            InitializeComponent();

            forecast = new List <ForecastCtrl>
            {
                forecastCtrl1, forecastCtrl2
            };

            loadConfig();
            renderWeather(Weather.Parse(getWeather(currentLocation)));
        }
예제 #3
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            Debug.WriteLine("Timer event...");

            if (currentLocation == null)
            {
                timer1.Stop();
            }
            else
            {
                renderWeather(Weather.Parse(getWeather(currentLocation)));
            }
        }