public override void Load(SettingsStorage storage) { base.Load(storage); if (storage.ContainsKey("SelectedLevel1Fields")) { Level1FieldsCtrl.SelectedFields = storage .GetValue <string>("SelectedLevel1Fields") .Split(",") .Select(s => s.To <Level1Fields>()) .ToArray(); } FindedChanges.Load(storage.GetValue <SettingsStorage>("FindedChanges")); }
public override void Load(SettingsStorage storage) { base.Load(storage); if (storage.ContainsKey("SelectedLevel1Fields")) { Level1FieldsCtrl.SelectedFields = storage .GetValue <string>("SelectedLevel1Fields") .Split(",") .Select(s => s.To <Level1Fields>()) .ToArray(); } FindedChanges.Load(storage.GetValue <SettingsStorage>("FindedChanges")); var selectedFields = Level1FieldsCtrl.SelectedFields.ToArray(); foreach (var pair in _columns) { pair.Value.Visibility = selectedFields.Contains(pair.Key) ? Visibility.Visible : Visibility.Collapsed; } }