internal static frmScriptEditor CreateWithAsyncConnection(string caption, string script, ConnectionParams cp, string initialCatalog, string filePath) { if (cp == null) { throw new NullParameterException("ConnectionParams paremeter is null!"); } frmScriptEditor frm = new frmScriptEditor(); frm.InitializeScriptEditorWithAsyncConnection(caption, script, -1, -1, cp, initialCatalog, false); if (!String.IsNullOrEmpty(filePath)) { frm.SetFilePath(filePath); } return(frm); }
internal static frmScriptEditor Create(string caption, string script, long objectId, int objectType, ConnectionParams cp, string dBName, string filePath) { if (cp == null) { throw new NullParameterException("ConnectionParams paremeter is null!"); } frmScriptEditor frm = null; string windowId = ScriptEditorManager.ProduceWindowId(caption, objectId, objectType, cp.Server, dBName); frm = CheckEditorAlreadyExits(windowId, caption, script); if (frm != null) { return(frm); } frm = new frmScriptEditor(); frm.InitializeScriptEditor(caption, script, objectId, objectType, cp, dBName); if (!String.IsNullOrEmpty(filePath)) { frm.SetFilePath(filePath); } return(frm); }