Esempio n. 1
0
        private void InitVolumeSliders()
        {
            // Remove dummy.
            volumneSliders.Children.Clear();

            // Add a slider for each sound
            for (int i = 0; i < Settings.Default.notifierSounds.Sounds.Count; i++)
            {
                var soundIt = Settings.Default.notifierSounds[i];

                var soundconfig = new SoundConfig()
                {
                    Sound = soundIt, ID = i
                };
                volumneSliders.Children.Add(soundconfig);

                notifier.Sounds.Add(i, Settings.Default.notifierSounds[i]);
            }
        }
Esempio n. 2
0
        public void LinkSounds(Sounds sounds)
        {
            var tempSounds = new ItemsChangeObservableCollection <SoundConfig>();

            var soundsList = sounds.List;

            for (int i = 0; i < soundsList.Count; i++)
            {
                var sound = soundsList[i];

                var soundConfig = new SoundConfig(sound)
                {
                    ID = i
                };
                tempSounds.Add(soundConfig);
            }

            Sounds = tempSounds;
            this.NotifyPropertyChanged(nameof(Sounds));
        }
Esempio n. 3
0
        public SoundsViewModel()
        {
            var tempSounds = new ItemsChangeObservableCollection <SoundConfig>();

            for (int i = 0; i < 5; i++)
            {
                var sound = new Sound()
                {
                    FilePath = "C:/dummy.wav", Volume = 0.2
                };
                var soundConfig = new SoundConfig(sound)
                {
                    ID = i
                };

                tempSounds.Add(soundConfig);
            }

            Sounds = tempSounds;
        }