diff --git a/PrimaryFormParts/PrimaryForm.MultiPagePanel.cs b/PrimaryFormParts/PrimaryForm.MultiPagePanel.cs index 93418dc..0f8774a 100644 --- a/PrimaryFormParts/PrimaryForm.MultiPagePanel.cs +++ b/PrimaryFormParts/PrimaryForm.MultiPagePanel.cs @@ -158,10 +158,10 @@ namespace DualScreenDemo } public void LoadPreviousPage() { - if (currentPageIndex > 0) + if (currentPageIndex - 1 >= 0) { currentPageIndex--; - if(currentSongList.Count == 0) + if(_isShowingSinger) { RefreshDisplayBase_Singer(); } @@ -358,6 +358,10 @@ namespace DualScreenDemo // 添加滑鼠事件 artistLabel.MouseEnter += mouseEnter; artistLabel.MouseLeave += mouseLeave; + // 滑動 + artistLabel.MouseDown += MultiPagePanel_MouseDown; + artistLabel.MouseMove += MultiPagePanel_MouseMove; + artistLabel.MouseUp += MultiPagePanel_MouseUp; separatorPanel.MouseEnter += mouseEnter; separatorPanel.MouseLeave += mouseLeave; // 添加到畫面上 @@ -612,10 +616,18 @@ namespace DualScreenDemo // 添加事件处理 songLabel.Click += PrimaryForm.Instance.Label_Click; artistLabel.Click += PrimaryForm.Instance.Label_Click; + // 滑動事件調整位置 + songLabel.MouseDown += MultiPagePanel_MouseDown; + songLabel.MouseMove += MultiPagePanel_MouseMove; + songLabel.MouseUp += MultiPagePanel_MouseUp; songLabel.MouseEnter += mouseEnter; songLabel.MouseLeave += mouseLeave; artistLabel.MouseEnter += mouseEnter; artistLabel.MouseLeave += mouseLeave; + // 滑動事件調整位置 + artistLabel.MouseDown += MultiPagePanel_MouseDown; + artistLabel.MouseMove += MultiPagePanel_MouseMove; + artistLabel.MouseUp += MultiPagePanel_MouseUp; separatorPanel.MouseEnter += mouseEnter; separatorPanel.MouseLeave += mouseLeave; // 按正确顺序添加控件