code formatting
This commit is contained in:
@@ -78,23 +78,39 @@ public class UpdateClientGUI
|
||||
|
||||
private void MyUpdateClient_DownloadingUpdate(UpdatePackageInfo pkg, CancelEventArgs e)
|
||||
{
|
||||
curProgressDialog?.Invoke(new Action(() => curProgressDialog.Hide()));
|
||||
var dres = default(DialogResult);
|
||||
parentForm.Invoke(new Action(() =>
|
||||
|
||||
// Hide progress dialog
|
||||
curProgressDialog?.Invoke(new Action(curProgressDialog.Hide));
|
||||
|
||||
// Show updates available dialog
|
||||
parentForm.Invoke(() =>
|
||||
{
|
||||
var dialog = new UpdatesAvailableDialog(MyAppIcon, updateClient.CurrentVersion.Version.ToString(), updateClient.CurrentVersion.Channel.ToString(), Conversions.ToString(updateClient.CurrentVersion.Build), pkg.Version.Version.ToString(), pkg.Version.Channel.ToString(), Conversions.ToString(pkg.Version.Build), pkg.Notes, updateClient.InstallAsAdmin);
|
||||
var dialog = new UpdatesAvailableDialog(
|
||||
MyAppIcon,
|
||||
updateClient.CurrentVersion.Version.ToString(),
|
||||
updateClient.CurrentVersion.Channel.ToString(),
|
||||
updateClient.CurrentVersion.Build.ToString(),
|
||||
pkg.Version.Version.ToString(),
|
||||
pkg.Version.Channel.ToString(),
|
||||
pkg.Version.Build.ToString(),
|
||||
pkg.Notes,
|
||||
updateClient.InstallAsAdmin);
|
||||
var symbol = GlobalSymbolFactory.Instance.GetImage(GlobalSymbols.software_installer, UI.Telerik.SvgImageSize.Small).ToIcon();
|
||||
dres = RadDialogBase.ShowDialog(dialog, parentForm, LangRes.Title_UpdatesAvailable, symbol).Result;
|
||||
}));
|
||||
});
|
||||
|
||||
if (dres != DialogResult.OK)
|
||||
{
|
||||
// Finish updating
|
||||
e.Cancel = true;
|
||||
EndUpdating();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Cancel
|
||||
e.Cancel = false;
|
||||
curProgressDialog?.Invoke(new Action(() => curProgressDialog.Show()));
|
||||
curProgressDialog?.Invoke(new Action(curProgressDialog.Show));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user