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


C# WebView.FocusView方法代码示例

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


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

示例1: InitializeView

        private void InitializeView(WebView view)
        {
            if (view == null)
                return;

            _aweWebView = view;

            _aweWebView.CursorChanged += OnCursorChanged;
            _aweWebView.AddressChanged += OnAddressChanged;

            _aweWebView.ShowCreatedWebView += OnShowNewView;
            _aweWebView.Crashed += OnCrashed;
            _aweWebView.DocumentReady += OnDocumentReady;

            // Load a URL, if this is not a child view.
            if (_aweWebView.ParentView == null)
            {
                if(Settings.FoEServer=="Default")
                    _aweWebView.Source = new Uri("http://www.forgeofempires.com");
                else
                    _aweWebView.Source = new Uri("http://" + Settings.FoEServer);
            }

            if(WebCore.IsRunning)
                WebCore.ResourceInterceptor = new FoEResourceInterceptor();

            // Give focus to the view.
            _aweWebView.FocusView();

            _needsResize = true;
            ResizeView();
        }
开发者ID:Rassilion,项目名称:Denemeler,代码行数:32,代码来源:MainForm.cs

示例2: InitializeView

        private void InitializeView(WebView view)
        {
            if (view == null)
                return;

            // Create an image surface to render the
            // WebView's pixel buffer.
            surface = new ImageSurface();
            surface.Updated += OnSurfaceUpdated;

            webView = view;

            // Assign our surface.
            webView.Surface = surface;

            // Handle some important events.
            webView.CursorChanged += OnCursorChanged;
            //webView.TitleChanged += OnTitleChanged;

            bindingSource = new BindingSource() { DataSource = webView };
            this.DataBindings.Add(new Binding("Text", bindingSource, "Title", true));

            //webView.AddressChanged += OnAddressChanged;
            //webView.ShowCreatedWebView += OnShowNewView;
            //webView.Crashed += OnCrashed;

            // Load a URL, if this is not a child view.
            if (webView.ParentView == null)
                // Tip: /ncr = No Country Redirect ;-)
                webView.Source = new Uri("http://www.forgeofempires.com/");

            // Give focus to the view.
            webView.FocusView();
        }
开发者ID:Rassilion,项目名称:Denemeler,代码行数:34,代码来源:ChildForm.cs

示例3: InitializeView

        private void InitializeView( WebView view, bool isChild = false, Uri targetURL = null )
        {
            if ( view == null )
                return;

            // Create an image surface to render the
            // WebView's pixel buffer.
            surface = new ImageSurface();
            surface.Updated += OnSurfaceUpdated;

            webView = view;

            // Assign our surface.
            webView.Surface = surface;

            if ( !isChild )
                webView.Source = targetURL ?? new Uri( "http://www.google.com/ncr" );

            // Give focus to the view.
            webView.FocusView();
        }
开发者ID:linchihwen,项目名称:WebViewBenchmark,代码行数:21,代码来源:MainForm.cs

示例4: InitializeView

        private void InitializeView( WebView view )
        {
            if ( view == null )
                return;

            // Create an image surface to render the
            // WebView's pixel buffer.
            surface = new ImageSurface();
            surface.Updated += OnSurfaceUpdated;

            webView = view;
            // Assign our surface.
            webView.Surface = surface;

            // Handle some important events.
            webView.CursorChanged += OnCursorChanged;
            webView.TitleChanged += OnTitleChanged;
            webView.DocumentReady += OnDocumentReady;
            webView.ShowCreatedWebView += OnShowNewView;
            webView.Crashed += OnCrashed;

            // Load a URL, if this is not a child view.
            if ( webView.Parent == null )
                webView.LoadHTML( "<h1>Opening a popup window...</h1>" );

            // Give focus to the view.
            webView.FocusView();
        }
开发者ID:MichielDeMey,项目名称:Kolibrie-Mail,代码行数:28,代码来源:WebForm.cs


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