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)) {