Example #1
0
        private void BaseSoundsDefinition_Loaded(object sender, RoutedEventArgs e)
        {
            SoundsCount = 1;
            var sounds = SoundRepositorySingleton.Instance.FindAll().ToList();

            AvailableSounds.Clear();
            sounds.ForEach(x => AvailableSounds.Add(x));

            LoadAllFrequences();
        }
Example #2
0
        private void Option_Loaded(object sender, RoutedEventArgs e)
        {
            var sounds = SoundRepositorySingleton.Instance.FindAll().ToList();

            sounds.ForEach(x => AvailableSounds.Add(x));

            LoadSequences();

            LoadAllFrequences();
        }
Example #3
0
        private async void Setup()
        {
            ConfigurationSettings = await ConfigurationServices.GetConfig();

            foreach (string sound in await SoundsServices.GetAvailableSounds())
            {
                AvailableSounds.Add(sound);
            }

            SelectedSound = ConfigurationSettings.SoundConfig.SoundName;
        }
Example #4
0
        private async void LoadCustomSoundExecuted()
        {
            await SoundsServices.ImportCustomSound();

            foreach (string sound in await SoundsServices.GetAvailableSounds())
            {
                if (!AvailableSounds.Contains(sound))
                {
                    AvailableSounds.Add(sound);
                }
            }
        }
Example #5
0
        private void AddSound(string nameOfSound, double freq, double vol)
        {
            Sound  sound     = null;
            double frequency = freq;
            double volume    = vol;
            string name      = nameOfSound;

            sound = new Sound()
            {
                Frequency = frequency,
                Volume    = volume,
                Name      = name
            };

            SoundRepositorySingleton.Instance.Save(sound);
            SoundRepositorySingleton.Instance.Flush();

            AvailableSounds.Add(sound);
        }