Exemplo n.º 1
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            timer.Tick                 += timer_Tick;
            timer.Interval              = 1000;
            timer_weatherQuery.Tick    += timer_weatherQuery_Tick;
            timer_weatherQuery.Interval = 1800000;
            timer_weatherQuery.Start();

            timer_check.Tick    += timer_check_Tick;
            timer_check.Interval = 60000;
            //按比例调节各空间位置和大小
            XProportion = (double)this.Size.Width / (double)1366;
            YProportion = (double)this.Size.Height / (double)768;
            operation.ChangeWindowsSize(this, XProportion, YProportion);
            //获取天气
            WeatherUpdate.LB_NetState  = this.LB_NetState;
            WeatherUpdate.LB_Tem       = this.LB_Tem;
            WeatherUpdate.LB_Weather   = this.LB_Weather;
            WeatherUpdate.LB_WindPower = this.LB_WindPower;
            WeatherUpdate.Pic_Weather  = this.Pic_Weather;
            WeatherUpdate.readWeatherDetail();
        }