예제 #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 (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);
                {
                    action.Completed += actionCompleted;
                }

                if (CheckForUpdatesStarted != null)
                {
                    CheckForUpdatesStarted();
                }

                action.RunAsync();
            }
        }
예제 #2
0
        private static void RunCheckForUpdates(Action <ActionBase> completedEvent)
        {
            DownloadUpdatesXmlAction action = new DownloadUpdatesXmlAction();

            action.Completed += completedEvent;
            action.RunAsync();
        }