code formatting

This commit is contained in:
Pilzinsel64
2024-06-24 09:07:46 +02:00
parent ebd9fb90da
commit 8450ba3cbf

View File

@@ -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));
}
}