private void btnOk_Click(object sender, EventArgs e) { // Save settings var newConfig = (Configuration)propertyGrid.SelectedObject; if (!Program.Configuration.ApplyChanges(newConfig)) { MessageBox.Show("Invalid configuration for some reason", "ATray Configuration error"); return; } Program.Configuration = newConfig; Program.Configuration.SaveToIniFile(); // Save new repo list _repositories.Save(); Close(); }
public void SaveToFile() { repos.Save(); }