/// <summary> /// Quit application. /// </summary> public static void Quit() { // don't show shutdown question message _continueQuitting = true; // show shutdown notify Javascript.Run("showShutdownMessage();"); // save configuration SMCConfiguration.Save(); // shutdown application from thread var wait = new Thread(() => { // shutdown working downloader Instance.SMCDownloader.ShutDownDownloader(); // wait Thread.Sleep(800); // shutdown application Instance.Invoke((MethodInvoker) delegate { Instance.Hide(); Browser.Dispose(); Cef.Shutdown(); Process.GetCurrentProcess().Kill(); }); }); wait.Start(); }
private void SaveLaunchOptions() { SMCConfiguration.Loaded.UserName = textBoxUsername.Text; if (int.TryParse(textBoxRam.Text, out var ram)) { SMCConfiguration.Loaded.UserRAM = ram; } SMCConfiguration.Save(); }