Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        public static void InitServiceStyle(this DoubanMusicService service, MusicServiceType type)
        {
            switch (type)
            {
            case MusicServiceType.MHz:
                service.ChangeServiceChoice(type);
                break;

            case MusicServiceType.SongList:
                service.ChangeServiceChoice(type);
                break;
            }
        }
Esempio n. 3
0
        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;
            }
        }
Esempio n. 4
0
 public static void ChangePlayChoice(this DoubanMusicService service, bool shuffle, bool autoRepeat, bool singleton)
 {
     service.PlaybackList.ShuffleEnabled    = shuffle;
     service.PlaybackList.AutoRepeatEnabled = autoRepeat;
     service.SingletonPlay = singleton;
 }