Example #1
0
        public static async Task SetApplicationMenu(Menu menu)
        {
            if (scriptProxy == null)
            {
                scriptProxy = new NodeObjectProxy(menuScriptProxy, menuRequires);
            }

            await scriptProxy.GetProxyObject("Menu.setApplicationMenu", menu);
        }
Example #2
0
        public static async Task <ScriptObjectCollection <WebContents> > GetAllWebContents()
        {
            if (scriptProxy == null)
            {
                scriptProxy = new NodeObjectProxy(wcScriptProxy, wcRequires);
            }

            await scriptProxy.GetProxyObject("WebContents");

            var scriptObject = new ScriptObject();

            scriptObject.ScriptObjectProxy = scriptProxy;
            return(await scriptObject.Invoke <ScriptObjectCollection <WebContents> >("getAllWebContents"));
        }
Example #3
0
        public static async Task <ScriptObjectCollection <BrowserWindow> > GetAllWindows()
        {
            if (scriptProxy == null)
            {
                scriptProxy = new NodeObjectProxy(bwScriptProxy, bwRequires);
            }

            await scriptProxy.GetProxyObject("BrowserWindow");

            var scriptObject = new ScriptObject();

            scriptObject.ScriptObjectProxy = scriptProxy;
            return(await scriptObject.Invoke <ScriptObjectCollection <BrowserWindow> >("getAllWindows"));
        }