mirror of
https://github.com/finos/SymphonyElectron.git
synced 2024-11-22 08:57:00 -06:00
SDA-2526 Display uninstall confirmation dialog
This commit is contained in:
parent
5710be3e23
commit
ea1c791b1d
@ -215,6 +215,7 @@ class Script
|
||||
.Add<Symphony.ExitDlg>();
|
||||
|
||||
project.Load += project_Load;
|
||||
project.BeforeInstall += project_BeforeInstall;
|
||||
|
||||
project.Platform = Platform.x64;
|
||||
|
||||
@ -253,6 +254,25 @@ class Script
|
||||
}
|
||||
}
|
||||
|
||||
static void project_BeforeInstall(SetupEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (e.IsUninstalling)
|
||||
{
|
||||
var result = System.Windows.Forms.MessageBox.Show("Are you sure you want to uninstall this product?",
|
||||
"Windows Installer", System.Windows.Forms.MessageBoxButtons.YesNo);
|
||||
if (result != System.Windows.Forms.DialogResult.Yes)
|
||||
{
|
||||
e.Result = ActionResult.UserExit; // Signal to installer to exit
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
e.Session.Log("Error displaying uninstall confirmation dialog: " + ex.ToString() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class CustomActions
|
||||
|
Loading…
Reference in New Issue
Block a user