private void GetNeteasePlayingState() { Retry: RepeatState = DoImageCompare(); if (RepeatState != RepState.Unknown) { switch (RepeatState) { case RepState.ListLoop: btnLoop.BackgroundImage = ListLoop; break; case RepState.ListNoLoop: btnLoop.BackgroundImage = ListNoLoop; break; case RepState.OneLoop: btnLoop.BackgroundImage = OneLoop; break; case RepState.Random: btnLoop.BackgroundImage = Properties.Resources.Random; break; } } else { Thread.Sleep(5); goto Retry; } if (KeyPointColors[KeyPoints[3]].R == 0xff && KeyPointColors[KeyPoints[3]].G == 0xff && KeyPointColors[KeyPoints[3]].B == 0xff) { PlayingState = PlayState.Playing; } else { PlayingState = PlayState.Paused; } if (KeyPointColors[KeyPoints[4]].R == 0x66 && KeyPointColors[KeyPoints[4]].G == 0x66 && KeyPointColors[KeyPoints[4]].B == 0x66) { LyricState = LrcState.On; btnLrc.BackgroundImage = Lyric; } else { LyricState = LrcState.Off; btnLrc.BackgroundImage = Lyric_Off; } }
private void btnLrc_Click(object sender, EventArgs e) { switch (LyricState) { case LrcState.Off: LyricState = LrcState.On; btnLrc.BackgroundImage = Lyric; SendNetEaseLeftClick(PreDefinedPoints[MO_Lrc]); break; case LrcState.On: LyricState = LrcState.Off; SendNetEaseLeftClick(PreDefinedPoints[MO_Lrc]); btnLrc.BackgroundImage = Lyric_Off; break; } }