Beispiel #1
0
        /// <summary>
        /// 显示开发者调试工具
        /// </summary>
        public void ShowDevTools()
        {
            var windowInfo = new CfxWindowInfo();

            windowInfo.Style        = WindowStyle.WS_OVERLAPPEDWINDOW | WindowStyle.WS_CLIPCHILDREN | WindowStyle.WS_CLIPSIBLINGS | WindowStyle.WS_VISIBLE;
            windowInfo.ParentWindow = IntPtr.Zero;
            windowInfo.WindowName   = "开发者工具栏";
            windowInfo.X            = 200;
            windowInfo.Y            = 200;
            windowInfo.Width        = 800;
            windowInfo.Height       = 600;
            _currentHost?.ShowDevTools(windowInfo, new CfxClient(), new CfxBrowserSettings(), null);
        }
        private void DisplayDebug()
        {
            const WindowStyle style = WindowStyle.WS_OVERLAPPEDWINDOW | WindowStyle.WS_CLIPCHILDREN |
                                      WindowStyle.WS_CLIPSIBLINGS | WindowStyle.WS_VISIBLE;
            var cfxWindowInfo = new CfxWindowInfo
            {
                Style        = style,
                ParentWindow = IntPtr.Zero,
                WindowName   = "Neutronium Chromium Dev Tools",
                X            = 200,
                Y            = 200,
                Width        = 800,
                Height       = 600
            };

            _DebugCfxClient = new CfxClient();
            _DebugCfxClient.GetDisplayHandler  += _DebugCfxClient_GetDisplayHandler;
            _DebugCfxClient.GetLifeSpanHandler += DebugClient_GetLifeSpanHandler;
            _BrowserHost.ShowDevTools(cfxWindowInfo, _DebugCfxClient, new CfxBrowserSettings(), null);
        }