当前位置: 首页>>代码示例>>C#>>正文


C# IWebBrowser.Load方法代码示例

本文整理汇总了C#中IWebBrowser.Load方法的典型用法代码示例。如果您正苦于以下问题:C# IWebBrowser.Load方法的具体用法?C# IWebBrowser.Load怎么用?C# IWebBrowser.Load使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IWebBrowser的用法示例。


在下文中一共展示了IWebBrowser.Load方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OnBeforePopup

        public bool OnBeforePopup(IWebBrowser rpBrowserControl, IBlinkBrowser rpBrowser, IFrame rpFrame, string rpTargetUrl, string rpTargetFrameName, WindowOpenDisposition rpTargetDisposition, bool rpUserGesture, IPopupFeatures rpPopupFeatures, IWindowInfo rpWindowInfo, IBrowserSettings rpBrowserSettings, ref bool rrpNoJavascriptAccess, out IWebBrowser ropNewBrowser)
        {
            rpBrowserControl.Load(rpTargetUrl);

            ropNewBrowser = rpBrowserControl;
            return true;
        }
开发者ID:amatukaze,项目名称:HeavenlyWind.Browser.Blink,代码行数:7,代码来源:BlinkLifeSpanHandler.cs

示例2: OnBeforeBrowse

        /*
         * Handler for the browser on before browse event.
         */
        public bool OnBeforeBrowse(IWebBrowser browser, IRequest request, bool isRedirect) {
            // Disable browser forward/back navigation with keyboard keys
            if((request.TransitionType & TransitionType.ForwardBack) != 0) {
                return true;
            }

            // Let the Chromium web browser handle any internal link
            if(InternalLinkKeywords.Any(request.Url.Contains)) {
                return false;
            }

            // Load the active team address instead of the default sign-in page
            if(request.Url.Equals(SignInUrl)) {
                browser.Load(Program.ActiveTeamAddress);
                return true;
            }

            // Let the Chromium web browser handle the event
            return false;
        }
开发者ID:bewbaloo,项目名称:SlackUI,代码行数:23,代码来源:BrowserRequestHandler.cs

示例3: LoadPageAsync

        public static Task LoadPageAsync(IWebBrowser browser, string address = null)
        {
            var tcs = new TaskCompletionSource<bool>();

            EventHandler<LoadingStateChangedEventArgs> handler = null;
            handler = (sender, args) =>
            {
                //Wait for while page to finish loading not just the first frame
                if (!args.IsLoading)
                {
                    browser.LoadingStateChanged -= handler;
                    tcs.TrySetResult(true);
                }
            };

            browser.LoadingStateChanged += handler;

            if (!string.IsNullOrEmpty(address))
            {
                browser.Load(address);
            }
            return tcs.Task;
        }
开发者ID:klkn,项目名称:CefSharp,代码行数:23,代码来源:Program.cs

示例4: ShowErrorPage

 static void ShowErrorPage(IWebBrowser browser, string pageUri)
 {
         var path = FileHelper.GetFullPath(pageUri);
         browser.Load(path);
 }
开发者ID:Robin--,项目名称:Warewolf,代码行数:5,代码来源:BrowserHandler.cs

示例5:

 void IRequestHandler.OnRenderProcessTerminated(IWebBrowser browserControl, IBrowser browser, CefTerminationStatus status)
 {
     // TODO: Add your own code here for handling scenarios where the Render Process terminated for one reason or another.
     browserControl.Load(CefExample.RenderProcessCrashedUrl);
 }
开发者ID:haozhouxu,项目名称:CefSharp,代码行数:5,代码来源:RequestHandler.cs

示例6: LoadPageAsync

        public static Task LoadPageAsync(IWebBrowser browser, string address = null)
        {
            //If using .Net 4.6 then use TaskCreationOptions.RunContinuationsAsynchronously
            //and switch to tcs.TrySetResult below - no need for the custom extension method
            var tcs = new TaskCompletionSource<bool>();

            EventHandler<LoadingStateChangedEventArgs> handler = null;
            handler = (sender, args) =>
            {
                //Wait for while page to finish loading not just the first frame
                if (!args.IsLoading)
                {
                    browser.LoadingStateChanged -= handler;
                    //This is required when using a standard TaskCompletionSource
                    //Extension method found in the CefSharp.Internals namespace
                    tcs.TrySetResultAsync(true);
                }
            };

            browser.LoadingStateChanged += handler;

            if (!string.IsNullOrEmpty(address))
            {
                browser.Load(address);
            }
            return tcs.Task;
        }
开发者ID:cefsharp,项目名称:CefSharp,代码行数:27,代码来源:Program.cs


注:本文中的IWebBrowser.Load方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。