diff --git a/PrimaryFormParts/CategorySearch/PrimaryForm.CategorySearch.ChinaSongs.cs b/PrimaryFormParts/CategorySearch/PrimaryForm.CategorySearch.ChinaSongs.cs index 1767867..c95b8eb 100644 --- a/PrimaryFormParts/CategorySearch/PrimaryForm.CategorySearch.ChinaSongs.cs +++ b/PrimaryFormParts/CategorySearch/PrimaryForm.CategorySearch.ChinaSongs.cs @@ -18,11 +18,10 @@ namespace DualScreenDemo string query = SetQueryforSQL("F1"); // Set the query for SQL to filter by genre "F1" var chinaSongs = SearchSongs_Mysql(query); currentPage = 0; - currentSongList = chinaSongs; totalPages = (int)Math.Ceiling((double)chinaSongs.Count / itemsPerPage); multiPagePanel.currentPageIndex = 0; - multiPagePanel.LoadSongs(currentSongList); + multiPagePanel.LoadSongs(chinaSongs); } } } \ No newline at end of file diff --git a/PrimaryFormParts/CategorySearch/PrimaryForm.CategorySearch.LoveDuet.cs b/PrimaryFormParts/CategorySearch/PrimaryForm.CategorySearch.LoveDuet.cs index 98b2cc5..eb33c81 100644 --- a/PrimaryFormParts/CategorySearch/PrimaryForm.CategorySearch.LoveDuet.cs +++ b/PrimaryFormParts/CategorySearch/PrimaryForm.CategorySearch.LoveDuet.cs @@ -18,11 +18,10 @@ namespace DualScreenDemo string query = SetQueryforSQL("A1"); // Set the query for SQL to filter by genre "F1" var loveDuetSongs = SearchSongs_Mysql(query); currentPage = 0; - currentSongList = loveDuetSongs; totalPages = (int)Math.Ceiling((double)loveDuetSongs.Count / itemsPerPage); multiPagePanel.currentPageIndex = 0; - multiPagePanel.LoadSongs(currentSongList); + multiPagePanel.LoadSongs(loveDuetSongs); } } } \ No newline at end of file diff --git a/PrimaryFormParts/CategorySearch/PrimaryForm.CategorySearch.MedleyDance.cs b/PrimaryFormParts/CategorySearch/PrimaryForm.CategorySearch.MedleyDance.cs index 6f285d5..9e4186e 100644 --- a/PrimaryFormParts/CategorySearch/PrimaryForm.CategorySearch.MedleyDance.cs +++ b/PrimaryFormParts/CategorySearch/PrimaryForm.CategorySearch.MedleyDance.cs @@ -18,11 +18,10 @@ namespace DualScreenDemo string query = SetQueryforSQL("C1"); // Set the query for SQL to filter by genre "F1" var medleyDanceSongs = SearchSongs_Mysql(query); currentPage = 0; - currentSongList = medleyDanceSongs; totalPages = (int)Math.Ceiling((double)medleyDanceSongs.Count / itemsPerPage); multiPagePanel.currentPageIndex = 0; - multiPagePanel.LoadSongs(currentSongList); + multiPagePanel.LoadSongs(medleyDanceSongs); } } } \ No newline at end of file diff --git a/PrimaryFormParts/CategorySearch/PrimaryForm.CategorySearch.Nineties.cs b/PrimaryFormParts/CategorySearch/PrimaryForm.CategorySearch.Nineties.cs index 96cff47..393d3da 100644 --- a/PrimaryFormParts/CategorySearch/PrimaryForm.CategorySearch.Nineties.cs +++ b/PrimaryFormParts/CategorySearch/PrimaryForm.CategorySearch.Nineties.cs @@ -18,11 +18,10 @@ namespace DualScreenDemo string query = SetQueryforSQL("D1"); // Set the query for SQL to filter by genre "F1" var ninetiesSongs = SearchSongs_Mysql(query); currentPage = 0; - currentSongList = ninetiesSongs; totalPages = (int)Math.Ceiling((double)ninetiesSongs.Count / itemsPerPage); multiPagePanel.currentPageIndex = 0; - multiPagePanel.LoadSongs(currentSongList); + multiPagePanel.LoadSongs(ninetiesSongs); } } } \ No newline at end of file diff --git a/PrimaryFormParts/CategorySearch/PrimaryForm.CategorySearch.NostalgicSongs.cs b/PrimaryFormParts/CategorySearch/PrimaryForm.CategorySearch.NostalgicSongs.cs index 3fde3fd..5209092 100644 --- a/PrimaryFormParts/CategorySearch/PrimaryForm.CategorySearch.NostalgicSongs.cs +++ b/PrimaryFormParts/CategorySearch/PrimaryForm.CategorySearch.NostalgicSongs.cs @@ -18,11 +18,10 @@ namespace DualScreenDemo string query = SetQueryforSQL("E1"); // Set the query for SQL to filter by genre "F1" var nostalgicSongs = SearchSongs_Mysql(query); currentPage = 0; - currentSongList = nostalgicSongs; totalPages = (int)Math.Ceiling((double)nostalgicSongs.Count / itemsPerPage); multiPagePanel.currentPageIndex = 0; - multiPagePanel.LoadSongs(currentSongList); + multiPagePanel.LoadSongs(nostalgicSongs); } } } \ No newline at end of file diff --git a/PrimaryFormParts/CategorySearch/PrimaryForm.CategorySearch.TalentShow.cs b/PrimaryFormParts/CategorySearch/PrimaryForm.CategorySearch.TalentShow.cs index 5018064..db252ff 100644 --- a/PrimaryFormParts/CategorySearch/PrimaryForm.CategorySearch.TalentShow.cs +++ b/PrimaryFormParts/CategorySearch/PrimaryForm.CategorySearch.TalentShow.cs @@ -18,11 +18,10 @@ namespace DualScreenDemo string query = SetQueryforSQL("B1"); // Set the query for SQL to filter by genre "F1" var talentShowSongs = SearchSongs_Mysql(query); currentPage = 0; - currentSongList = talentShowSongs; totalPages = (int)Math.Ceiling((double)talentShowSongs.Count / itemsPerPage); multiPagePanel.currentPageIndex = 0; - multiPagePanel.LoadSongs(currentSongList); + multiPagePanel.LoadSongs(talentShowSongs); } } } \ No newline at end of file diff --git a/PrimaryFormParts/CategorySearch/PrimaryForm.CategorySearch.VietnameseSongs.cs b/PrimaryFormParts/CategorySearch/PrimaryForm.CategorySearch.VietnameseSongs.cs index 854e690..3ac994c 100644 --- a/PrimaryFormParts/CategorySearch/PrimaryForm.CategorySearch.VietnameseSongs.cs +++ b/PrimaryFormParts/CategorySearch/PrimaryForm.CategorySearch.VietnameseSongs.cs @@ -18,11 +18,10 @@ namespace DualScreenDemo string query = SetQueryforSQL("G1"); // Set the query for SQL to filter by genre "F1" var vietnameseSongs = SearchSongs_Mysql(query); currentPage = 0; - currentSongList = vietnameseSongs; totalPages = (int)Math.Ceiling((double)vietnameseSongs.Count / itemsPerPage); multiPagePanel.currentPageIndex = 0; - multiPagePanel.LoadSongs(currentSongList); + multiPagePanel.LoadSongs(vietnameseSongs); } } } \ No newline at end of file diff --git a/PrimaryFormParts/CategorySearch/PrimaryForm.CategorySearch.cs b/PrimaryFormParts/CategorySearch/PrimaryForm.CategorySearch.cs index e32e0a9..88dbf44 100644 --- a/PrimaryFormParts/CategorySearch/PrimaryForm.CategorySearch.cs +++ b/PrimaryFormParts/CategorySearch/PrimaryForm.CategorySearch.cs @@ -185,12 +185,11 @@ namespace DualScreenDemo string query = SetQueryforSQL("A1"); var loveDuetSongs = SearchSongs_Mysql(query); currentPage = 0; - currentSongList = loveDuetSongs; totalPages = (int)Math.Ceiling((double)loveDuetSongs.Count / itemsPerPage); multiPagePanel.currentPageIndex = 0; - multiPagePanel.LoadSongs(currentSongList); + multiPagePanel.LoadSongs(loveDuetSongs); SetHotSongButtonsVisibility(false); diff --git a/PrimaryFormParts/GroupSearch/PrimaryForm.GroupSearch.GuoYu.cs b/PrimaryFormParts/GroupSearch/PrimaryForm.GroupSearch.GuoYu.cs index 4a0b641..4107257 100644 --- a/PrimaryFormParts/GroupSearch/PrimaryForm.GroupSearch.GuoYu.cs +++ b/PrimaryFormParts/GroupSearch/PrimaryForm.GroupSearch.GuoYu.cs @@ -17,12 +17,11 @@ namespace DualScreenDemo string query = "SELECT * FROM song_library_cache WHERE language_name = '國語' AND (`artistA_category` = '團' OR `artistB_category` = '團') ORDER BY song_counts DESC;"; var guoYuSongs = SearchSongs_Mysql(query); currentPage = 0; - currentSongList = guoYuSongs; totalPages = (int)Math.Ceiling((double)guoYuSongs.Count / itemsPerPage); multiPagePanel.currentPageIndex = 0; - multiPagePanel.LoadSongs(currentSongList); + multiPagePanel.LoadSongs(guoYuSongs); } } } \ No newline at end of file diff --git a/PrimaryFormParts/GroupSearch/PrimaryForm.GroupSearch.HanYu.cs b/PrimaryFormParts/GroupSearch/PrimaryForm.GroupSearch.HanYu.cs index 8131333..ee0bac5 100644 --- a/PrimaryFormParts/GroupSearch/PrimaryForm.GroupSearch.HanYu.cs +++ b/PrimaryFormParts/GroupSearch/PrimaryForm.GroupSearch.HanYu.cs @@ -17,12 +17,11 @@ namespace DualScreenDemo string query = "SELECT * FROM song_library_cache WHERE language_name = '韓語' AND (`artistA_category` = '團' OR `artistB_category` = '團') ORDER BY song_counts DESC;"; var hanYuSongs = SearchSongs_Mysql(query); currentPage = 0; - currentSongList = hanYuSongs; totalPages = (int)Math.Ceiling((double)hanYuSongs.Count / itemsPerPage); multiPagePanel.currentPageIndex = 0; - multiPagePanel.LoadSongs(currentSongList); + multiPagePanel.LoadSongs(hanYuSongs); } } } \ No newline at end of file diff --git a/PrimaryFormParts/GroupSearch/PrimaryForm.GroupSearch.RiYu.cs b/PrimaryFormParts/GroupSearch/PrimaryForm.GroupSearch.RiYu.cs index 4fce9ea..1f097b4 100644 --- a/PrimaryFormParts/GroupSearch/PrimaryForm.GroupSearch.RiYu.cs +++ b/PrimaryFormParts/GroupSearch/PrimaryForm.GroupSearch.RiYu.cs @@ -18,12 +18,11 @@ namespace DualScreenDemo string query = "SELECT * FROM song_library_cache WHERE language_name = '日語' AND (`artistA_category` = '團' OR `artistB_category` = '團') ORDER BY song_counts DESC;"; var riYuSongs = SearchSongs_Mysql(query); currentPage = 0; - currentSongList = riYuSongs; totalPages = (int)Math.Ceiling((double)riYuSongs.Count / itemsPerPage); multiPagePanel.currentPageIndex = 0; - multiPagePanel.LoadSongs(currentSongList); + multiPagePanel.LoadSongs(riYuSongs); } } } \ No newline at end of file diff --git a/PrimaryFormParts/GroupSearch/PrimaryForm.GroupSearch.TaiYu.cs b/PrimaryFormParts/GroupSearch/PrimaryForm.GroupSearch.TaiYu.cs index 4edebbf..f5ba646 100644 --- a/PrimaryFormParts/GroupSearch/PrimaryForm.GroupSearch.TaiYu.cs +++ b/PrimaryFormParts/GroupSearch/PrimaryForm.GroupSearch.TaiYu.cs @@ -17,12 +17,11 @@ namespace DualScreenDemo string query = "SELECT * FROM song_library_cache WHERE language_name = '台語' AND (`artistA_category` = '團' OR `artistB_category` = '團') ORDER BY song_counts DESC;"; var taiYuSongs = SearchSongs_Mysql(query); currentPage = 0; - currentSongList = taiYuSongs; totalPages = (int)Math.Ceiling((double)taiYuSongs.Count / itemsPerPage); multiPagePanel.currentPageIndex = 0; - multiPagePanel.LoadSongs(currentSongList); + multiPagePanel.LoadSongs(taiYuSongs); } } } \ No newline at end of file diff --git a/PrimaryFormParts/GroupSearch/PrimaryForm.GroupSearch.YingYu.cs b/PrimaryFormParts/GroupSearch/PrimaryForm.GroupSearch.YingYu.cs index 1e1fdfd..e4891e8 100644 --- a/PrimaryFormParts/GroupSearch/PrimaryForm.GroupSearch.YingYu.cs +++ b/PrimaryFormParts/GroupSearch/PrimaryForm.GroupSearch.YingYu.cs @@ -17,12 +17,11 @@ namespace DualScreenDemo string query = "SELECT * FROM song_library_cache WHERE language_name = '英語' AND (`artistA_category` = '團' OR `artistB_category` = '團') ORDER BY song_counts DESC;"; var yingWenSongs = SearchSongs_Mysql(query); currentPage = 0; - currentSongList = yingWenSongs; totalPages = (int)Math.Ceiling((double)yingWenSongs.Count / itemsPerPage); multiPagePanel.currentPageIndex = 0; - multiPagePanel.LoadSongs(currentSongList); + multiPagePanel.LoadSongs(yingWenSongs); } } } \ No newline at end of file diff --git a/PrimaryFormParts/GroupSearch/PrimaryForm.GroupSearch.YueYu.cs b/PrimaryFormParts/GroupSearch/PrimaryForm.GroupSearch.YueYu.cs index 994ddfb..1758035 100644 --- a/PrimaryFormParts/GroupSearch/PrimaryForm.GroupSearch.YueYu.cs +++ b/PrimaryFormParts/GroupSearch/PrimaryForm.GroupSearch.YueYu.cs @@ -18,12 +18,11 @@ namespace DualScreenDemo string query = "SELECT * FROM song_library_cache WHERE language_name = '粵語' AND (`artistA_category` = '團' OR `artistB_category` = '團') ORDER BY song_counts DESC;"; var yueYuSongs = SearchSongs_Mysql(query); currentPage = 0; - currentSongList = yueYuSongs; totalPages = (int)Math.Ceiling((double)yueYuSongs.Count / itemsPerPage); multiPagePanel.currentPageIndex = 0; - multiPagePanel.LoadSongs(currentSongList); + multiPagePanel.LoadSongs(yueYuSongs); } } } \ No newline at end of file diff --git a/PrimaryFormParts/GroupSearch/PrimaryForm.GroupSearch.cs b/PrimaryFormParts/GroupSearch/PrimaryForm.GroupSearch.cs index 15be562..c57baf2 100644 --- a/PrimaryFormParts/GroupSearch/PrimaryForm.GroupSearch.cs +++ b/PrimaryFormParts/GroupSearch/PrimaryForm.GroupSearch.cs @@ -136,12 +136,11 @@ namespace DualScreenDemo string query = "SELECT * FROM song_library_cache WHERE language_name = '國語' AND (`artistA_category` = '團' OR `artistB_category` = '團') ORDER BY song_counts DESC;"; var guoYuSongs = SearchSongs_Mysql(query); currentPage = 0; - currentSongList = guoYuSongs; totalPages = (int)Math.Ceiling((double)guoYuSongs.Count / itemsPerPage); multiPagePanel.currentPageIndex = 0; - multiPagePanel.LoadSongs(currentSongList); + multiPagePanel.LoadSongs(guoYuSongs); SetHotSongButtonsVisibility(false); diff --git a/PrimaryFormParts/HotSong/PrimaryForm.HotSong.cs b/PrimaryFormParts/HotSong/PrimaryForm.HotSong.cs index 5942f98..63299d7 100644 --- a/PrimaryFormParts/HotSong/PrimaryForm.HotSong.cs +++ b/PrimaryFormParts/HotSong/PrimaryForm.HotSong.cs @@ -112,12 +112,11 @@ namespace DualScreenDemo private void UpdateSongList(List songs) { currentPage = 0; - currentSongList = songs; totalPages = (int)Math.Ceiling((double)songs.Count / itemsPerPage); multiPagePanel.currentPageIndex = 0; - multiPagePanel.LoadSongs(currentSongList); + multiPagePanel.LoadSongs(songs); } private void SetButtonsVisibility() diff --git a/PrimaryFormParts/HotSong/PrimaryForm.HotSongMandarinNew.cs b/PrimaryFormParts/HotSong/PrimaryForm.HotSongMandarinNew.cs index bafbc7a..db20f16 100644 --- a/PrimaryFormParts/HotSong/PrimaryForm.HotSongMandarinNew.cs +++ b/PrimaryFormParts/HotSong/PrimaryForm.HotSongMandarinNew.cs @@ -11,11 +11,10 @@ namespace DualScreenDemo 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); + multiPagePanel.LoadSongs(selectedSongs); } } } \ No newline at end of file diff --git a/PrimaryFormParts/HotSong/PrimaryForm.HotSongTaiwaneseNew.cs b/PrimaryFormParts/HotSong/PrimaryForm.HotSongTaiwaneseNew.cs index f138d02..53078df 100644 --- a/PrimaryFormParts/HotSong/PrimaryForm.HotSongTaiwaneseNew.cs +++ b/PrimaryFormParts/HotSong/PrimaryForm.HotSongTaiwaneseNew.cs @@ -11,11 +11,10 @@ namespace DualScreenDemo var selectedSongs = SearchSongs_Mysql(query); currentPage = 0; - currentSongList = selectedSongs; totalPages = (int)Math.Ceiling((double)selectedSongs.Count / itemsPerPage); multiPagePanel.currentPageIndex = 0; - multiPagePanel.LoadSongs(currentSongList); + multiPagePanel.LoadSongs(selectedSongs); } } } diff --git a/PrimaryFormParts/LanguageSearch/PrimaryForm.LanguageSearch.cs b/PrimaryFormParts/LanguageSearch/PrimaryForm.LanguageSearch.cs index 7993566..0029ac9 100644 --- a/PrimaryFormParts/LanguageSearch/PrimaryForm.LanguageSearch.cs +++ b/PrimaryFormParts/LanguageSearch/PrimaryForm.LanguageSearch.cs @@ -78,13 +78,10 @@ namespace DualScreenDemo string query = $"SELECT * FROM song_library_cache WHERE language_name = '國語' ORDER BY song_counts DESC LIMIT 100"; var guoYuSongs = SearchSongs_Mysql(query); currentPage = 0; - currentSongList = guoYuSongs; totalPages = (int)Math.Ceiling((double)guoYuSongs.Count / itemsPerPage); - multiPagePanel.currentPageIndex = 0; - multiPagePanel.LoadSongs(currentSongList); - + multiPagePanel.LoadSongs(guoYuSongs); SetHotSongButtonsVisibility(false); SetNewSongButtonsVisibility(false); @@ -125,16 +122,12 @@ namespace DualScreenDemo activeButton.BackgroundImage = activeBackground; string query = $"SELECT * FROM song_library_cache WHERE language_name = '{category}' ORDER BY song_counts DESC LIMIT 100"; var selectedSongs = SearchSongs_Mysql(query); - /*var selectedSongs = allSongs.Where(song => song.Category == category) - .OrderByDescending(song => song.Plays) - .ToList();*/ + currentPage = 0; - currentSongList = selectedSongs; totalPages = (int)Math.Ceiling((double)selectedSongs.Count / itemsPerPage); - multiPagePanel.currentPageIndex = 0; - multiPagePanel.LoadSongs(currentSongList); + multiPagePanel.LoadSongs(selectedSongs); } private void SetPictureBoxLanguageButtonsVisibility(bool isVisible) diff --git a/PrimaryFormParts/NewSongAlert/PrimaryForm.NewSongAlert.cs b/PrimaryFormParts/NewSongAlert/PrimaryForm.NewSongAlert.cs index b2161c7..0a91832 100644 --- a/PrimaryFormParts/NewSongAlert/PrimaryForm.NewSongAlert.cs +++ b/PrimaryFormParts/NewSongAlert/PrimaryForm.NewSongAlert.cs @@ -89,14 +89,11 @@ namespace DualScreenDemo string query = setQueryforNewSong("國語"); var guoYuSongs2 = SearchSongs_Mysql(query); currentPage = 0; - currentSongList = guoYuSongs2; totalPages = (int)Math.Ceiling((double)guoYuSongs2.Count / itemsPerPage); - multiPagePanel.currentPageIndex = 0; - multiPagePanel.LoadSongs(currentSongList); + multiPagePanel.LoadSongs(guoYuSongs2); - SetHotSongButtonsVisibility(false); SetSingerSearchButtonsVisibility(false); SetSongSearchButtonsVisibility(false); diff --git a/PrimaryFormParts/SongSearch/PrimaryForm.SongSearch.BopomofoSearch.cs b/PrimaryFormParts/SongSearch/PrimaryForm.SongSearch.BopomofoSearch.cs index 50063a1..5c351a5 100644 --- a/PrimaryFormParts/SongSearch/PrimaryForm.SongSearch.BopomofoSearch.cs +++ b/PrimaryFormParts/SongSearch/PrimaryForm.SongSearch.BopomofoSearch.cs @@ -317,11 +317,10 @@ namespace DualScreenDemo var searchResults = SearchSongs_Mysql(query); // 重置分頁 currentPage = 0; - currentSongList = searchResults; totalPages = (int)Math.Ceiling((double)searchResults.Count / itemsPerPage); // 更新多頁面面板的內容 multiPagePanel.currentPageIndex = 0; - multiPagePanel.LoadSongs(currentSongList); + multiPagePanel.LoadSongs(searchResults); } diff --git a/PrimaryFormParts/SongSearch/PrimaryForm.SongSearch.EnglishSearch.cs b/PrimaryFormParts/SongSearch/PrimaryForm.SongSearch.EnglishSearch.cs index b1f0008..41bc125 100644 --- a/PrimaryFormParts/SongSearch/PrimaryForm.SongSearch.EnglishSearch.cs +++ b/PrimaryFormParts/SongSearch/PrimaryForm.SongSearch.EnglishSearch.cs @@ -236,11 +236,10 @@ namespace DualScreenDemo var searchResults = SearchSongs_Mysql(query); // 重置分頁 currentPage = 0; - currentSongList = searchResults; totalPages = (int)Math.Ceiling((double)searchResults.Count / itemsPerPage); // 更新多頁面面板的內容 multiPagePanel.currentPageIndex = 0; - multiPagePanel.LoadSongs(currentSongList); + multiPagePanel.LoadSongs(searchResults); } diff --git a/PrimaryFormParts/SongSearch/PrimaryForm.SongSearch.HandwritingSearch.cs b/PrimaryFormParts/SongSearch/PrimaryForm.SongSearch.HandwritingSearch.cs index d2f323d..6891b03 100644 --- a/PrimaryFormParts/SongSearch/PrimaryForm.SongSearch.HandwritingSearch.cs +++ b/PrimaryFormParts/SongSearch/PrimaryForm.SongSearch.HandwritingSearch.cs @@ -294,11 +294,10 @@ namespace DualScreenDemo var searchResults = SearchSongs_Mysql(query); // 重置分頁 currentPage = 0; - currentSongList = searchResults; totalPages = (int)Math.Ceiling((double)searchResults.Count / itemsPerPage); // 更新多頁面面板的內容 multiPagePanel.currentPageIndex = 0; - multiPagePanel.LoadSongs(currentSongList); + multiPagePanel.LoadSongs(searchResults); } diff --git a/PrimaryFormParts/SongSearch/PrimaryForm.SongSearch.NumberSearch.cs b/PrimaryFormParts/SongSearch/PrimaryForm.SongSearch.NumberSearch.cs index 76296f1..c63527a 100644 --- a/PrimaryFormParts/SongSearch/PrimaryForm.SongSearch.NumberSearch.cs +++ b/PrimaryFormParts/SongSearch/PrimaryForm.SongSearch.NumberSearch.cs @@ -557,11 +557,10 @@ namespace DualScreenDemo var searchResults = SearchSongs_Mysql(query); // 重置分頁 currentPage = 0; - currentSongList = searchResults; totalPages = (int)Math.Ceiling((double)searchResults.Count / itemsPerPage); // 更新多頁面面板的內容 multiPagePanel.currentPageIndex = 0; - multiPagePanel.LoadSongs(currentSongList); + multiPagePanel.LoadSongs(searchResults); } diff --git a/PrimaryFormParts/SongSearch/PrimaryForm.SongSearch.WordCountSearch.cs b/PrimaryFormParts/SongSearch/PrimaryForm.SongSearch.WordCountSearch.cs index 1ce7734..5b1d093 100644 --- a/PrimaryFormParts/SongSearch/PrimaryForm.SongSearch.WordCountSearch.cs +++ b/PrimaryFormParts/SongSearch/PrimaryForm.SongSearch.WordCountSearch.cs @@ -490,11 +490,10 @@ namespace DualScreenDemo var searchResults = SearchSongs_Mysql(query); // 重置分頁 currentPage = 0; - currentSongList = searchResults; totalPages = (int)Math.Ceiling((double)searchResults.Count / itemsPerPage); // 更新多頁面面板的內容 multiPagePanel.currentPageIndex = 0; - multiPagePanel.LoadSongs(currentSongList); + multiPagePanel.LoadSongs(searchResults); } diff --git a/PrimaryFormParts/SongSearch/PrimaryForm.SongSearch.cs b/PrimaryFormParts/SongSearch/PrimaryForm.SongSearch.cs index 6ab33fa..81167c1 100644 --- a/PrimaryFormParts/SongSearch/PrimaryForm.SongSearch.cs +++ b/PrimaryFormParts/SongSearch/PrimaryForm.SongSearch.cs @@ -52,12 +52,11 @@ namespace DualScreenDemo string query = $"SELECT * FROM song_library_cache WHERE language_name = '國語' LIMIT 100;"; var searchResult = SearchSongs_Mysql(query); currentPage = 0; - currentSongList = searchResult; totalPages = (int)Math.Ceiling((double)searchResult.Count / itemsPerPage); multiPagePanel.currentPageIndex = 0; - multiPagePanel.LoadSongs(currentSongList); + multiPagePanel.LoadSongs(searchResult); // 隱藏其他 UI SetHotSongButtonsVisibility(false);