SymphonyElectron/installer/win/WixSharpInstaller/MaintenanceDialog.cs

29 lines
810 B
C#
Raw Normal View History

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