//创建窗体对象的静态方法 public static AddPramas InstanceObject() { if (_instance == null) { _instance = new AddPramas(); } return(_instance); }
//窗体关闭事件 private void AddPramas_FormClosing(object sender, FormClosingEventArgs e) { _instance = null; }