Ejemplo n.º 1
0
 public override void UnInstall()
 {
     for (int index = 0; index <= ComponentInstallers.Count - 1; index++)
     {
         ComponentInstallerBase compInstaller = ComponentInstallers.Values[index];
         FileInstaller          fileInstaller = compInstaller as FileInstaller;
         if (fileInstaller != null)
         {
             fileInstaller.DeleteFiles = DeleteFiles;
         }
         Log.ResetFlags();
         Log.AddInfo(Util.UNINSTALL_StartComp + " - " + compInstaller.Type);
         compInstaller.UnInstall();
         Log.AddInfo(Util.COMPONENT_UnInstalled + " - " + compInstaller.Type);
         if (Log.Valid)
         {
             Log.AddInfo(Util.UNINSTALL_SuccessComp + " - " + compInstaller.Type);
         }
         else
         {
             Log.AddWarning(Util.UNINSTALL_WarningsComp + " - " + compInstaller.Type);
         }
     }
     PackageController.DeletePackage(Package);
 }
 public static ComponentInstallerBase GetInstaller(string installerType)
 {
     ComponentInstallerBase installer = null;
     switch (installerType)
     {
         case "File":
             installer = new FileInstaller();
             break;
         case "Assembly":
             installer = new AssemblyInstaller();
             break;
         case "ResourceFile":
             installer = new ResourceFileInstaller();
             break;
         case "AuthenticationSystem":
         case "Auth_System":
             installer = new AuthenticationInstaller();
             break;
         case "DashboardControl":
             installer = new DashboardInstaller();
             break;
         case "Script":
             installer = new ScriptInstaller();
             break;
         case "Config":
             installer = new ConfigInstaller();
             break;
         case "Cleanup":
             installer = new CleanupInstaller();
             break;
         case "Skin":
             installer = new SkinInstaller();
             break;
         case "Container":
             installer = new ContainerInstaller();
             break;
         case "Module":
             installer = new ModuleInstaller();
             break;
         case "CoreLanguage":
             installer = new LanguageInstaller(LanguagePackType.Core);
             break;
         case "ExtensionLanguage":
             installer = new LanguageInstaller(LanguagePackType.Extension);
             break;
         case "Provider":
             installer = new ProviderInstaller();
             break;
         case "SkinObject":
             installer = new SkinControlInstaller();
             break;
         case "Widget":
             installer = new WidgetInstaller();
             break;
         default:
             ListController listController = new ListController();
             ListEntryInfo entry = listController.GetListEntryInfo("Installer", installerType);
             if (entry != null && !string.IsNullOrEmpty(entry.Text))
             {
                 installer = (ComponentInstallerBase)Reflection.CreateObject(entry.Text, "Installer_" + entry.Value);
             }
             break;
     }
     return installer;
 }
Ejemplo n.º 3
0
        public static ComponentInstallerBase GetInstaller(string installerType)
        {
            ComponentInstallerBase installer = null;

            switch (installerType)
            {
            case "File":
                installer = new FileInstaller();
                break;

            case "Assembly":
                installer = new AssemblyInstaller();
                break;

            case "ResourceFile":
                installer = new ResourceFileInstaller();
                break;

            case "AuthenticationSystem":
            case "Auth_System":
                installer = new AuthenticationInstaller();
                break;

            case "DashboardControl":
                installer = new DashboardInstaller();
                break;

            case "Script":
                installer = new ScriptInstaller();
                break;

            case "Config":
                installer = new ConfigInstaller();
                break;

            case "Cleanup":
                installer = new CleanupInstaller();
                break;

            case "Skin":
                installer = new SkinInstaller();
                break;

            case "Container":
                installer = new ContainerInstaller();
                break;

            case "Module":
                installer = new ModuleInstaller();
                break;

            case "CoreLanguage":
                installer = new LanguageInstaller(LanguagePackType.Core);
                break;

            case "ExtensionLanguage":
                installer = new LanguageInstaller(LanguagePackType.Extension);
                break;

            case "Provider":
                installer = new ProviderInstaller();
                break;

            case "SkinObject":
                installer = new SkinControlInstaller();
                break;

            case "Widget":
                installer = new WidgetInstaller();
                break;

            default:
                ListController listController = new ListController();
                ListEntryInfo  entry          = listController.GetListEntryInfo("Installer", installerType);
                if (entry != null && !string.IsNullOrEmpty(entry.Text))
                {
                    installer = (ComponentInstallerBase)Reflection.CreateObject(entry.Text, "Installer_" + entry.Value);
                }
                break;
            }
            return(installer);
        }