Beispiel #1
0
        public static frmOfflineScriptEditor OpenSharedScriptInScriptEditor(SharedScriptsItemData itemData)
        {
            string caption = String.Empty;
            string script  = String.Empty;

            if (itemData == null)
            {
                throw new NullParameterException("ItemData is null!");
            }

            caption = itemData.Name + "{Shared script}";
            script  = itemData.Script;

            frmOfflineScriptEditor frm = new frmOfflineScriptEditor();

            frm.Icon                 = PragmaSQL.Properties.Resources.sharedScript;
            frm.ContentProvider      = new SharedScriptContentProvider();
            frm.ContentProvider.Data = itemData;
            frm.ContentProvider.Hint = "This is a shared script: " + itemData.Name;
            frm.ContentInfo          = frm.ContentProvider.Hint;

            frm.ContentProvider.ContentName = itemData.Name;
            frm.InitializeScriptEditor(caption, script, DBObjectType.None);
            return(frm);
        }
Beispiel #2
0
        public static frmOfflineScriptEditor CreateScriptEditor(string caption, string script, int objType)
        {
            frmOfflineScriptEditor frm = new frmOfflineScriptEditor();

            frm.InitializeScriptEditor(caption, script, objType);
            return(frm);
        }