public Preset() { _keys = new ObservableCollection <VKey>(); _counterCollection = new ObservableObjectCollection <Counter>(); _soundCollection = new ObservableObjectCollection <Sound>(); Keys.CollectionChanged += (sender, e) => RaisePropertyChanged("Keys"); CounterCollection.CollectionChanged += (sender, e) => RaisePropertyChanged("CounterCollection"); CounterCollection.CollectionChanged += (sender, e) => RaisePropertyChanged("SelectedCounter"); SoundCollection.CollectionChanged += (sender, e) => RaisePropertyChanged("SoundCollection"); SoundCollection.CollectionChanged += (sender, e) => RaisePropertyChanged("SelectedSound"); }
public ConfigurationModel() { PresetCollection = new ObservableObjectCollection <Preset>(); CounterShortcuts = new CounterShortcuts(); SoundShortcuts = new SoundShortcuts(); PresetCollection.CollectionChanged += (sender, e) => RaisePropertyChanged("PresetCollection"); PresetCollection.CollectionChanged += (sender, e) => RaisePropertyChanged("SelectedPreset"); CounterShortcuts.PropertyChanged += (sender, e) => RaisePropertyChanged("CounterShortcuts"); SoundShortcuts.PropertyChanged += (sender, e) => RaisePropertyChanged("SoundShortcuts"); Volume = 100; PrimaryDeviceVolume = 100; SecondaryDeviceVolume = 100; WindowHeight = 300; WindowWidth = 500; CountersWidth = 1; SoundsWidth = 1; }