private void StoreSettings() { if(!Directory.Exists(appDataPath)){ try{ Directory.CreateDirectory(appDataPath) ; }catch(Exception exc){ MessageBox.Show("Can't store settings at AppData folder. Maybe you haven't sufficient permissions\n" + exc.Message, "Storing settings error", MessageBoxButtons.OK, MessageBoxIcon.Error) ; return ; } } Props ini = new Props(appDataPath + settingsFile, false) ; ini.SetProperty("PATH", textBoxSelectedFolder.Text) ; ini.SetProperty("RECRUSIVE", checkBoxSubdirs.Checked.ToString()) ; ini.Save() ; }
private void LoadSettings() { if(File.Exists(appDataPath + settingsFile)){ Props ini = new Props(appDataPath + settingsFile, false) ; string path = ini.GetProperty("PATH", true) ; textBoxSelectedFolder.Text = path ; string recrusive = ini.GetProperty("RECRUSIVE", true) ; if(recrusive == "False"){ checkBoxSubdirs.Checked = false ; } } }