Beispiel #1
0
        /// <summary>
        /// Constructor with setup parameters
        /// </summary>

        public HelmWinFormsBrowserMsft(
            HelmControlMode renderMode,
            Control containingControl)
        {
            RendererMode = renderMode;

            ContainingControl = containingControl;

            if (renderMode == HelmControlMode.OffScreenSvg) // create browser control and navigate to a blank page so the Browser.Document is defined
            {
                Browser = new WebBrowser();                 // create the browser to contain the generated SVG
                Browser.ScrollBarsEnabled      = false;
                Browser.ScriptErrorsSuppressed = JavaScriptManager.SuppressJavaScriptErrors;
                Browser.ObjectForScripting     = new JavaScriptManager(this);     // create ScriptManager that can call back to this JavaScriptInterface instance from within web page JavaScript

                WindowsMessageFilter BrowserRtClickMessageFilter;                 // to catch rt-click within Scilligence Webbrowser control

                BrowserRtClickMessageFilter =
                    WindowsMessageFilter.CreateRightClickMessageFilter(Browser, BrowserControlRightMouseButtonMessageReceived);

                BrowserWrapper = new WebBrowserWrapper(Browser);
                BrowserWrapper.NavigateAndWait("about:blank");                 // create initial blank page
            }

            if (Debug)
            {
                DebugLog.Message("HelmWinFormsBrowserMsft instance created" + IdText);
            }
            return;
        }
Beispiel #2
0
        /// <summary>
        /// Constructor
        /// </summary>

        public HelmWinFormsBrowserCef(
            HelmControlMode renderMode,
            Control containingControl)
        {
            CefMx.InitializeCef();

            RendererMode = renderMode;

            if (renderMode == HelmControlMode.OffScreenSvg)
            {
                Browser = new CefSharp.WinForms.ChromiumWebBrowser(""); // Create the Chromium browser to contain the generated SVG
                Browser.FrameLoadEnd += OnFrameLoadEnd;                 // used to remove scroll bars
            }

            ContainingControl = containingControl;

            if (Debug)
            {
                DebugLog.Message("CefWinFormsMx instance created");
            }
            return;
        }
Beispiel #3
0
 public HelmWinFormsBrowser(
     HelmControlMode renderMode,
     Control containingControl) : base(renderMode, containingControl)
 {
 }