Exemplo n.º 1
0
        private void LoadInternal(string fileName)
        {
            _iniFile = new INIFile(fileName);

            foreach (PropertyDescriptor item in TypeDescriptor.GetProperties(this))
            {
                if (item.IsBrowsable)
                {
                    switch (item.Name)
                    {
                    case "Launch":
                        Launch.LoadSection("Launch", _iniFile);
                        break;

                    case "Activate":
                        Activate.LoadSection("Activate", _iniFile);
                        break;

                    case "LiveMode":
                        LiveMode.LoadSection("LiveMode", _iniFile);
                        break;

                    case "Environment":
                        Environment.LoadSection("Environment", _iniFile);
                        break;

                    case "RegistryKeys":
                        RegistryKeys.LoadSection("RegistryKeys", _iniFile);
                        break;

                    case "RegistryValueWrite":
                        RegistryValueWrite.LoadSection("RegistryValueWrite", _iniFile);
                        break;

                    case "RegistryCleanupIfEmpty":
                        RegistryCleanupIfEmpty.LoadSection("RegistryCleanupIfEmpty", _iniFile);
                        break;

                    case "RegistryCleanupForce":
                        RegistryCleanupForce.LoadSection("RegistryCleanupForce", _iniFile);
                        break;

                    case "RegistryValueBackupDelete":
                        RegistryValueBackupDelete.LoadSection("RegistryValueBackupDelete", _iniFile);
                        break;

                    case "RegistrationFreeCOM":
                        RegistrationFreeCOM.LoadSection("RegistrationFreeCOM", _iniFile);
                        break;

                    case "QtKeysCleanup":
                        QtKeysCleanup.LoadSection("QtKeysCleanup", _iniFile);
                        break;

                    case "FileWriteN":
                        FileWriteN.LoadSection("FileWrite", _iniFile);
                        break;

                    case "FilesMove":
                        FilesMove.LoadSection("FilesMove", _iniFile);
                        break;

                    case "DirectoriesMove":
                        DirectoriesMove.LoadSection("DirectoriesMove", _iniFile);
                        break;

                    case "DirectoriesCleanupIfEmpty":
                        DirectoriesCleanupIfEmpty.LoadSection("DirectoriesCleanupIfEmpty", _iniFile);
                        break;

                    case "DirectoriesCleanupForce":
                        DirectoriesCleanupForce.LoadSection("DirectoriesCleanupForce", _iniFile);
                        break;

                    case "Language":
                        Language.LoadSection("Language", _iniFile);
                        break;

                    case "LanguageStrings":
                        LanguageStrings.LoadSection("LanguageStrings", _iniFile);
                        break;

                    case "LanguageFile":
                        LanguageFile.LoadSection("LanguageFile", _iniFile);
                        break;

                    case "DirectoriesLink":
                        DirectoriesLink.LoadSection("DirectoriesLink", _iniFile);
                        break;
                    }
                }
            }
        }