예제 #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
파일: Updates.cs 프로젝트: robhoes/xenadmin
        /// <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();
 }