Exemple #1
0
        /* ************************************************************************************************************************
         *************************************************************************************************************************/
        protected void retrieveSettingsFile()
        {
            ProgramStoringFolder = System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), embeddedSettings.progName);

            try
            {
                userSettings = new KeyValuePairDataBase(System.IO.Path.Combine(ProgramStoringFolder, embeddedSettings.settingsFileName));
            }
            catch
            {
                userSettings = new KeyValuePairDataBase();
            }
        }
Exemple #2
0
        /* ************************************************************************************************************************
         *************************************************************************************************************************/
        protected void saveSettings()
        {
            String settingsPath = System.IO.Path.Combine(ProgramStoringFolder, embeddedSettings.settingsFileName);

            try
            {
                userSettings.saveToFile(settingsPath);
            }
            catch
            {
                Directory.CreateDirectory(ProgramStoringFolder);
                userSettings = new KeyValuePairDataBase();
                userSettings.saveToFile(settingsPath);
            }
        }