public static bool ToggleSound(string command) { var index = soundList.FindIndex(x => x.command.ToLower() == command.ToLower()); if (index != -1) { soundList[index].enabled = !soundList[index].enabled; SoundLoader.writeList(); return(soundList[index].enabled); } return(false); }
public static void AddSound(SoundModel item) { soundList.Add(item); SoundLoader.writeList(); }