Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Dictionary<string, List<CheckBox>> checkboxes = new Dictionary<string, List<CheckBox>>();
- public Options() {
- InitializeComponent();
- checkboxes.Add("Ann", new List<CheckBox> {Ann, Annc});
- checkboxes.Add("Aby", new List<CheckBox> {Aby, Abyc});
- checkboxes.Add("Bam", new List<CheckBox> {Bam, Bamc});
- }
- private void Switch(CheckBox sender, bool boolean) {
- if (checkboxes.TryGetValue(sender.Name, out List<CheckBox> response)) {
- foreach (var checkBox in response) {
- checkBox.IsChecked = boolean;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement