CP-31587 added comfirmation dialog to manageupdates page

Signed-off-by: Christophe25 <christopher.lancaste1@citrix.com>
This commit is contained in:
Christophe25 2022-01-18 14:09:33 +00:00 committed by Konstantina Chremmou
parent 755411a970
commit d8b1d5737d
2 changed files with 10 additions and 4 deletions

View File

@ -980,8 +980,16 @@ namespace XenAdmin.TabPages
var downloadAndInstallClientAction = new DownloadAndUpdateClientAction(alert.Name, new Uri(alert.NewVersion.Url), Path.Combine(Path.GetTempPath(), $"{alert.Name}.msi"), true, alert.Checksum) ;
using (var dlg = new ActionProgressDialog(downloadAndInstallClientAction, ProgressBarStyle.Marquee))
dlg.ShowDialog(Parent);
DialogResult dialogResult = MessageBox.Show("In order to update your client will be closed. Is all your work done and saved?.", "Are you ready to update?", MessageBoxButtons.YesNo);
// Only start if user says yes.
if (dialogResult == DialogResult.Yes)
{
// Start the download and show progress
using (var dlg = new ActionProgressDialog(downloadAndInstallClientAction, ProgressBarStyle.Marquee))
{
dlg.ShowDialog(Parent);
}
}
}
private void ToolStripMenuItemDismiss_Click(object sender, EventArgs e)

View File

@ -34,10 +34,8 @@ using System.Net;
using System.ComponentModel;
using System.Threading;
using System.IO;
using System.Linq;
using System.Net.NetworkInformation;
using System.Diagnostics;
using System.Security.Cryptography;
using XenCenterLib;
using System.Text;
using System.Security.Cryptography.X509Certificates;