public MainWindow() { InitializeComponent(); /* * * If DevTools are not required, this can be configured */ var settings = new CefSharp.Settings { PackLoadingDisabled = false, }; if (!CEF.Initialize(settings)) { MessageBox.Show("Could not initialize CEF"); } else { var webView = new WebView(); webView.Height = 0; webView.Width = 0; mainPanel.Children.Add(webView); } }
public MainWindow() { InitializeComponent(); this.DataContext = new MainViewModel(new FileDialogService(), Viewport, RotatorX, RotatorY, RotatorZ, ScaleXYZ, config); FracktoryWindow.Loaded += new RoutedEventHandler(win_Loaded); FracktoryWindow.SourceInitialized += new EventHandler(win_SourceInitialized); CefSharp.Settings settings = new CefSharp.Settings(); CefSharp.BrowserSettings browserSettings = new BrowserSettings(); browserSettings.FileAccessFromFileUrlsAllowed = true; browserSettings.UniversalAccessFromFileUrlsAllowed = true; browserSettings.TextAreaResizeDisabled = true; settings.PackLoadingDisabled = true; if (CEF.Initialize(settings)) { CefSharp.Wpf.WebView web_view = new CefSharp.Wpf.WebView(AssemblyDirectory + @"/gCodeViewer/index.html", browserSettings); grid1.Children.Add(web_view); //730 x 460 // web_view.Address = "file:///E:/Fracktal/gCodeViewer-master2/index.html"; } //Uri uri = new Uri(@"pack://application:,,,/gCodeViewer/index.html"); //Stream source = Application.GetContentStream(uri).Stream; //wbMain.NavigateToStream(source); }
public static void Init() { CefSharp.Settings settings = new CefSharp.Settings(); if (CEF.Initialize(settings)) { CEF.RegisterScheme("theme", new ThemeSchemeHandlerFactory()); //CEF.RegisterScheme("test", new SchemeHandlerFactory()); //CEF.RegisterJsObject("bound", new BoundObject()); } }
public virtual void InitControl() { var settings = new CefSharp.Settings(); string currentPath = Application.StartupPath; settings.AddPluginPath(currentPath + @"\NPSWF32.dll"); if (!CEF.IsInitialized) { CEF.Initialize(settings); } LoadBrowser(); }
public static void Init(IEventAggregator eventAggregator) { CefSharp.Settings settings = new CefSharp.Settings(); if (CEF.Initialize(settings)) { CEF.RegisterScheme("theme", new ThemeSchemeHandlerFactory()); //CEF.RegisterScheme("test", new SchemeHandlerFactory()); //CEF.RegisterJsObject("bound", new BoundObject()); CEF.RegisterScheme("md", new MarkdownHandlerFactory(eventAggregator, () => DocDirectory)); //CEF.RegisterJsObject("MDLink", new MDLink()); } }
public static void Init(IEventAggregator eventAggregator) { CefSharp.Settings settings = new CefSharp.Settings(); if (CEF.Initialize(settings)) { CEF.RegisterScheme("theme", new ThemeSchemeHandlerFactory()); //CEF.RegisterScheme("test", new SchemeHandlerFactory()); //CEF.RegisterJsObject("bound", new BoundObject()); CEF.RegisterScheme("md", new MarkdownHandlerFactory(eventAggregator,() => DocDirectory )); //CEF.RegisterJsObject("MDLink", new MDLink()); } }
public static void InitializeChromiumEmbedded() { _isCefInitialized = true; var settings = new CefSharp.Settings { PackLoadingDisabled = false, }; if (!CEF.Initialize(settings)) { throw new Exception("Could not initialize CEF"); } }
private void InitChrome() { var settings = new CefSharp.Settings { PackLoadingDisabled = true, }; if (CEF.Initialize(settings)) { _webView = new WebView(); _webView.Loaded += _webView_Loaded; gridBrowser.Children.Add(_webView); } }
public static void Main() { if (!System.Diagnostics.Debugger.IsAttached) { Application.SetUnhandledExceptionMode(UnhandledExceptionMode.ThrowException); AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); } CefSharp.Settings settings = new CefSharp.Settings(); settings.CachePath = string.Empty; CEF.Initialize(settings); Application.ApplicationExit += Application_ApplicationExit; Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new MainForm()); }
public MessageRendererWebBrowserChrome() { var settings = new CefSharp.Settings { PackLoadingDisabled = true, }; if (CEF.Initialize(settings)) { InitializeComponent(); } else { Console.Out.WriteLine("CANNOT INITIALIZE"); } }
/// <summary> /// //Set Borwser Settings /// </summary> public void SetURl() { var settings = new CefSharp.Settings { PackLoadingDisabled = true, }; Settings.Default.IsNetwork = isNetworkAvailable.ToString(); Settings.Default.Save(); if (ConfigurationManager.AppSettings["DeploymentType"] == "L") { strAddress = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), Globals.ProductName, strCurrentVersion, ((Globals.ProductName == "GearHead Connect") ? "GearHeadConnect" : Globals.ProductName) + "Offline\\index.html"); } else { strAddress = ConfigurationManager.AppSettings["LocalUrl"]; } BrowserSettings browserSettings = new BrowserSettings(); browserSettings.FileAccessFromFileUrlsAllowed = true; browserSettings.UniversalAccessFromFileUrlsAllowed = true; browserSettings.TextAreaResizeDisabled = true; if (CEF.Initialize(settings)) { chromiumBrowser = new WebView(strAddress, browserSettings); } //chromiumBrowser.Address = strAddress; chromiumBrowser.Dock = DockStyle.Fill; chromiumBrowser.RegisterJsObject("external", this); chromiumBrowser.LoadCompleted += new LoadCompletedEventHandler(onLoadCompleted); uxWebBrowserPannel.Controls.Add(chromiumBrowser); //renderChromiumBrowser(chromiumBrowser, strAddress); }
public BrowserForm() { InitializeComponent(); var CefSettings = new CefSharp.Settings() { PackLoadingDisabled = true }; do { CefSharp.CEF.Initialize(CefSettings); } while (!CefSharp.CEF.IsInitialized); webView = new WebView("https://trello.com/board/kinect-development/508d9bbfb3b2cd791f005e32", new BrowserSettings()); webView.Dock = DockStyle.Fill; browserContainer.ContentPanel.Controls.Add(webView); kinectControl = new KinectControl(this); }
public MainWindow() { InitializeComponent(); var settings = new CefSharp.Settings { PackLoadingDisabled = true, }; if (CEF.Initialize(settings)) { BrowserSettings browserSettings = new BrowserSettings(); browserSettings.FileAccessFromFileUrlsAllowed = true; browserSettings.UniversalAccessFromFileUrlsAllowed = true; browserSettings.TextAreaResizeDisabled = true; this.webView = new WebView(Application.StartupPath + @"\res\www\index.html", browserSettings); this.webView.Dock = DockStyle.Fill; this.toolStripContainer.ContentPanel.Controls.Add(webView); } }