Ejemplo n.º 1
0
        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");
        }
Ejemplo n.º 2
0
        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;
        }