使歌曲搜尋同歌名在同頁面排列
This commit is contained in:
parent
65c7ad7c14
commit
baa0179fb1
@ -489,8 +489,8 @@ namespace DualScreenDemo
|
|||||||
|
|
||||||
if (artistText.Length > 3)
|
if (artistText.Length > 3)
|
||||||
{
|
{
|
||||||
artistLabel.Location = new Point(artistX - 581, y + 33);
|
artistLabel.Location = new Point(artistX - 502, y + 33);
|
||||||
artistLabel.Size = new Size(artistWidth + 573, ItemHeight - 35);
|
artistLabel.Size = new Size(artistWidth + 490, ItemHeight - 35);
|
||||||
}
|
}
|
||||||
|
|
||||||
artistLabel.Text = artistText;
|
artistLabel.Text = artistText;
|
||||||
|
@ -312,7 +312,7 @@ namespace DualScreenDemo
|
|||||||
|
|
||||||
string query = string.IsNullOrWhiteSpace(searchText)
|
string query = string.IsNullOrWhiteSpace(searchText)
|
||||||
? "SELECT * FROM song_library_cache ORDER BY `song_id` DESC LIMIT 1000;"
|
? "SELECT * FROM song_library_cache ORDER BY `song_id` DESC LIMIT 1000;"
|
||||||
: $"SELECT * FROM song_library_cache WHERE `phonetic_abbr` LIKE '{searchText}%' ORDER BY `song_id`;";
|
: $"SELECT * FROM song_library_cache WHERE `phonetic_abbr` LIKE '{searchText}%' ORDER BY `song_name`;";
|
||||||
|
|
||||||
var searchResults = SearchSongs_Mysql(query);
|
var searchResults = SearchSongs_Mysql(query);
|
||||||
// 重置分頁
|
// 重置分頁
|
||||||
|
@ -231,7 +231,7 @@ namespace DualScreenDemo
|
|||||||
// 檢查是否為空字串或空白字元
|
// 檢查是否為空字串或空白字元
|
||||||
string query = string.IsNullOrWhiteSpace(searchText)
|
string query = string.IsNullOrWhiteSpace(searchText)
|
||||||
? "SELECT * FROM song_library_cache ORDER BY song_id DESC LIMIT 1000;"
|
? "SELECT * FROM song_library_cache ORDER BY song_id DESC LIMIT 1000;"
|
||||||
: $"SELECT * FROM song_library_cache WHERE song_name LIKE '{searchText}%' ORDER BY song_id DESC;";
|
: $"SELECT * FROM song_library_cache WHERE song_name LIKE '{searchText}%' ORDER BY song_name DESC;";
|
||||||
|
|
||||||
var searchResults = SearchSongs_Mysql(query);
|
var searchResults = SearchSongs_Mysql(query);
|
||||||
// 重置分頁
|
// 重置分頁
|
||||||
|
@ -288,7 +288,7 @@ namespace DualScreenDemo
|
|||||||
// 例如:根據輸入框的內容搜尋歌曲
|
// 例如:根據輸入框的內容搜尋歌曲
|
||||||
string query = string.IsNullOrWhiteSpace(searchText)
|
string query = string.IsNullOrWhiteSpace(searchText)
|
||||||
? "SELECT * FROM song_library_cache ORDER BY song_id DESC LIMIT 1000;"
|
? "SELECT * FROM song_library_cache ORDER BY song_id DESC LIMIT 1000;"
|
||||||
: $"SELECT * FROM song_library_cache WHERE song_name LIKE '{searchText}%' ORDER BY song_id DESC;";
|
: $"SELECT * FROM song_library_cache WHERE song_name LIKE '{searchText}%' ORDER BY song_name DESC;";
|
||||||
|
|
||||||
|
|
||||||
var searchResults = SearchSongs_Mysql(query);
|
var searchResults = SearchSongs_Mysql(query);
|
||||||
|
@ -267,7 +267,7 @@ namespace DualScreenDemo
|
|||||||
// 例如:根據輸入框的內容搜尋歌曲
|
// 例如:根據輸入框的內容搜尋歌曲
|
||||||
string query = string.IsNullOrWhiteSpace(searchText)
|
string query = string.IsNullOrWhiteSpace(searchText)
|
||||||
? "SELECT * FROM song_library_cache ORDER BY song_id DESC LIMIT 1000;"
|
? "SELECT * FROM song_library_cache ORDER BY song_id DESC LIMIT 1000;"
|
||||||
: $"SELECT * FROM song_library_cache WHERE pinyin_abbr LIKE '{searchText}%' ORDER BY `song_id` DESC;";
|
: $"SELECT * FROM song_library_cache WHERE pinyin_abbr LIKE '{searchText}%' ORDER BY `song_name` DESC;";
|
||||||
var searchResults = SearchSongs_Mysql(query);
|
var searchResults = SearchSongs_Mysql(query);
|
||||||
// 重置分頁
|
// 重置分頁
|
||||||
currentPage = 0;
|
currentPage = 0;
|
||||||
|
@ -509,7 +509,7 @@ namespace DualScreenDemo
|
|||||||
string query;
|
string query;
|
||||||
if (int.TryParse(searchText, out int length))
|
if (int.TryParse(searchText, out int length))
|
||||||
{
|
{
|
||||||
query = $"SELECT * FROM song_library_cache WHERE CHAR_LENGTH(song_name) = {length} ;";
|
query = $"SELECT * FROM song_library_cache WHERE CHAR_LENGTH(song_name) = {length} order by 'song_name' DESC ;";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user