From f048fa28cfabcf0bbfdda14358c1f01393af9fbb Mon Sep 17 00:00:00 2001 From: "allen.yan" Date: Thu, 31 Jul 2025 16:36:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=AD=8C=E5=90=8D=E6=9F=A5=E8=A9=A2->=E7=B7=A8?= =?UTF-8?q?=E8=99=9F=E6=9F=A5=E8=A9=A2=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PrimaryForm.SongSearch.NumberSearch.cs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) 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); }