private void DeskBand_Load(object sender, EventArgs e) { showFrmInfo = ChDCStatMenus.Properties.Settings.Default.ShowInfoForm; TotalNetworkSpeed networkSpeed = new TotalNetworkSpeed(); networkSpeed.Start(); networkSpeed.NotityInfoEvent += NetworkSpeed_NotityInfoEvent; }
private void FrmInfo_Load(object sender, EventArgs e) { timer.Interval = 1000; timer.Elapsed += (s, e1) => this.BeginInvoke(new Action(Timer_Elapsed)); TotalNetworkSpeed networkSpeed = new TotalNetworkSpeed(timer); networkSpeed.Start(); networkSpeed.NotityInfoEvent += NetworkSpeed_NotityInfoEvent; Timer_Elapsed(); lblTime.Text = DateTime.Now.ToString("D") + " " + DateTime.Now.ToString("dddd"); lblLunisolar.Text = TimeInfo.GetChineseDateTime(DateTime.Now); }