Exemplo n.º 1
0
        public static ObservableCollection <SoundItem> GenerateSounds(
            SoundItem.AudioCategory category = SoundItem.AudioCategory.Null)
        {
            var currentList = new List <SoundItem>()
            {
                new SoundItem("Cat", SoundItem.AudioCategory.Animals),
                new SoundItem("Cow", SoundItem.AudioCategory.Animals),
                new SoundItem("Gun", SoundItem.AudioCategory.Cartoons),
                new SoundItem("Spring", SoundItem.AudioCategory.Cartoons),
                new SoundItem("Clock", SoundItem.AudioCategory.Taunts),
                new SoundItem("LOL", SoundItem.AudioCategory.Taunts),
                new SoundItem("Ship", SoundItem.AudioCategory.Warnings),
                new SoundItem("Siren", SoundItem.AudioCategory.Warnings)
            };

            if (category != SoundItem.AudioCategory.Null)
            {
                currentList = currentList.Where(p => p.Catrgory == category).ToList();
            }
            return(new ObservableCollection <SoundItem>(currentList));
        }
Exemplo n.º 2
0
 public MenuItem(SoundItem.AudioCategory category)
 {
     Category = category;
     ItemName = Category.ToString();
     IconPath = $"Assets/Icons/{ItemName.ToLower()}.png";
 }