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

            await scriptProxy.GetProxyObject("Menu.setApplicationMenu", menu);
        }
Пример #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"));
        }
Пример #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"));
        }