31 lines
1.3 KiB
C#
31 lines
1.3 KiB
C#
namespace DualScreenDemo
|
|
{
|
|
public partial class PrimaryForm
|
|
{
|
|
private void TaiYuButtonNewSong_Click(object sender, EventArgs e)
|
|
{
|
|
guoYuButtonNewSong.BackgroundImage = guoYuNewSongNormalBackground;
|
|
taiYuButtonNewSong.BackgroundImage = taiYuNewSongActiveBackground;
|
|
yueYuButtonNewSong.BackgroundImage = yueYuNewSongNormalBackground;
|
|
yingWenButtonNewSong.BackgroundImage = yingWenNewSongNormalBackground;
|
|
riYuButtonNewSong.BackgroundImage = riYuNewSongNormalBackground;
|
|
hanYuButtonNewSong.BackgroundImage = hanYuNewSongNormalBackground;
|
|
|
|
int songLimit = ReadNewSongLimit();
|
|
|
|
/*taiYuSongs2 = allSongs.Where(song => song.Category == "台語")
|
|
.OrderByDescending(song => song.AddedTime)
|
|
.Take(songLimit)
|
|
.ToList();*/
|
|
string query = setQueryforNewSong("台語");
|
|
var taiYuSongs2 = SearchSongs_Mysql(query);
|
|
currentPage = 0;
|
|
currentSongList = taiYuSongs2;
|
|
totalPages = (int)Math.Ceiling((double)taiYuSongs2.Count / itemsPerPage);
|
|
|
|
|
|
multiPagePanel.currentPageIndex = 0;
|
|
multiPagePanel.LoadSongs(currentSongList);
|
|
}
|
|
}
|
|
} |