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