private void Form1_FormClosing(object sender, FormClosingEventArgs e) { Save_user_settings(); Cef.Shutdown(); }
private void ExitMenuItemClick(object sender, EventArgs e) { browser.Dispose(); Cef.Shutdown(); Close(); }
private void BtnExit_Click(object sender, EventArgs e) { Cef.Shutdown(); Environment.Exit(0); }
public static void Shutdown() { Cef.Shutdown(); IsInitialized = false; }
/// <summary> /// Handles the <see cref="E:ApplicationExit" /> event. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param> private static void OnApplicationExit(object sender, EventArgs e) { Cef.Shutdown(); }
protected override void OnClosed(EventArgs e) { Cef.Shutdown(); this.SubCount.localServer.Close(); base.OnClosed(e); }
private void MainForm_FormClosed(object sender, FormClosedEventArgs e) { Cef.Shutdown(); }
private void Form1_FormClosing(object sender, FormClosingEventArgs e) { //Be sure to shut the browser down before the app fully closes Cef.Shutdown(); }
private void CefShutdown() { _isCefShutdown = true; Cef.Shutdown(); }
private void Application_ApplicationExit(object sender, EventArgs e) { Cef.Shutdown(); }
public static void CleanupEnvironment() { Cef.Shutdown(); }
private void OnClosed(object sender, System.Windows.Forms.FormClosedEventArgs e) { _browser.Dispose(); Cef.Shutdown(); }
private void BroLauncher_FormClosing(object sender, FormClosingEventArgs e) { this.SaveUsers(); FavListSave(); Cef.Shutdown(); }
public void Close() { Cef.Shutdown(); }
public static void Main() { try { var settings = new CefSettings { CachePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "cache"), IgnoreCertificateErrors = true, LogSeverity = LogSeverity.Disable, PersistUserPreferences = true, WindowlessRenderingEnabled = true, PersistSessionCookies = true }; settings.CefCommandLineArgs.Add("ignore-certificate-errors"); // settings.CefCommandLineArgs.Add("no-proxy-server"); // settings.CefCommandLineArgs.Add("disable-web-security"); settings.CefCommandLineArgs.Add("allow-universal-access-from-files"); settings.CefCommandLineArgs.Add("disable-extensions"); settings.CefCommandLineArgs.Add("disable-plugins"); settings.CefCommandLineArgs.Add("disable-pdf-extension"); settings.CefCommandLineArgs.Add("disable-spell-checking"); settings.CefCommandLineArgs.Add("disable-gpu"); settings.CefCommandLineArgs.Add("disable-gpu-vsync"); settings.DisableGpuAcceleration(); /*settings.RegisterScheme(new CefCustomScheme * { * SchemeName = "vrcx", * DomainName = "app", * SchemeHandlerFactory = new FolderSchemeHandlerFactory(Application.StartupPath + "/../../../html") * });*/ // MUST TURN ON (Error when creating a browser on certain systems.) CefSharpSettings.WcfEnabled = true; CefSharpSettings.ShutdownOnExit = false; CefSharpSettings.SubprocessExitIfParentProcessClosed = true; Cef.EnableHighDPISupport(); if (Cef.Initialize(settings, true, browserProcessHandler: null)) { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); VRCXStorage.Load(); SQLite.Init(); CpuMonitor.Init(); Discord.Init(); LogWatcher.Init(); VRCXVR.Init(); Application.Run(new MainForm()); VRCXVR.Exit(); LogWatcher.Exit(); Discord.Exit(); CpuMonitor.Exit(); SQLite.Exit(); VRCXStorage.Save(); Cef.Shutdown(); } } catch (Exception ex) { MessageBox.Show($"{ex.Message}\n{ex.StackTrace}", "PLEASE REPORT TO PYPY", MessageBoxButtons.OK, MessageBoxIcon.Error); Environment.Exit(0); } }
private void Form1_FormClosing(object sender, FormClosingEventArgs e) { Cef.Shutdown(); Application.Exit(); }
public static void Shutdown() { Cef.Shutdown(); }
protected override void OnExit(ExitEventArgs e) { Cef.Shutdown(); base.OnExit(e); }
public void Dispose() { browser.Dispose(); Cef.Shutdown(); }
protected override void OnFormClosing(FormClosingEventArgs e) { base.OnFormClosing(e); Cef.Shutdown(); }
public void Dispose() { Cef.Shutdown(); }
private void VideoPlayer_FormClosing(object sender, FormClosingEventArgs e) { Cef.Shutdown(); }
private void Form1_FormClosed(object sender, FormClosedEventArgs e) { Cef.Shutdown(); exeProcess.Kill(); }
private void Window_Closing_1(object sender, CancelEventArgs e) { this.Hide(); Cef.Shutdown(); }
private void FormTestJsCommunication_FormClosing(object sender, FormClosingEventArgs e) { Cef.Shutdown(); }
public static int Main(string[] args) { System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("es-419"); Application.ThreadException += new ExceptionHandler().ApplicationThreadException; AppDomain.CurrentDomain.UnhandledException += new ExceptionHandler().DomainUnhandledException; InitiateLogging(); Cef.EnableHighDPISupport(); //NOTE: Using a simple sub processes uses your existing application executable to spawn instances of the sub process. //Features like JSB, EvaluateScriptAsync, custom schemes require the CefSharp.BrowserSubprocess to function int exitCode = Cef.ExecuteProcess(); if (exitCode >= 0) { return(exitCode); } //var browser = new BrowserForm(multiThreadedMessageLoop); //var browser = new SimpleBrowserForm(); //var browser = new TabulationDemoForm(); //var browser = new ToolbarFormBrowser(); FormTabbedMDIBrowser browser = new FormTabbedMDIBrowser(); IBrowserProcessHandler browserProcessHandler; if (multiThreadedMessageLoop) { browserProcessHandler = new BrowserProcessHandler(); } else { //Get the current taskScheduler (must be called after the form is created) TaskScheduler scheduler = TaskScheduler.FromCurrentSynchronizationContext(); browserProcessHandler = new WinFormsBrowserProcessHandler(scheduler); } // cache path //To get the location the assembly normally resides on disk or the install directory string path = System.Reflection.Assembly.GetExecutingAssembly().CodeBase; string directory = Path.GetDirectoryName(path); string localpath = new Uri(directory).LocalPath; if (!Directory.Exists(localpath)) { Directory.CreateDirectory(localpath); } // need to make default/first cache folder localpath += "\\cachetab1"; if (!Directory.Exists(localpath)) { Directory.CreateDirectory(localpath); } CefSettings cefsetting = new CefSettings { MultiThreadedMessageLoop = multiThreadedMessageLoop, ExternalMessagePump = !multiThreadedMessageLoop, AcceptLanguageList = "es-419, es;q=0.8", Locale = "es", IgnoreCertificateErrors = true, UserAgent = userAgentWin10, CachePath = localpath, }; #if DEBUG cefsetting.LogSeverity = LogSeverity.Verbose; LogInfo("Running .exe Debug Version"); #else cefsetting.LogSeverity = LogSeverity.Error; #endif Cef.Initialize(cefsetting, true, browserProcessHandler: browserProcessHandler); Thread.Sleep(3000); //time to start Cef Application.Run(browser); LogInfo("shutdown..."); //Shutdown before your application exists or it will hang. Cef.Shutdown(); // save user settings Properties.User.Default.Save(); // close pending threats Environment.Exit(Environment.ExitCode); return(0); }
protected override void OnClosed(EventArgs e) { Cef.Shutdown(); base.OnClosed(e); }
internal void Exit() { Cef.Shutdown(); }
private void Form1_FormClosing(object sender, FormClosingEventArgs e) { Cef.Shutdown(); }
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) { notifyIcon.Visible = false; Cef.Shutdown(); Environment.Exit(0); }