From b4bba6b67999d39f49a694ec197476da310a7855 Mon Sep 17 00:00:00 2001 From: Alexander Schulz Date: Mon, 1 Jan 2024 21:07:17 +0100 Subject: [PATCH] remove automatic updates question on startup --- XenAdmin/MainWindow.cs | 42 ------------------------------------------ 1 file changed, 42 deletions(-) diff --git a/XenAdmin/MainWindow.cs b/XenAdmin/MainWindow.cs index fb5c42794..47f9ff70a 100644 --- a/XenAdmin/MainWindow.cs +++ b/XenAdmin/MainWindow.cs @@ -117,8 +117,6 @@ public partial class MainWindow : Form, ISynchronizeInvoke, IMainWindow private string[] _commandLineArgs; - private static readonly System.Windows.Forms.Timer CheckForUpdatesTimer = new System.Windows.Forms.Timer(); - public readonly PluginManager PluginManager; private readonly ContextMenuBuilder contextMenuBuilder; @@ -595,49 +593,9 @@ private void MainWindow_Shown(object sender, EventArgs e) CloseSplashScreen(); - if (!Program.RunInAutomatedTestMode) - { - if (!Properties.Settings.Default.SeenAllowUpdatesDialog) - using (var dlg = new NoIconDialog(string.Format(Messages.ALLOWED_UPDATES_DIALOG_MESSAGE, BrandManager.BrandConsole, BrandManager.ProductBrand), - ThreeButtonDialog.ButtonYes, ThreeButtonDialog.ButtonNo) - { - HelpButton = true, - HelpNameSetter = "AllowUpdatesDialog", - ShowCheckbox = true, - CheckboxCaption = Messages.ALLOWED_UPDATES_DIALOG_CHECKBOX - }) - { - var result = dlg.ShowDialog(this) == DialogResult.Yes; - - Properties.Settings.Default.AllowXenCenterUpdates = result; - Properties.Settings.Default.SeenAllowUpdatesDialog = true; - - if (result && dlg.IsCheckBoxChecked) - { - using (var dialog = new OptionsDialog(PluginManager)) - { - dialog.SelectConnectionOptionsPage(); - dialog.ShowDialog(this); - } - } - - Settings.TrySaveSettings(); - } - - // start checkforupdates thread - CheckForUpdatesTimer.Interval = 1000 * 60 * 60 * 24; // 24 hours - CheckForUpdatesTimer.Tick += CheckForUpdatesTimer_Tick; - CheckForUpdatesTimer.Start(); - } - ProcessCommand(_commandLineArgs); } - private void CheckForUpdatesTimer_Tick(object sender, EventArgs e) - { - //Updates.CheckForClientUpdates(); - } - private void LoadTasksAsMeddlingActions(IXenConnection connection) { if (!connection.IsConnected || connection.Session == null)