superstar_v2/PrimaryFormParts/NewSongAlert/PrimaryForm.NewSongAlertCantonese.cs

31 lines
1.3 KiB
C#

namespace DualScreenDemo
{
public partial class PrimaryForm
{
private void YueYuButtonNewSong_Click(object sender, EventArgs e)
{
guoYuButtonNewSong.BackgroundImage = guoYuNewSongNormalBackground;
taiYuButtonNewSong.BackgroundImage = taiYuNewSongNormalBackground;
yueYuButtonNewSong.BackgroundImage = yueYuNewSongActiveBackground;
yingWenButtonNewSong.BackgroundImage = yingWenNewSongNormalBackground;
riYuButtonNewSong.BackgroundImage = riYuNewSongNormalBackground;
hanYuButtonNewSong.BackgroundImage = hanYuNewSongNormalBackground;
int songLimit = ReadNewSongLimit();
/*yueYuSongs2 = allSongs.Where(song => song.Category == "粵語")
.OrderByDescending(song => song.AddedTime)
.Take(songLimit)
.ToList();*/
string query = setQueryforNewSong("粵語");
var yueYuSongs2 = SearchSongs_Mysql(query);
currentPage = 0;
currentSongList = yueYuSongs2;
totalPages = (int)Math.Ceiling((double)yueYuSongs2.Count / itemsPerPage);
multiPagePanel.currentPageIndex = 0;
multiPagePanel.LoadSongs(currentSongList);
}
}
}