From 453a1abc20a95df8064531e9243d8aec90f2ad80 Mon Sep 17 00:00:00 2001 From: jasonchenwork Date: Tue, 8 Apr 2025 15:54:07 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A8=BB=E8=A7=A3=E4=BF=AE=E6=94=B90408?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PrimaryForm.SongSearch.WordCountSearch.cs | 24 ------------------- .../SongSearch/PrimaryForm.SongSearch.cs | 1 - 2 files changed, 25 deletions(-) diff --git a/PrimaryFormParts/SongSearch/PrimaryForm.SongSearch.WordCountSearch.cs b/PrimaryFormParts/SongSearch/PrimaryForm.SongSearch.WordCountSearch.cs index 2f24f69..e321ac5 100644 --- a/PrimaryFormParts/SongSearch/PrimaryForm.SongSearch.WordCountSearch.cs +++ b/PrimaryFormParts/SongSearch/PrimaryForm.SongSearch.WordCountSearch.cs @@ -633,30 +633,6 @@ namespace DualScreenDemo // 調整和定位輸入框的位置及大小 ResizeAndPositionControl(inputBoxWordCountSongs, inputBoxWordCountCoords.X, inputBoxWordCountCoords.Y, inputBoxWordCountCoords.Width, inputBoxWordCountCoords.Height); - - // 設定文本變更事件,當輸入框內容改變時觸發 - /*inputBoxWordCountSongs.TextChanged += (sender, e) => - { - string searchText = inputBoxWordCountSongs.Text; // 取得輸入內容 - if (int.TryParse(searchText, out int length)) - { - // 顯示搜尋結果 - var searchResults = allSongs - .Where(song => song.Song.Length == length) - .ToList(); - - // 重置分頁 - currentPage = 0; - currentSongList = searchResults; - totalPages = (int)Math.Ceiling((double)searchResults.Count / itemsPerPage); - - // 更新多頁面面板的內容 - multiPagePanel.currentPageIndex = 0; - multiPagePanel.LoadSongs(currentSongList); - } - - - };*/ // 將輸入框加入到窗體的控件集合中 this.Controls.Add(inputBoxWordCountSongs); } diff --git a/PrimaryFormParts/SongSearch/PrimaryForm.SongSearch.cs b/PrimaryFormParts/SongSearch/PrimaryForm.SongSearch.cs index b1e515c..638c029 100644 --- a/PrimaryFormParts/SongSearch/PrimaryForm.SongSearch.cs +++ b/PrimaryFormParts/SongSearch/PrimaryForm.SongSearch.cs @@ -148,7 +148,6 @@ namespace DualScreenDemo List searchResults = new List(); string connectionString = "Server=192.168.22.170;Port=3306;Database=Karaoke-Kingpin;User=Karaoke-Kingpin;Password=ESM7yTPMnavFmbBH;"; - //string query = "SELECT * FROM SongLibrary WHERE CHAR_LENGTH(歌曲名稱) = @searchLength"; using (var connection = new MySqlConnection(connectionString)) {