private void button2_Click(object sender, EventArgs e) { var f = new AssignAreaToBulbForm(Settings.LabelsAndLocations); f.ShowDialog(); Settings.LabelsAndLocations = f.LabelsAndLocations; ProcessorBase.SaveSettings(Settings, null); }
private void button2_Click(object sender, EventArgs e) { var f = new AssignAreaToBulbForm(Settings.LabelsAndLocations.Where(x => lbLabels.SelectedItems.Contains(x.Label)).ToList()); f.ShowDialog(); Settings.LabelsAndLocations.RemoveAll(x => f.LabelsAndLocations.Any(y => y.Label == x.Label)); Settings.LabelsAndLocations.AddRange(f.LabelsAndLocations); ProcessorBase.SaveSettings(Settings, null); }