Exemplo n.º 1
0
        // Save the current items in the Registry.
        private void SaveFiles()
        {
            // Delete the saved entries.
            for (int i = 0; i < NumFiles; i++)
            {
                RegistryTools.DeleteSetting(ApplicationName, "FilePath" + i.ToString());
            }

            // Save the current entries.
            int index = 0;

            foreach (FileInfo file_info in FileInfos)
            {
                RegistryTools.SaveSetting(ApplicationName,
                                          "FilePath" + index.ToString(), file_info.FullName);
                index++;
            }
        }