SymphonyElectron/installer/win/WixSharpInstaller/MaintenanceDialog.cs
Robin Westberg 8a7d5c0fcf
SDA-3770 Add support for optional symphony-c9-shell (#1446)
* Add support for optional symphony-c9-shell
2022-07-05 09:43:35 +02:00

29 lines
884 B
C#

using WixSharp;
namespace Symphony
{
public partial class MaintenanceDialog : WixSharp.UI.Forms.ManagedForm, IManagedDialog
{
public MaintenanceDialog()
{
InitializeComponent();
}
private void MaintenanceDialog_Shown(object sender, System.EventArgs e)
{
// Detect if Symphony is running
bool isRunning = (System.Diagnostics.Process.GetProcessesByName("Symphony").Length > 1 || System.Diagnostics.Process.GetProcessesByName("C9Shell").Length >= 1);
if (isRunning)
{
// If it is running, continue to the "Close Symphony" screen
Shell.GoNext();
}
else
{
// If it is not running, proceed to progress dialog
Shell.GoTo<Symphony.ProgressDialog>();
}
}
}
}