2020-09-28 05:43:41 -05:00
|
|
|
using WixSharp;
|
|
|
|
|
|
|
|
namespace Symphony
|
|
|
|
{
|
2020-10-26 07:17:05 -05:00
|
|
|
public partial class MaintenanceDialog : WixSharp.UI.Forms.ManagedForm, IManagedDialog
|
2020-09-28 05:43:41 -05:00
|
|
|
{
|
2020-10-26 07:17:05 -05:00
|
|
|
public MaintenanceDialog()
|
2020-09-28 05:43:41 -05:00
|
|
|
{
|
|
|
|
InitializeComponent();
|
|
|
|
}
|
|
|
|
|
2020-10-30 03:09:17 -05:00
|
|
|
private void MaintenanceDialog_Shown(object sender, System.EventArgs e)
|
2020-09-28 05:43:41 -05:00
|
|
|
{
|
2020-10-30 03:09:17 -05:00
|
|
|
// Detect if Symphony is running
|
2022-11-11 01:51:46 -06:00
|
|
|
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-26 02:46:07 -05:00
|
|
|
{
|
2020-10-30 03:09:17 -05:00
|
|
|
// If it is not running, proceed to progress dialog
|
|
|
|
Shell.GoTo<Symphony.ProgressDialog>();
|
2020-10-26 02:46:07 -05:00
|
|
|
}
|
2020-09-28 05:43:41 -05:00
|
|
|
}
|
2020-10-30 03:09:17 -05:00
|
|
|
|
2020-09-28 05:43:41 -05:00
|
|
|
}
|
|
|
|
}
|