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(); }
private void Option_Loaded(object sender, RoutedEventArgs e) { var sounds = SoundRepositorySingleton.Instance.FindAll().ToList(); sounds.ForEach(x => AvailableSounds.Add(x)); LoadSequences(); LoadAllFrequences(); }
private async void Setup() { ConfigurationSettings = await ConfigurationServices.GetConfig(); foreach (string sound in await SoundsServices.GetAvailableSounds()) { AvailableSounds.Add(sound); } SelectedSound = ConfigurationSettings.SoundConfig.SoundName; }
private async void LoadCustomSoundExecuted() { await SoundsServices.ImportCustomSound(); foreach (string sound in await SoundsServices.GetAvailableSounds()) { if (!AvailableSounds.Contains(sound)) { AvailableSounds.Add(sound); } } }
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); }