diff --git a/PrimaryFormParts/SongSearch/PrimaryForm.SongSearch.NumberSearch.cs b/PrimaryFormParts/SongSearch/PrimaryForm.SongSearch.NumberSearch.cs index c63527a..90210ed 100644 --- a/PrimaryFormParts/SongSearch/PrimaryForm.SongSearch.NumberSearch.cs +++ b/PrimaryFormParts/SongSearch/PrimaryForm.SongSearch.NumberSearch.cs @@ -2,7 +2,8 @@ using System.IO; using System.Drawing.Imaging; using IniParser; using IniParser.Model; -using System.Text; +using System.Text; +using DBObj; /* WordCountSongs -> SongIDSearch @@ -49,7 +50,7 @@ namespace DualScreenDemo private float inputBoxSongIDFontSize; private FontStyle inputBoxSongIDFontStyle; private Color inputBoxSongIDForeColor; - + private readonly SQLManager songListManager; /// /// 點擊「注音歌手搜尋」按鈕時執行的事件處理函式。 /// 此函式負責更新按鈕的背景圖片、載入對應的歌手圖片,並切換相關 UI 控件的可見性。 @@ -65,8 +66,6 @@ namespace DualScreenDemo wordCountSearchSongButton.BackgroundImage = wordCountSearchSongNormalBackground; handWritingSearchSongButton.BackgroundImage = handWritingSearchSongNormalBackground; numberSearchSongButton.BackgroundImage = numberSearchSongActiveBackground; - - // 載入設定檔,取得圖片路徑資訊 var configData = LoadConfigDataforSongIDSearch(); @@ -554,13 +553,15 @@ namespace DualScreenDemo } string query = $"SELECT * FROM song_library_cache WHERE `song_id` = '{searchText}';"; - var searchResults = SearchSongs_Mysql(query); + var searchResults = SearchSongs_Mysql(query); + var song = searchResults[0]; + SongList.Add(song); // 重置分頁 currentPage = 0; totalPages = (int)Math.Ceiling((double)searchResults.Count / itemsPerPage); // 更新多頁面面板的內容 multiPagePanel.currentPageIndex = 0; - multiPagePanel.LoadSongs(searchResults); + //multiPagePanel.LoadSongs(searchResults); }