Exemplo n.º 1
0
        private static string rewriteGeneratedStub(string stub, string forKey)
        {
            switch (forKey)
            {
            case ".global":
                var appjs = NKStorage.getResource(typeof(NKC_Console), "console.js", "lib/platform");
                return("function loadplugin(){\n" + appjs + "\n}\n" + stub + "\n" + "loadplugin();" + "\n");

            default:
                return(stub);
            }
        }
Exemplo n.º 2
0
        private static string rewriteGeneratedStub(string stub, string forKey)
        {
            switch (forKey)
            {
            case ".global":
                var appjs = NKStorage.getResource(typeof(NKE_IpcMain), "ipcmain.js", "lib_electro");
                return("function loadplugin(){\n" + appjs + "\n}\n" + stub + "\n" + "loadplugin();" + "\n");

            default:
                return(stub);
            }
        }
Exemplo n.º 3
0
        private static string rewriteGeneratedStub(string stub, string forKey)
        {
            switch (forKey)
            {
            case ".global":
                var appjs = NKStorage.getResource(typeof(NKC_Process), "process.js", "lib/platform");

                // UNIQUE SCRIPT FOR PROCESS
                return("function loadplugin(){\n" + "this.process = this.process || Object.create(null);\n" + NKC_Process.syncProcessDictionary() + "\n" + appjs + "\n}\n" + stub + "\n" + "loadplugin();" + "\n");

            //              return "function loadplugin(){\n" + appjs + "\n}\n" + stub + "\n" + "loadplugin();" + "\n";
            default:
                return(stub);
            }
        }