示例#1
0
        public MainWindow()
        {
            BrowserPreferences.SetUserAgent("Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1");
            InitializeComponent();

            browser     = BrowserFactory.Create();
            browserView = new WPFBrowserView(browser);
            mainLayout.Children.Add(browserView);

            browser.UserAgent = "Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1";

            browserView.Browser.LoadURL("kirksey.helpdocsonline.com");
        }
示例#2
0
        public DockPanel(ExternalEvent exEvent, RequestHandler handler)
        {
            LoggerProvider.Instance.LoggingEnabled     = true;
            LoggerProvider.Instance.FileLoggingEnabled = true;
            LoggerProvider.Instance.OutputFile         = "H:/DotNetBrowser.log";

            BrowserPreferences.SetUserAgent("Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1");
            BrowserPreferences.SetChromiumSwitches("--lang=en");
            InitializeComponent();
            m_ExEvent = exEvent;
            m_Handler = handler;
            //setupBrowser();

            browserView.Browser.UserAgent = "Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1";
            browserView.Browser.LoadURL("https://kirksey.helpdocsonline.com");
            //mainLayout.Children.Add((UIElement)webView.GetComponent());
            //webView.Browser.UserAgent = "Mozilla / 5.0(iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit / 603.1.30(KHTML, like Gecko) Version / 10.0 Mobile / 14E304 Safari / 602.1";
            //webView.Browser.LoadURL("https://kirksey.helpdocsonline.com");
        }