コード例 #1
0
 public void Init()
 {
     cbxProvice.DataSource    = WeatherHelper.GetSupportProvince().ToList();
     cbxProvice.SelectedIndex = 0;
     cbxCity.DataSource       = WeatherHelper.GetSupportCity(cbxProvice.SelectedValue.ToString());
     cbxCity.SelectedIndex    = 0;
 }
コード例 #2
0
        //protected override void OnStart(string[] args)
        public void OnStart()
        {
            _City = WeatherHelper.GetSupportCity("ALL");

            int _interval = 5000;

            _timer.Interval  = _interval;
            _timer.AutoReset = true;
            _timer.Enabled   = true;
            _timer.Elapsed  += new System.Timers.ElapsedEventHandler(ActionRun);
        }
コード例 #3
0
 private void cbxProvice_SelectedIndexChanged(object sender, EventArgs e)
 {
     cbxCity.DataSource    = WeatherHelper.GetSupportCity(cbxProvice.SelectedValue.ToString());
     cbxCity.SelectedIndex = 0;
 }