示例#1
0
        /// <summary>
        /// If AutomaticCheck is enabled it checks for updates regardless the
        /// value of the parameter force. If AutomaticCheck is disabled it only
        /// checks if force is true.
        /// </summary>
        public static void CheckForUpdates(bool force)
        {
            if (!AllowUpdates && !force)
                return;

            if (Helpers.CommonCriteriaCertificationRelease)
                return;

            DownloadUpdatesXmlAction action = new DownloadUpdatesXmlAction();
            action.Completed += actionCompleted;

            if (CheckForUpdatesStarted != null)
                CheckForUpdatesStarted();

            action.RunAsync();
        }
示例#2
0
        /// <summary>
        /// If AutomaticCheck is enabled it checks for updates regardless the
        /// value of the parameter force. If AutomaticCheck is disabled it only
        /// checks if force is true.
        /// </summary>
        public static void CheckForUpdates(bool force)
        {
            if (Helpers.CommonCriteriaCertificationRelease)
                return;

            if (Properties.Settings.Default.AllowXenCenterUpdates ||
                Properties.Settings.Default.AllowXenServerUpdates ||
                Properties.Settings.Default.AllowPatchesUpdates || force)
            {
                DownloadUpdatesXmlAction action = new DownloadUpdatesXmlAction(
                    Properties.Settings.Default.AllowXenCenterUpdates || force,
                    Properties.Settings.Default.AllowXenServerUpdates || force,
                    Properties.Settings.Default.AllowPatchesUpdates || force,
                    Branding.CheckForUpdatesUrl);
                {
                    action.Completed += actionCompleted;
                }

                if (CheckForUpdatesStarted != null)
                    CheckForUpdatesStarted();

                action.RunAsync();
            }
        }
示例#3
0
 private static void RunCheckForUpdates(EventHandler<EventArgs> completedEvent)
 {
     DownloadUpdatesXmlAction action = new DownloadUpdatesXmlAction();
     action.Completed += new EventHandler<EventArgs>(completedEvent);
     action.RunAsync();
 }
示例#4
0
 private static void RunCheckForUpdates(Action<ActionBase> completedEvent)
 {
     DownloadUpdatesXmlAction action = new DownloadUpdatesXmlAction();
     action.Completed += completedEvent;
     action.RunAsync();
 }