public static ConDbForm GetInstance(ScriptForm parent) { //判断是否存在该窗体,或时候该字窗体是否被释放过,如果不存在该窗体,则 new 一个新窗体 if (_instance == null || _instance.IsDisposed) { _instance = new ConDbForm(parent); } return(_instance); }
private ConDbForm(ScriptForm parent) { this.parent = parent; //速度太慢,注释掉 //dataSourceList = SqlLocator.GetLocalSqlServerNamesWithSqlClientFactory(); cbFlag = false; InitializeComponent(); init(); }