protected override void OnFormClosing(FormClosingEventArgs e)//重载关闭函数
{
if (e.CloseReason == CloseReason.UserClosing)
{
e.Cancel = true;
this.WindowState = System.Windows.Forms.FormWindowState.Minimized;
this.Hide();
}
{
if (e.CloseReason == CloseReason.UserClosing)
{
e.Cancel = true;
this.WindowState = System.Windows.Forms.FormWindowState.Minimized;
this.Hide();
}