/// <summary> /// esc关闭窗体 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void frmCommonUsePanel_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e) { switch (e.KeyCode) { case Keys.Escape: //释放对象 objController = null; this.Close(); break; } }
public frmCommonUsePanel() { // This call is required by the Windows Form Designer. InitializeComponent(); // TODO: Add any initialization after the InitializeComponent call //设置Controller objController = new clsCommonUsePanelController(this); // }