手機歌曲查詢修正
This commit is contained in:
parent
068075c89b
commit
a4b397e812
@ -71,7 +71,7 @@ namespace DBObj
|
|||||||
}
|
}
|
||||||
public List<SongData> SearchSongsByName(string keyword)
|
public List<SongData> SearchSongsByName(string keyword)
|
||||||
{
|
{
|
||||||
string query = $"SELECT * FROM song_library_cache WHERE LOWER(song_name) LIKE CONCAT('%', LOWER('{keyword}'), '%');";
|
string query = $"SELECT * FROM song_library_cache WHERE LOWER(song_name) LIKE CONCAT('%', LOWER('{keyword}'), '%') ORDER BY song_name DESC;";
|
||||||
return select_Mysql(query);
|
return select_Mysql(query);
|
||||||
}
|
}
|
||||||
public SongData SearchSongByNumber(string songNumber)
|
public SongData SearchSongByNumber(string songNumber)
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
using DualScreenDemo;
|
using DualScreenDemo;
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Numerics;
|
||||||
using System.Windows.Navigation;
|
using System.Windows.Navigation;
|
||||||
namespace DBObj
|
namespace DBObj
|
||||||
{
|
{
|
||||||
@ -93,6 +94,18 @@ namespace DBObj
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void Cancel(SongData song)
|
||||||
|
{
|
||||||
|
//if (song.FileExistsInServers())
|
||||||
|
//{
|
||||||
|
not_played.Remove(song);
|
||||||
|
played.Remove(song);
|
||||||
|
// PrimaryForm.Instance.AddSongCount(songData.Number);
|
||||||
|
chkCut();
|
||||||
|
//}
|
||||||
|
}
|
||||||
|
|
||||||
public static void Insert(SongData song)
|
public static void Insert(SongData song)
|
||||||
{
|
{
|
||||||
if (song.FileExistsInServers()) {
|
if (song.FileExistsInServers()) {
|
||||||
|
@ -5,7 +5,7 @@ namespace DualScreenDemo
|
|||||||
private void ChinaSongsButton_Click(object sender, EventArgs e)
|
private void ChinaSongsButton_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
ResetCatBtnStatus();
|
ResetCatBtnStatus();
|
||||||
|
chinaSongsButton.BackgroundImage = chinaActiveBackground;
|
||||||
/*chinaSongs = allSongs.Where(song => song.SongGenre.Contains("F1"))
|
/*chinaSongs = allSongs.Where(song => song.SongGenre.Contains("F1"))
|
||||||
.OrderByDescending(song => song.Plays)
|
.OrderByDescending(song => song.Plays)
|
||||||
.ToList();*/
|
.ToList();*/
|
||||||
|
@ -6,7 +6,7 @@ namespace DualScreenDemo
|
|||||||
{
|
{
|
||||||
|
|
||||||
ResetCatBtnStatus();
|
ResetCatBtnStatus();
|
||||||
|
loveDuetButton.BackgroundImage = loveDuetActiveBackground;
|
||||||
/*loveDuetSongs = allSongs.Where(song => song.SongGenre.Contains("A1"))
|
/*loveDuetSongs = allSongs.Where(song => song.SongGenre.Contains("A1"))
|
||||||
.OrderByDescending(song => song.Plays)
|
.OrderByDescending(song => song.Plays)
|
||||||
.ToList();*/
|
.ToList();*/
|
||||||
|
@ -5,7 +5,7 @@ namespace DualScreenDemo
|
|||||||
private void MedleyDanceButton_Click(object sender, EventArgs e)
|
private void MedleyDanceButton_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
ResetCatBtnStatus();
|
ResetCatBtnStatus();
|
||||||
|
medleyDanceButton.BackgroundImage = medleyDanceActiveBackground;
|
||||||
/*medleyDanceSongs = allSongs.Where(song => song.SongGenre.Contains("C1"))
|
/*medleyDanceSongs = allSongs.Where(song => song.SongGenre.Contains("C1"))
|
||||||
.OrderByDescending(song => song.Plays)
|
.OrderByDescending(song => song.Plays)
|
||||||
.ToList();*/
|
.ToList();*/
|
||||||
|
@ -5,7 +5,7 @@ namespace DualScreenDemo
|
|||||||
private void NinetiesButton_Click(object sender, EventArgs e)
|
private void NinetiesButton_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
ResetCatBtnStatus();
|
ResetCatBtnStatus();
|
||||||
|
ninetiesButton.BackgroundImage = ninetiesActiveBackground;
|
||||||
/*ninetiesSongs = allSongs.Where(song => song.SongGenre.Contains("D1"))
|
/*ninetiesSongs = allSongs.Where(song => song.SongGenre.Contains("D1"))
|
||||||
.OrderByDescending(song => song.Plays)
|
.OrderByDescending(song => song.Plays)
|
||||||
.ToList();*/
|
.ToList();*/
|
||||||
|
@ -5,7 +5,7 @@ namespace DualScreenDemo
|
|||||||
private void NostalgicSongsButton_Click(object sender, EventArgs e)
|
private void NostalgicSongsButton_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
ResetCatBtnStatus();
|
ResetCatBtnStatus();
|
||||||
|
nostalgicSongsButton.BackgroundImage = nostalgicSongsActiveBackground;
|
||||||
/*nostalgicSongs = allSongs.Where(song => song.SongGenre.Contains("E1"))
|
/*nostalgicSongs = allSongs.Where(song => song.SongGenre.Contains("E1"))
|
||||||
.OrderByDescending(song => song.Plays)
|
.OrderByDescending(song => song.Plays)
|
||||||
.ToList();*/
|
.ToList();*/
|
||||||
|
@ -5,7 +5,7 @@ namespace DualScreenDemo
|
|||||||
private void TalentShowButton_Click(object sender, EventArgs e)
|
private void TalentShowButton_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
ResetCatBtnStatus();
|
ResetCatBtnStatus();
|
||||||
|
talentShowButton.BackgroundImage = talentShowActiveBackground;
|
||||||
/*talentShowSongs = allSongs.Where(song => song.SongGenre.Contains("B1"))
|
/*talentShowSongs = allSongs.Where(song => song.SongGenre.Contains("B1"))
|
||||||
.OrderByDescending(song => song.Plays)
|
.OrderByDescending(song => song.Plays)
|
||||||
.ToList();*/
|
.ToList();*/
|
||||||
|
@ -5,7 +5,7 @@ namespace DualScreenDemo
|
|||||||
private void VietnameseSongsButton_Click(object sender, EventArgs e)
|
private void VietnameseSongsButton_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
ResetCatBtnStatus();
|
ResetCatBtnStatus();
|
||||||
|
vietnameseSongsButton.BackgroundImage = vietnameseActiveBackground;
|
||||||
/*vietnameseSongs = allSongs.Where(song => song.SongGenre.Contains("G1"))
|
/*vietnameseSongs = allSongs.Where(song => song.SongGenre.Contains("G1"))
|
||||||
.OrderByDescending(song => song.Plays)
|
.OrderByDescending(song => song.Plays)
|
||||||
.ToList();*/
|
.ToList();*/
|
||||||
|
@ -62,91 +62,23 @@ namespace DualScreenDemo
|
|||||||
|
|
||||||
private void InitializeCategorySearchButtons()
|
private void InitializeCategorySearchButtons()
|
||||||
{
|
{
|
||||||
|
var data = LoadBtnConfigData();
|
||||||
loveDuetNormalBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\7.類別查詢_男女情歌(未按).png"));
|
|
||||||
talentShowNormalBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\7.類別查詢_選秀節目(未按).png"));
|
|
||||||
medleyDanceNormalBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\7.類別查詢_串燒舞曲(未按).png"));
|
|
||||||
ninetiesNormalBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\7.類別查詢_90年代(未按).png"));
|
|
||||||
nostalgicSongsNormalBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\7.類別查詢_懷舊老歌(未按).png"));
|
|
||||||
chinaNormalBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\7.類別查詢_中國大陸(未按).png"));
|
|
||||||
vietnameseNormalBackground= new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\7.類別查詢_越南歌曲(未按).png"));
|
|
||||||
|
|
||||||
loveDuetActiveBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\7.類別查詢_男女情歌(已按).png"));
|
|
||||||
talentShowActiveBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\7.類別查詢_選秀節目(已按).png"));
|
|
||||||
medleyDanceActiveBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\7.類別查詢_串燒舞曲(已按).png"));
|
|
||||||
ninetiesActiveBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\7.類別查詢_90年代(已按).png"));
|
|
||||||
nostalgicSongsActiveBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\7.類別查詢_懷舊老歌(已按).png"));
|
|
||||||
chinaActiveBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\7.類別查詢_中國大陸(已按).png"));
|
|
||||||
vietnameseActiveBackground= new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\7.類別查詢_越南歌曲(已按).png"));
|
|
||||||
|
|
||||||
loveDuetButton = new Button { Text = "", Visible = false };
|
|
||||||
ConfigureButton(loveDuetButton, 1197, 225, 225, 50,
|
|
||||||
loveDuetNormalBackground,
|
|
||||||
loveDuetNormalBackground,
|
|
||||||
loveDuetActiveBackground,
|
|
||||||
LoveDuetButton_Click);
|
|
||||||
|
|
||||||
loveDuetButton.MouseLeave += (sender, e) => loveDuetButton.BackgroundImage = loveDuetActiveBackground;
|
|
||||||
|
|
||||||
|
|
||||||
talentShowButton = new Button { Text = "", Visible = false };
|
InitializeButton(ref loveDuetButton, ref loveDuetNormalBackground, ref loveDuetActiveBackground, "loveDuetButton", 1197, 225, 225, 50, data["CategorySubBtn"]["LoveDuetNormal"], data["CategorySubBtn"]["LoveDuetActive"], LoveDuetButton_Click);
|
||||||
ConfigureButton(talentShowButton, 1197, 280, 225, 50,
|
|
||||||
talentShowNormalBackground,
|
|
||||||
talentShowNormalBackground,
|
|
||||||
talentShowNormalBackground,
|
|
||||||
TalentShowButton_Click);
|
|
||||||
|
|
||||||
talentShowButton.MouseLeave += (sender, e) => talentShowButton.BackgroundImage = talentShowActiveBackground;
|
InitializeButton(ref talentShowButton, ref talentShowNormalBackground, ref talentShowActiveBackground, "talentShowButton", 1197, 280, 225, 50, data["CategorySubBtn"]["TalentNormal"], data["CategorySubBtn"]["TalentActive"], TalentShowButton_Click);
|
||||||
|
|
||||||
|
InitializeButton(ref medleyDanceButton, ref medleyDanceNormalBackground, ref medleyDanceActiveBackground, "medleyDanceButton", 1197, 335, 225, 50, data["CategorySubBtn"]["MedleyNormal"], data["CategorySubBtn"]["MedleyActive"], MedleyDanceButton_Click);
|
||||||
|
|
||||||
medleyDanceButton = new Button { Text = "", Visible = false };
|
InitializeButton(ref ninetiesButton, ref ninetiesNormalBackground, ref ninetiesActiveBackground, "ninetiesButton", 1197, 390, 225, 50, data["CategorySubBtn"]["NintiesNormail"], data["CategorySubBtn"]["NintiesActive"], NinetiesButton_Click);
|
||||||
ConfigureButton(medleyDanceButton, 1197, 335, 225, 50,
|
|
||||||
medleyDanceNormalBackground,
|
|
||||||
medleyDanceNormalBackground,
|
|
||||||
medleyDanceNormalBackground,
|
|
||||||
MedleyDanceButton_Click);
|
|
||||||
|
|
||||||
medleyDanceButton.MouseLeave += (sender, e) => medleyDanceButton.BackgroundImage = medleyDanceActiveBackground;
|
InitializeButton(ref nostalgicSongsButton, ref nostalgicSongsNormalBackground, ref nostalgicSongsActiveBackground, "nostalgicSongsButton", 1197, 445, 225, 50, data["CategorySubBtn"]["NostalgicNormal"], data["CategorySubBtn"]["NostalgicActive"], NostalgicSongsButton_Click);
|
||||||
|
|
||||||
|
InitializeButton(ref chinaSongsButton, ref chinaNormalBackground, ref chinaActiveBackground, "chinaSongsButton", 1197, 500, 225, 50, data["CategorySubBtn"]["ChinaNormal"], data["CategorySubBtn"]["ChinaActive"], ChinaSongsButton_Click);
|
||||||
|
|
||||||
ninetiesButton = new Button { Text = "", Visible = false };
|
InitializeButton(ref vietnameseSongsButton, ref vietnameseNormalBackground, ref vietnameseActiveBackground, "vietnameseSongsButton", 1197, 555, 225, 50, data["CategorySubBtn"]["VietNormal"], data["CategorySubBtn"]["VietActive"], VietnameseSongsButton_Click);
|
||||||
ConfigureButton(ninetiesButton, 1197, 390, 225, 50,
|
|
||||||
ninetiesNormalBackground,
|
|
||||||
ninetiesNormalBackground,
|
|
||||||
ninetiesNormalBackground,
|
|
||||||
NinetiesButton_Click);
|
|
||||||
|
|
||||||
ninetiesButton.MouseLeave += (sender, e) => ninetiesButton.BackgroundImage = ninetiesActiveBackground;
|
|
||||||
|
|
||||||
|
|
||||||
nostalgicSongsButton = new Button { Text = "", Visible = false };
|
|
||||||
ConfigureButton(nostalgicSongsButton, 1197, 445, 225, 50,
|
|
||||||
nostalgicSongsNormalBackground,
|
|
||||||
nostalgicSongsNormalBackground,
|
|
||||||
nostalgicSongsNormalBackground,
|
|
||||||
NostalgicSongsButton_Click);
|
|
||||||
|
|
||||||
nostalgicSongsButton.MouseLeave += (sender, e) => nostalgicSongsButton.BackgroundImage = nostalgicSongsActiveBackground;
|
|
||||||
|
|
||||||
|
|
||||||
chinaSongsButton = new Button { Text = "", Visible = false };
|
|
||||||
ConfigureButton(chinaSongsButton, 1197, 500, 225, 50,
|
|
||||||
chinaNormalBackground,
|
|
||||||
chinaNormalBackground,
|
|
||||||
chinaNormalBackground,
|
|
||||||
ChinaSongsButton_Click);
|
|
||||||
|
|
||||||
chinaSongsButton.MouseLeave += (sender, e) => chinaSongsButton.BackgroundImage = chinaActiveBackground;
|
|
||||||
|
|
||||||
|
|
||||||
vietnameseSongsButton = new Button { Text = "", Visible = false };
|
|
||||||
ConfigureButton(vietnameseSongsButton, 1197, 555, 225, 50,
|
|
||||||
vietnameseNormalBackground,
|
|
||||||
vietnameseNormalBackground,
|
|
||||||
vietnameseNormalBackground,
|
|
||||||
VietnameseSongsButton_Click);
|
|
||||||
|
|
||||||
vietnameseSongsButton.MouseLeave += (sender, e) => vietnameseSongsButton.BackgroundImage = vietnameseActiveBackground;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -154,7 +86,6 @@ namespace DualScreenDemo
|
|||||||
{
|
{
|
||||||
ResetPrimaryBtnStatus();
|
ResetPrimaryBtnStatus();
|
||||||
|
|
||||||
//categorySearchButton.BackgroundImage = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別上方_類別查詢(已按).png"));
|
|
||||||
categorySearchButton.BackgroundImage = categorySearchActiveBackground;
|
categorySearchButton.BackgroundImage = categorySearchActiveBackground;
|
||||||
isOnOrderedSongsPage = false;
|
isOnOrderedSongsPage = false;
|
||||||
|
|
||||||
|
@ -24,6 +24,20 @@ namespace DualScreenDemo
|
|||||||
|
|
||||||
var data=LoadConfigData();
|
var data=LoadConfigData();
|
||||||
|
|
||||||
|
if (isOnOrderedSongsPage)
|
||||||
|
{
|
||||||
|
vodButton = new Button();
|
||||||
|
vodButton.Text = "";
|
||||||
|
ConfigureButton(vodButton, xPosition - 119, yPosition + 35, 110, 50,
|
||||||
|
new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\歌曲點播-08.png")),
|
||||||
|
new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\歌曲點播-08.png")),
|
||||||
|
new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\歌曲點播-08.png")),
|
||||||
|
VodButton_Click);
|
||||||
|
|
||||||
|
vodButton.Visible = false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
vodButton = new Button();
|
vodButton = new Button();
|
||||||
vodButton.Text = "";
|
vodButton.Text = "";
|
||||||
ConfigureButton(vodButton, xPosition - 119, yPosition + 35, 110, 50,
|
ConfigureButton(vodButton, xPosition - 119, yPosition + 35, 110, 50,
|
||||||
@ -33,6 +47,8 @@ namespace DualScreenDemo
|
|||||||
VodButton_Click);
|
VodButton_Click);
|
||||||
|
|
||||||
vodButton.Visible = false;
|
vodButton.Visible = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
insertButton = new Button();
|
insertButton = new Button();
|
||||||
@ -99,11 +115,21 @@ namespace DualScreenDemo
|
|||||||
this.Controls.Add(vodScreenCloseButton);
|
this.Controls.Add(vodScreenCloseButton);
|
||||||
}
|
}
|
||||||
private void VodButton_Click(object sender, EventArgs e)
|
private void VodButton_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (isOnOrderedSongsPage)
|
||||||
|
{
|
||||||
|
SetVodScreenPictureBoxAndButtonsVisibility(false);
|
||||||
|
SongList.Cancel(currentSelectedSong);
|
||||||
|
orderedSongsButton.PerformClick();
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
SetVodScreenPictureBoxAndButtonsVisibility(false);
|
SetVodScreenPictureBoxAndButtonsVisibility(false);
|
||||||
SongList.Add(currentSelectedSong);
|
SongList.Add(currentSelectedSong);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
private void InsertButton_Click(object sender, EventArgs e)
|
private void InsertButton_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
SetVodScreenPictureBoxAndButtonsVisibility(false);
|
SetVodScreenPictureBoxAndButtonsVisibility(false);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user