2509010939
已點歌曲頁面排列修改
This commit is contained in:
parent
9b6772686c
commit
1d9705af79
@ -14,9 +14,9 @@ namespace DBObj
|
||||
|
||||
public SongData()
|
||||
{
|
||||
basic = new("", "", "", "", 1, 1, "");
|
||||
basic = new("", "", "", "", 0, 1, "");
|
||||
A = new("", "");
|
||||
B = new("", "");
|
||||
// B = new(null, null);
|
||||
isPublicSong = false;
|
||||
}
|
||||
public SongData(string songNumber, string song, string filename, int humanVoice, bool isPublic)
|
||||
|
@ -1125,7 +1125,7 @@ namespace DualScreenDemo
|
||||
new Bitmap(Path.Combine(serverPath, data["PrimaryFormSubBtn"]["QieGe"])),
|
||||
new Bitmap(Path.Combine(serverPath, data["PrimaryFormSubBtn"]["QieGe"])),
|
||||
new Bitmap(Path.Combine(serverPath, data["PrimaryFormSubBtn"]["QieGe"])),
|
||||
(sender, e) => videoPlayerForm.PlayNextSong());
|
||||
(sender, e) => { videoPlayerForm.PlayNextSong(); if (isOnOrderedSongsPage) orderedSongsButton.PerformClick(); });
|
||||
|
||||
|
||||
musicUpButton = new Button { Text = "" };
|
||||
@ -2301,33 +2301,38 @@ namespace DualScreenDemo
|
||||
autoRefreshTimer.Start(); // 开始自动刷新
|
||||
// 已點歌曲錨點
|
||||
var List = SongList.GetHistory();
|
||||
var targetNum = multiPagePanel.itemsPerPage - List.Count % multiPagePanel.itemsPerPage;
|
||||
int index = List.FindIndex(song => song.GetState() == PlayState.Playing);
|
||||
int remainder=(List.Count-index)%multiPagePanel.itemsPerPage;
|
||||
if (remainder !=0&&remainder!=1)
|
||||
int remainder=List.Count-index;
|
||||
int pivot2 = index % multiPagePanel.itemsPerPage;
|
||||
int pivot = (List.Count -remainder)%multiPagePanel.itemsPerPage;
|
||||
if (index != -1)
|
||||
{
|
||||
|
||||
if (List.Count < multiPagePanel.itemsPerPage)
|
||||
if (remainder != 0 && index != 0)
|
||||
{
|
||||
int itemsToInsert = multiPagePanel.itemsPerPage - index;
|
||||
|
||||
for (int i = 0; i < itemsToInsert; i++)
|
||||
if (List.Count <= multiPagePanel.itemsPerPage)
|
||||
{
|
||||
List.Insert(index, new SongData());
|
||||
int itemsToInsert = multiPagePanel.itemsPerPage - index;
|
||||
|
||||
for (int i = 0; i < itemsToInsert; i++)
|
||||
{
|
||||
List.Insert(index, new SongData());
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
int itemsToInsert = multiPagePanel.itemsPerPage - remainder;
|
||||
|
||||
for (int i = 0; i < itemsToInsert; i++)
|
||||
else if (pivot != 0)
|
||||
{
|
||||
List.Insert(index, new SongData());
|
||||
int itemsToInsert = multiPagePanel.itemsPerPage - pivot2 ;
|
||||
|
||||
for (int i = 0; i < itemsToInsert; i++)
|
||||
{
|
||||
List.Insert(index, new SongData());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
totalPages = (int)Math.Ceiling((double)List.Count / itemsPerPage);
|
||||
totalPages = (int)Math.Ceiling((double)List.Count / multiPagePanel.itemsPerPage);
|
||||
index = List.FindIndex(song => song.GetState() == PlayState.Playing);
|
||||
int page = 0;
|
||||
if ((index+1) > multiPagePanel.itemsPerPage) page = Math.Abs((index+1) / multiPagePanel.itemsPerPage);
|
||||
|
@ -14,7 +14,7 @@ namespace DualScreenDemo
|
||||
private static PrimaryForm primaryForm; // 儲存實例的參考
|
||||
public static Room room = new Room();
|
||||
|
||||
public static string verSion = "Server V2.10 202508291614";
|
||||
public static string verSion = "Server V2.10 202509010938";
|
||||
|
||||
[STAThread]
|
||||
static void Main()
|
||||
|
Loading…
x
Reference in New Issue
Block a user