private void btnRemove_Click(object sender, EventArgs e) { var filepath = ConfigurationProvider.VariableSettingsFile; var collection = new VariableInfoCollection(); collection.Open(filepath); var cpuName = txtCpuName.Text; var names = txtVariables.Lines; collection.RemoveRange(cpuName, names); collection.Save(filepath); }
private void btnAddVariables_Click(object sender, EventArgs e) { var filepath = AppSettings.VariableSettingsFile; var collection = new VariableInfoCollection(new FileWrapper()); collection.Open(filepath); var cpuName = txtCpuName.Text; var names = txtVariables.Lines; collection.AddRange(cpuName, names); collection.Save(filepath); }