Esempio n. 1
0
        public void TestRegistryRead()
        {
            var registry = new Registry();

            registry.SetData(data);
            registry.readData(Microsoft.Win32.Registry.CurrentUser, "", false, true);

            var iniFiles = new IniFiles();

            iniFiles.SetData(data);
            string testFile = @"C:\PDFCreator\Test.ini";

            if (File.Exists(testFile))
            {
                File.Delete(testFile);
            }

            iniFiles.WriteData(testFile);
            //Process.Start(testFile);
        }
Esempio n. 2
0
        public void TestRegistryWrite()
        {
            IniFiles iniFiles = new IniFiles();
            string   testFile = @"C:\PDFCreator\Test.ini";

            if (!File.Exists(testFile))
            {
                throw new Exception("Ini file doesn't exist.");
            }
            Process.Start(testFile);

            iniFiles.SetData(data);
            iniFiles.ReadData(testFile);

            data.RemoveSection("Printers");

            Registry registry = new Registry();

            registry.SetData(data);
            registry.writeData(Microsoft.Win32.Registry.CurrentUser, "", true);
        }