private static borrowSearch _instance = null; // 单例模式 public static borrowSearch CreateInstance() { if (_instance == null) { _instance = new borrowSearch(); } return(_instance); }
private void borrowSearch_available_FormClosing(object sender, FormClosingEventArgs e) { borrowID = -1; _instance = null; this.Dispose(); }