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