This repository has been archived on 2025-06-24. You can view files and clone it, but cannot push or open issues or pull requests.
superstar_v1/PrimaryFormParts/HotSong/PrimaryForm.HotSongTaiwaneseNew.cs

25 lines
852 B
C#

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