/// <summary> /// 退出软件发生 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void FormMain_FormClosing(object sender, FormClosingEventArgs e) { if (connDev) { api.DisconnectUsbDev(); } Configs.Save(); Application.Exit(); }