//在MainForm中输出一下
private void MainForm_Load(object sender, EventArgs e)
{this.toolStripStatusLabel1.Text = DateTime.Now.ToString("当前用户:admin,系统当前时间:yyyy年MM月dd日 HH:mm:ss");
this.timer1.Start();//时间空间启动
}
//Timer控件Tick事件
private void timer1_Tick(object sender, EventArgs e)
{
//获取系统当前时间,格式化后,显示到Label中
this.toolStripStatusLabel1.Text = DateTime.Now.ToString("当前用户:admin,系统当前时间:yyyy年MM月dd日 HH:mm:ss");
}