superstar_v2/PrimaryFormParts/HotSong/PrimaryForm.HotSongMandarinNew.cs

23 lines
859 B
C#

namespace DualScreenDemo
{
public partial class PrimaryForm
{
private void GuoYuNewSongButtonHotSong_Click(object sender, EventArgs e)
{
// 重置其他按钮背景
UpdateHotSongButtons(guoYuNewSongButtonHotSong, guoYuNewSongHotSongActiveBackground);
int songLimit = ReadHotSongLimit();
string query = $"SELECT * FROM SongLibrary WHERE `語別` = '國語' ORDER BY `新增日期` DESC LIMIT {songLimit}";
var selectedSongs = PrimaryForm.Instance.SearchSongs_Mysql(query);
currentPage = 0;
currentSongList = selectedSongs;
totalPages = (int)Math.Ceiling((double)selectedSongs.Count / itemsPerPage);
multiPagePanel.currentPageIndex = 0;
multiPagePanel.LoadSongs(currentSongList);
}
}
}