private void DesktopWindow_Closed(object sender, FormClosedEventArgs formClosedEventArgs) { Hide(); // Perform clean shutdown of the Qlik Sense process and delete the app resource. TheLocation.Hub().ShutdownProcess(); TheProcess.WaitForExit(); File.Delete(DesktopAppPath); }
/// <summary> /// Report error message, shut down engine, and exit. /// </summary> /// <param name="message">The error message to display.</param> private static void ConnectionError(string message) { MessageBox.Show("Connection failure: " + message, "Connection Error", MessageBoxButtons.OK, MessageBoxIcon.Error); if (TheProcess != null && !TheProcess.HasExited) { TheProcess.Kill(); } Environment.Exit(1); }