Esempio n. 1
0
        /// <summary>
        /// Checks the analysis results for all connections.
        /// Will only perform the check for the connection that have sufficient rights; will not show the action progress.
        /// </summary>
        public static void CheckForAnalysisResults()
        {
            List <AsyncAction> actions = new List <AsyncAction>();

            foreach (IXenConnection xenConnection in ConnectionsManager.XenConnectionsCopy)
            {
                var action = GetAction(xenConnection, true);
                if (action != null)
                {
                    actions.Add(action);
                }
            }

            if (actions.Count == 1)
            {
                actions[0].Completed += actionCompleted;
                actions[0].RunAsync();
            }
            else if (actions.Count > 1)
            {
                var parallelAction = new ParallelAction(null, "", "", "", actions, true, true);
                parallelAction.Completed += actionCompleted;
                parallelAction.RunAsync();
            }
        }
Esempio n. 2
0
        public static void RestoreDismissedUpdates()
        {
            var actions = new List <AsyncAction>();

            foreach (IXenConnection connection in ConnectionsManager.XenConnectionsCopy)
            {
                actions.Add(new RestoreDismissedUpdatesAction(connection));
            }

            var action = new ParallelAction(Messages.RESTORE_DISMISSED_UPDATES, Messages.RESTORING, Messages.COMPLETED, actions, true, false);

            action.Completed += action_Completed;

            RestoreDismissedUpdatesStarted?.Invoke();

            action.RunAsync();
        }