public void SaveNode(TreeNode node) { switch (node.Text.RemoveStartEnd('[', ']')) { case "RegistryKeys": RegistryKeys.SaveNode(node); break; case "RegistryValueWrite": RegistryValueWrite.SaveNode(node); break; case "RegistryCleanupIfEmpty": RegistryCleanupIfEmpty.SaveNode(node); break; case "RegistryCleanupForce": RegistryCleanupForce.SaveNode(node); break; case "RegistryValueBackupDelete": RegistryValueBackupDelete.SaveNode(node); break; case "RegistrationFreeCOM": RegistrationFreeCOM.SaveNode(node); break; case "FilesMove": FilesMove.SaveNode(node); break; case "DirectoriesMove": DirectoriesMove.SaveNode(node); break; case "DirectoriesCleanupIfEmpty": DirectoriesCleanupIfEmpty.SaveNode(node); break; case "DirectoriesCleanupForce": DirectoriesCleanupForce.SaveNode(node); break; case "DirectoriesLink": DirectoriesLink.SaveNode(node); break; case "Environment": Environment.SaveNode(node); break; case "QtKeysCleanup": QtKeysCleanup.SaveNode(node); break; } }
public TreeNode BuildFileTreeUI() { TreeNode rootNode = new TreeNode(); foreach (PropertyDescriptor item in TypeDescriptor.GetProperties(this)) { if (item.IsBrowsable) { switch (item.Name) { case "FilesMove": { var topNode = FilesMove.BuildTreeUI("FilesMove", rootNode); topNode.Expand(); } break; case "DirectoriesMove": { var topNode = DirectoriesMove.BuildTreeUI("DirectoriesMove", rootNode); topNode.Expand(); } break; case "DirectoriesCleanupIfEmpty": { var topNode = DirectoriesCleanupIfEmpty.BuildTreeUI("DirectoriesCleanupIfEmpty", rootNode); topNode.Expand(); } break; case "DirectoriesCleanupForce": { var topNode = DirectoriesCleanupForce.BuildTreeUI("DirectoriesCleanupForce", rootNode); topNode.Expand(); } break; case "DirectoriesLink": { var topNode = DirectoriesLink.BuildTreeUI("DirectoriesLink", rootNode); topNode.Expand(); } break; } } } return(rootNode); }
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; } } } }
public void Save() { foreach (PropertyDescriptor item in TypeDescriptor.GetProperties(this)) { if (item.IsBrowsable) { switch (item.Name) { case "Launch": Launch.SaveSection("Launch", _iniFile); break; case "Activate": Activate.SaveSection("Activate", _iniFile); break; case "LiveMode": LiveMode.SaveSection("LiveMode", _iniFile); break; case "Environment": Environment.SaveSection("Environment", _iniFile); break; case "RegistryKeys": RegistryKeys.SaveSection("RegistryKeys", _iniFile); break; case "RegistryValueWrite": RegistryValueWrite.SaveSection("RegistryValueWrite", _iniFile); break; case "RegistryCleanupIfEmpty": RegistryCleanupIfEmpty.SaveSection("RegistryCleanupIfEmpty", _iniFile); break; case "RegistryCleanupForce": RegistryCleanupForce.SaveSection("RegistryCleanupForce", _iniFile); break; case "RegistryValueBackupDelete": RegistryValueBackupDelete.SaveSection("RegistryValueBackupDelete", _iniFile); break; case "RegistrationFreeCOM": RegistrationFreeCOM.SaveSection("RegistrationFreeCOM", _iniFile); break; case "QtKeysCleanup": QtKeysCleanup.SaveSection("QtKeysCleanup", _iniFile); break; case "FileWriteN": FileWriteN.SaveSection("FileWrite", _iniFile); break; case "FilesMove": FilesMove.SaveSection("FilesMove", _iniFile); break; case "DirectoriesMove": DirectoriesMove.SaveSection("DirectoriesMove", _iniFile); break; case "DirectoriesCleanupIfEmpty": DirectoriesCleanupIfEmpty.SaveSection("DirectoriesCleanupIfEmpty", _iniFile); break; case "DirectoriesCleanupForce": DirectoriesCleanupForce.SaveSection("DirectoriesCleanupForce", _iniFile); break; case "Language": Language.SaveSection("Language", _iniFile); break; case "LanguageStrings": LanguageStrings.SaveSection("LanguageStrings", _iniFile); break; case "LanguageFile": LanguageFile.SaveSection("LanguageFile", _iniFile); break; case "DirectoriesLink": DirectoriesLink.SaveSection("DirectoriesLink", _iniFile); break; case "PrefixPATHEnv": PrefixPATHEnv.SaveSection("PrefixPATHEnv", _iniFile); break; } } } }