public static MusicServicePlayType ChangePlayStyle(this DoubanMusicService service) { var returns = default(MusicServicePlayType); switch (service.PlayType) { case MusicServicePlayType.ShufflePlay: service.ChangePlayChoice(false, false, false); returns = service.PlayType = MusicServicePlayType.StreamPlay; break; case MusicServicePlayType.AutoRepeat: service.ChangePlayChoice(true, true, false); returns = service.PlayType = MusicServicePlayType.ShufflePlay; break; case MusicServicePlayType.SingletonPlay: service.ChangePlayChoice(false, true, false); returns = service.PlayType = MusicServicePlayType.AutoRepeat; break; default: service.ChangePlayChoice(false, false, true); returns = service.PlayType = MusicServicePlayType.SingletonPlay; break; } return(returns); }
public static void InitPlayStyle(this DoubanMusicService service, MusicServicePlayType type) { switch (type) { case MusicServicePlayType.ShufflePlay: service.ChangePlayChoice(true, true, false); break; case MusicServicePlayType.AutoRepeat: service.ChangePlayChoice(false, true, false); break; case MusicServicePlayType.SingletonPlay: service.ChangePlayChoice(false, false, true); break; default: service.ChangePlayChoice(false, false, false); break; } }