コード例 #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
ファイル: WebContents.cs プロジェクト: swipswaps/WebSharp
        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
ファイル: BrowserWindow.cs プロジェクト: swipswaps/WebSharp
        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"));
        }