Exemple #1
0
        private static void WaitCallbackProcessApps(object objData)
        {
            ProcessAppsData processAppsData = (ProcessAppsData)objData;

            try
            {
                foreach (Node node in processAppsData.SelectedNodes)
                {
                    if (AppListView.cancelProcessMultipleApps)
                    {
                        break;
                    }

                    string displayName = node.DisplayName;
                    switch (processAppsData.Action)
                    {
                    case "Enable":
                        SSOManager.EnableApplication(displayName, true);
                        break;

                    case "Disable":
                        SSOManager.EnableApplication(displayName, false);
                        break;

                    case "Delete":
                        SSOManager.DeleteApplication(displayName);
                        break;

                    case "PurgeCache":
                        SSOManager.PurgeApplicationCache(displayName);
                        break;
                    }
                    ++processAppsData.WaitDialog.WorkProcessed;
                }
            }
            catch (Exception ex)
            {
                MsgBoxUtil.Show(processAppsData.SnapIn, ex);
            }
            finally
            {
                processAppsData.WaitDialog.CompleteDialog();
            }
        }