修正切歌至公播顯示錯誤BUG
This commit is contained in:
parent
35a7b3f89b
commit
af1ae44fa0
@ -297,6 +297,14 @@ namespace DualScreenDemo
|
|||||||
|
|
||||||
private void CloseFavoriteButton_Click(object sender, EventArgs e)
|
private void CloseFavoriteButton_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
mobileNumber = string.Empty;
|
||||||
|
|
||||||
|
|
||||||
|
showError = false;
|
||||||
|
|
||||||
|
|
||||||
|
FavoritePictureBox.Invalidate();
|
||||||
|
FavoritePictureBox.Refresh();
|
||||||
|
|
||||||
ToggleFavoritePictureBoxButtonsVisibility();
|
ToggleFavoritePictureBoxButtonsVisibility();
|
||||||
}
|
}
|
||||||
|
@ -2064,9 +2064,10 @@ public class MultiPagePanel : Panel
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// 計算已完成播放的歌曲數量
|
// 計算已完成播放的歌曲數量
|
||||||
int completedCount = 0;
|
//int completedCount = 0;
|
||||||
|
int completedCount = currentSongIndexInHistory;
|
||||||
// 遍歷已點歌曲歷史
|
// 遍歷已點歌曲歷史
|
||||||
for (int i = 0; i <= currentSongIndexInHistory && i < playedSongsHistory.Count; i++) {
|
/*for (int i = 0; i <= currentSongIndexInHistory && i < playedSongsHistory.Count; i++) {
|
||||||
if (i == currentSongIndexInHistory) {
|
if (i == currentSongIndexInHistory) {
|
||||||
completedCount = i + 1; // 当前播放的歌曲
|
completedCount = i + 1; // 当前播放的歌曲
|
||||||
break;
|
break;
|
||||||
@ -2078,20 +2079,20 @@ public class MultiPagePanel : Panel
|
|||||||
}
|
}
|
||||||
// 如果是切歌状态,不增加计数
|
// 如果是切歌状态,不增加计数
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
|
||||||
// 計算歌曲在歷史中的位置
|
// 計算歌曲在歷史中的位置
|
||||||
int songPosition = pageOffset + index;
|
int songPosition = pageOffset + index;
|
||||||
|
|
||||||
// 判斷歌曲狀態
|
// 判斷歌曲狀態
|
||||||
if (songPosition < completedCount - 1)
|
if (songPosition < completedCount)
|
||||||
{
|
{
|
||||||
// 已播放完成
|
// 已播放完成
|
||||||
hasBeenPlayed = true;
|
hasBeenPlayed = true;
|
||||||
songLabel.ForeColor = Color.Gray;
|
songLabel.ForeColor = Color.Gray;
|
||||||
statusText = IsSimplified ? "(播毕)" : "(播畢)";
|
statusText = IsSimplified ? "(播毕)" : "(播畢)";
|
||||||
}
|
}
|
||||||
else if (songPosition == completedCount - 1)
|
else if (songPosition == completedCount)
|
||||||
{
|
{
|
||||||
// 正在播放
|
// 正在播放
|
||||||
isCurrentlyPlaying = true;
|
isCurrentlyPlaying = true;
|
||||||
|
@ -860,7 +860,12 @@ namespace DualScreenDemo
|
|||||||
PrimaryForm.playStates[PrimaryForm.currentSongIndexInHistory] = PlayState.Played;
|
PrimaryForm.playStates[PrimaryForm.currentSongIndexInHistory] = PlayState.Played;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
PrimaryForm.currentSongIndexInHistory += 1;
|
bool isPlayingPublicList = PrimaryForm.userRequestedSongs.Count == 0 ||
|
||||||
|
(PrimaryForm.currentSongIndexInHistory >= PrimaryForm.userRequestedSongs.Count - 1 && PrimaryForm.Instance.videoPlayerForm.IsPlayingPublicSong);
|
||||||
|
if(!isPlayingPublicList){
|
||||||
|
PrimaryForm.currentSongIndexInHistory+=1;
|
||||||
|
}
|
||||||
|
Console.WriteLine("currentSongIndexInHistory : " + PrimaryForm.currentSongIndexInHistory);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
@ -1609,6 +1614,9 @@ namespace DualScreenDemo
|
|||||||
PrimaryForm.userRequestedSongs.Add(songData);
|
PrimaryForm.userRequestedSongs.Add(songData);
|
||||||
PrimaryForm.playedSongsHistory.Add(songData);
|
PrimaryForm.playedSongsHistory.Add(songData);
|
||||||
|
|
||||||
|
if(PrimaryForm.Instance.multiPagePanel.get_currentSongList() == PrimaryForm.playedSongsHistory)
|
||||||
|
PrimaryForm.Instance.multiPagePanel.LoadSongs(PrimaryForm.Instance.currentSongList);
|
||||||
|
|
||||||
// 更新状态
|
// 更新状态
|
||||||
if (wasEmpty)
|
if (wasEmpty)
|
||||||
{
|
{
|
||||||
|
@ -14,5 +14,5 @@ Filter: LAV Splitter
|
|||||||
Pin: Input
|
Pin: Input
|
||||||
Pin: Video
|
Pin: Video
|
||||||
Pin: Audio
|
Pin: Audio
|
||||||
Filter: C:\video\welcome.mpg
|
Filter: \\SVR01\DISK02\996724.mpg
|
||||||
Pin: Output
|
Pin: Output
|
||||||
|
Reference in New Issue
Block a user