// 关闭窗口 private void NetDebugForm_FormClosing(object sender, FormClosingEventArgs e) { //MessageBox.Show("本地IP地址输入错误,请重新输入!", "警告"); NetDebugForm netDebugger = NetDebugForm.getInstance(); netDebugger.Hide(); e.Cancel = true; }
public static NetDebugForm getInstance() { lock (padlock) { if (instance == null) { instance = new NetDebugForm(); } return(instance); } }