superstar_v2
@ -26,10 +26,9 @@ namespace DualScreenDemo
|
||||
/// 遙控器接收資料
|
||||
/// </summary>
|
||||
public async Task ProcessData(string indata)
|
||||
{
|
||||
AddToHistory(indata);
|
||||
{ AddToHistory(indata);
|
||||
// 遙控器測試
|
||||
Console.WriteLine("遙控器: " + indata);
|
||||
// Console.WriteLine($"[{DateTime.Now:HH:mm:ss.fff}] 遙控器: {indata}");
|
||||
switch (indata)
|
||||
{
|
||||
case "A261A4": // 輸入
|
||||
@ -70,12 +69,12 @@ namespace DualScreenDemo
|
||||
// 原唱
|
||||
case "A26CA4":
|
||||
Console.WriteLine("ToggleVocalRemoval Invoked");
|
||||
InvokeAction(() => VideoPlayerForm.Instance.ToggleVocalRemoval());
|
||||
InvokeAction(() => OverlayForm.MainForm.ShowOriginalSongLabel());
|
||||
SafeInvokeAction("A26CA4",() => VideoPlayerForm.Instance.ToggleVocalRemoval());
|
||||
SafeInvokeAction("A26CA4",() => OverlayForm.MainForm.ShowOriginalSongLabel());
|
||||
break;
|
||||
// 導唱
|
||||
case "A26EA4":
|
||||
InvokeAction(() => VideoPlayerForm.Instance.ToggleVocalRemoval());
|
||||
SafeInvokeAction("A26EA4",() => VideoPlayerForm.Instance.ToggleVocalRemoval());
|
||||
break;
|
||||
case "A26DA4":
|
||||
PauseOrResumeSong();
|
||||
@ -88,106 +87,131 @@ namespace DualScreenDemo
|
||||
HandleArtistAnnouncements();
|
||||
break;
|
||||
case "A2B3A4":
|
||||
InvokeAction(() => OverlayForm.MainForm.HideAllLabels());
|
||||
InvokeAction(() => OverlayForm.MainForm.ShowVolumeUpLabel());
|
||||
SafeInvokeAction("A2B3A4",() => OverlayForm.MainForm.HideAllLabels());
|
||||
SafeInvokeAction("A2B3A4",() => OverlayForm.MainForm.ShowVolumeUpLabel());
|
||||
break;
|
||||
case "A2B4A4":
|
||||
InvokeAction(() => OverlayForm.MainForm.HideAllLabels());
|
||||
InvokeAction(() => OverlayForm.MainForm.ShowVolumeDownLabel());
|
||||
SafeInvokeAction("A2B4A4",() => OverlayForm.MainForm.HideAllLabels());
|
||||
SafeInvokeAction("A2B4A4",() => OverlayForm.MainForm.ShowVolumeDownLabel());
|
||||
break;
|
||||
case "A2B5A4":
|
||||
InvokeAction(() => OverlayForm.MainForm.HideAllLabels());
|
||||
InvokeAction(() => OverlayForm.MainForm.ShowMicUpLabel());
|
||||
SafeInvokeAction("A2B5A4",() => OverlayForm.MainForm.HideAllLabels());
|
||||
SafeInvokeAction("A2B5A4",() => OverlayForm.MainForm.ShowMicUpLabel());
|
||||
break;
|
||||
case "A2B6A4":
|
||||
InvokeAction(() => OverlayForm.MainForm.HideAllLabels());
|
||||
InvokeAction(() => OverlayForm.MainForm.ShowMicDownLabel());
|
||||
SafeInvokeAction("A2B6A4",() => OverlayForm.MainForm.HideAllLabels());
|
||||
SafeInvokeAction("A2B6A4",() => OverlayForm.MainForm.ShowMicDownLabel());
|
||||
break;
|
||||
case "A2C2A4":
|
||||
InvokeAction(() => OverlayForm.MainForm.HidemicLabels());
|
||||
InvokeAction(() => OverlayForm.MainForm.ShowStandardLabel());
|
||||
SafeInvokeAction("A2C2A4",() => OverlayForm.MainForm.HidemicLabels());
|
||||
SafeInvokeAction("A2C2A4",() => OverlayForm.MainForm.ShowStandardLabel());
|
||||
break;
|
||||
case "A2C3A4":
|
||||
InvokeAction(() => OverlayForm.MainForm.HidemicLabels());
|
||||
InvokeAction(() => OverlayForm.MainForm.ShowProfessionalLabel());
|
||||
SafeInvokeAction("A2C3A4",() => OverlayForm.MainForm.HidemicLabels());
|
||||
SafeInvokeAction("A2C3A4",() => OverlayForm.MainForm.ShowProfessionalLabel());
|
||||
break;
|
||||
case "A2C4A4":
|
||||
InvokeAction(() => OverlayForm.MainForm.HidemicLabels());
|
||||
InvokeAction(() => OverlayForm.MainForm.ShowSquareLabel());
|
||||
SafeInvokeAction("A2C4A4",() => OverlayForm.MainForm.HidemicLabels());
|
||||
SafeInvokeAction("A2C4A4",() => OverlayForm.MainForm.ShowSquareLabel());
|
||||
break;
|
||||
case "A2C1A4":
|
||||
InvokeAction(() => OverlayForm.MainForm.HidemicLabels());
|
||||
InvokeAction(() => OverlayForm.MainForm.ShowSingDownLabel());
|
||||
SafeInvokeAction("A2C1A4",() => OverlayForm.MainForm.HidemicLabels());
|
||||
SafeInvokeAction("A2C1A4",() => OverlayForm.MainForm.ShowSingDownLabel());
|
||||
break;
|
||||
case "A2D5A4":
|
||||
InvokeAction(() => OverlayForm.MainForm.HideAllLabels());
|
||||
InvokeAction(() => OverlayForm.MainForm.ShowBrightLabel());
|
||||
SafeInvokeAction("A2D5A4",() => OverlayForm.MainForm.HideAllLabels());
|
||||
SafeInvokeAction("A2D5A4",() => OverlayForm.MainForm.ShowBrightLabel());
|
||||
break;
|
||||
case "A2D7A4":
|
||||
InvokeAction(() => OverlayForm.MainForm.HideAllLabels());
|
||||
InvokeAction(() => OverlayForm.MainForm.ShowRomanticLabel());
|
||||
SafeInvokeAction("A2D7A4",() => OverlayForm.MainForm.HideAllLabels());
|
||||
SafeInvokeAction("A2D7A4",() => OverlayForm.MainForm.ShowRomanticLabel());
|
||||
break;
|
||||
/* case "A27CA4":
|
||||
InvokeAction(() => OverlayForm.MainForm.ShowMaleKeyLabel());
|
||||
break;
|
||||
case "A282A4":
|
||||
InvokeAction(() => OverlayForm.MainForm.ShowFemaleKeyLabel());
|
||||
break;*/
|
||||
/* case "A27CA4":
|
||||
InvokeAction(() => OverlayForm.MainForm.ShowMaleKeyLabel());
|
||||
break;
|
||||
case "A282A4":
|
||||
InvokeAction(() => OverlayForm.MainForm.ShowFemaleKeyLabel());
|
||||
break;*/
|
||||
case "A2D6A4":
|
||||
InvokeAction(() => OverlayForm.MainForm.HideAllLabels());
|
||||
InvokeAction(() => OverlayForm.MainForm.ShowSoftLabel());
|
||||
SafeInvokeAction("A2D6A4",() => OverlayForm.MainForm.HideAllLabels());
|
||||
SafeInvokeAction("A2D6A4",() => OverlayForm.MainForm.ShowSoftLabel());
|
||||
break;
|
||||
case "A2D8A4":
|
||||
InvokeAction(() => OverlayForm.MainForm.HideAllLabels());
|
||||
InvokeAction(() => OverlayForm.MainForm.ShowDynamicLabel());
|
||||
SafeInvokeAction("A2D8A4",() => OverlayForm.MainForm.HideAllLabels());
|
||||
SafeInvokeAction("A2D8A4",() => OverlayForm.MainForm.ShowDynamicLabel());
|
||||
break;
|
||||
case "A275A4":
|
||||
InvokeAction(() => OverlayForm.MainForm.HideAllLabels());
|
||||
InvokeAction(() => OverlayForm.MainForm.ShowTintLabel());
|
||||
SafeInvokeAction("A275A4",() => OverlayForm.MainForm.HideAllLabels());
|
||||
SafeInvokeAction("A275A4",() => OverlayForm.MainForm.ShowTintLabel());
|
||||
break;
|
||||
case "A283A4":
|
||||
InvokeAction(() => OverlayForm.MainForm.HideAllLabels());
|
||||
InvokeAction(() => OverlayForm.MainForm.ShowKeyUpLabel("↑升4調"));
|
||||
break;
|
||||
SafeInvokeAction("A283A4",() => OverlayForm.MainForm.HideAllLabels());
|
||||
SafeInvokeAction("A283A4",() => OverlayForm.MainForm.ShowKeyUpLabel("↑升4調"));
|
||||
break;
|
||||
case "A282A4":
|
||||
InvokeAction(() => OverlayForm.MainForm.HideAllLabels());
|
||||
InvokeAction(() => OverlayForm.MainForm.ShowKeyUpLabel("↑升3調"));
|
||||
SafeInvokeAction("A282A4",() => OverlayForm.MainForm.HideAllLabels());
|
||||
SafeInvokeAction("A282A4",() => OverlayForm.MainForm.ShowKeyUpLabel("↑升3調"));
|
||||
break;
|
||||
case "A281A4":
|
||||
InvokeAction(() => OverlayForm.MainForm.HideAllLabels());
|
||||
InvokeAction(() => OverlayForm.MainForm.ShowKeyUpLabel("↑升2調"));
|
||||
SafeInvokeAction("A281A4",() => OverlayForm.MainForm.HideAllLabels());
|
||||
SafeInvokeAction("A281A4",() => OverlayForm.MainForm.ShowKeyUpLabel("↑升2調"));
|
||||
break;
|
||||
case "A280A4":
|
||||
InvokeAction(() => OverlayForm.MainForm.HideAllLabels());
|
||||
InvokeAction(() => OverlayForm.MainForm.ShowKeyUpLabel("↑升1調"));
|
||||
SafeInvokeAction("A280A4",() => OverlayForm.MainForm.HideAllLabels());
|
||||
SafeInvokeAction("A280A4",() => OverlayForm.MainForm.ShowKeyUpLabel("↑升1調"));
|
||||
break;
|
||||
case "A27FA4":
|
||||
InvokeAction(() => OverlayForm.MainForm.HideAllLabels());
|
||||
InvokeAction(() => OverlayForm.MainForm.ShowStandardKeyLabel());
|
||||
SafeInvokeAction("A27FA4",() => OverlayForm.MainForm.HideAllLabels());
|
||||
SafeInvokeAction("A27FA4",() => OverlayForm.MainForm.ShowStandardKeyLabel());
|
||||
break;
|
||||
case "A27EA4":
|
||||
InvokeAction(() => OverlayForm.MainForm.HideAllLabels());
|
||||
InvokeAction(() => OverlayForm.MainForm.ShowKeyDownLabel("↓降1調"));
|
||||
SafeInvokeAction("A27EA4",() => OverlayForm.MainForm.HideAllLabels());
|
||||
SafeInvokeAction("A27EA4",() => OverlayForm.MainForm.ShowKeyDownLabel("↓降1調"));
|
||||
break;
|
||||
case "A27DA4":
|
||||
InvokeAction(() => OverlayForm.MainForm.HideAllLabels());
|
||||
InvokeAction(() => OverlayForm.MainForm.ShowKeyDownLabel("↓降2調"));
|
||||
SafeInvokeAction("A27EA4",() => OverlayForm.MainForm.HideAllLabels());
|
||||
SafeInvokeAction("A27EA4",() => OverlayForm.MainForm.ShowKeyDownLabel("↓降2調"));
|
||||
break;
|
||||
case "A27CA4":
|
||||
InvokeAction(() => OverlayForm.MainForm.HideAllLabels());
|
||||
InvokeAction(() => OverlayForm.MainForm.ShowKeyDownLabel("↓降3調"));
|
||||
SafeInvokeAction("A27CA4",() => OverlayForm.MainForm.HideAllLabels());
|
||||
SafeInvokeAction("A27CA4",() => OverlayForm.MainForm.ShowKeyDownLabel("↓降3調"));
|
||||
break;
|
||||
case "A27BA4":
|
||||
InvokeAction(() => OverlayForm.MainForm.HideAllLabels());
|
||||
InvokeAction(() => OverlayForm.MainForm.ShowKeyDownLabel("↓降4調"));
|
||||
SafeInvokeAction("A27BA4",() => OverlayForm.MainForm.HideAllLabels());
|
||||
SafeInvokeAction("A27BA4",() => OverlayForm.MainForm.ShowKeyDownLabel("↓降4調"));
|
||||
break;
|
||||
default:
|
||||
if (Regex.IsMatch(indata, @"^A23\d+A4$"))
|
||||
if (Regex.IsMatch(indata, @"^A23\d+A4$"))
|
||||
{
|
||||
HandleNumberInput(indata);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
private Dictionary<string, DateTime> _recentCommands = new();
|
||||
private readonly TimeSpan _debounceInterval = TimeSpan.FromMilliseconds(300); // 最短觸發間隔
|
||||
private void SafeInvokeAction(string commandKey, Action action)
|
||||
{
|
||||
/*var now = DateTime.Now;
|
||||
|
||||
if (_recentCommands.TryGetValue(commandKey, out DateTime lastTime))
|
||||
{
|
||||
if (now - lastTime < _debounceInterval)
|
||||
return; // 忽略短時間內的重複指令
|
||||
}
|
||||
|
||||
_recentCommands[commandKey] = now;
|
||||
*/
|
||||
// 真正執行 UI 操作
|
||||
if (OverlayForm.MainForm.InvokeRequired)
|
||||
{
|
||||
OverlayForm.MainForm.BeginInvoke(action);
|
||||
}
|
||||
else
|
||||
{
|
||||
action();
|
||||
}
|
||||
}
|
||||
|
||||
private void AddToHistory(string indata)
|
||||
|
@ -10,7 +10,7 @@ namespace DataCheck
|
||||
}
|
||||
private void menu_check()
|
||||
{
|
||||
string menuPath = @"\\SVR01\foods";
|
||||
string menuPath = @"\\svr01\foods";
|
||||
string menuPath_local = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "foods");
|
||||
|
||||
if (!Directory.Exists(menuPath_local))
|
||||
@ -73,7 +73,7 @@ namespace DataCheck
|
||||
}
|
||||
private void news_check()
|
||||
{
|
||||
string newsPath = @"\\SVR01\news";
|
||||
string newsPath = @"\\svr01\news";
|
||||
string newsPath_local = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "news");
|
||||
|
||||
if (!Directory.Exists(newsPath_local))
|
||||
|
@ -168,7 +168,10 @@ namespace HeartbeatSender
|
||||
private float GetTotalMemoryInMB()
|
||||
{
|
||||
var computerInfo = new ComputerInfo();
|
||||
return computerInfo.TotalPhysicalMemory / (1024f * 1024f); // 轉 MB
|
||||
var totalMB = computerInfo.TotalPhysicalMemory / (1024f);
|
||||
var availableMB = computerInfo.AvailablePhysicalMemory / (1024f);
|
||||
var usedMB = totalMB - availableMB;
|
||||
return usedMB; // 轉 MB
|
||||
}
|
||||
private float GetDiskTotalSizeInGB(string driveLetter = "C")
|
||||
{
|
||||
|
@ -40,6 +40,7 @@ namespace DualScreenDemo
|
||||
string randomFolderName = CreateRandomFolderAndRedirectHTML(baseDirectory);
|
||||
randomFolderPath = randomFolderName;
|
||||
|
||||
// 安裝包更新
|
||||
string localAddress = GetLocalIPAddress();
|
||||
string externalAddress = File.Exists(@"\\svr01\txt\ip.txt")
|
||||
? File.ReadAllText(@"\\svr01\txt\ip.txt").Trim()
|
||||
@ -427,36 +428,50 @@ namespace DualScreenDemo
|
||||
switch (data.Command)
|
||||
{
|
||||
case "pause":
|
||||
// 执行暂停操作
|
||||
// 执行暂停操作
|
||||
if (VideoPlayerForm.Instance.isPaused)
|
||||
{
|
||||
PrimaryForm.Instance.videoPlayerForm.Play();
|
||||
PrimaryForm.Instance.pauseButton.Visible = true;
|
||||
PrimaryForm.Instance.playButton.Visible = false;
|
||||
PrimaryForm.Instance.syncPauseButton.Visible = true;
|
||||
PrimaryForm.Instance.syncPlayButton.Visible = false;
|
||||
PrimaryForm.Instance.Invoke(new System.Action(() =>
|
||||
{
|
||||
PrimaryForm.Instance.videoPlayerForm.Play();
|
||||
PrimaryForm.Instance.pauseButton.Visible = true;
|
||||
PrimaryForm.Instance.playButton.Visible = false;
|
||||
PrimaryForm.Instance.syncPauseButton.Visible = true;
|
||||
PrimaryForm.Instance.syncPlayButton.Visible = false;
|
||||
}));
|
||||
}
|
||||
else
|
||||
{
|
||||
PrimaryForm.Instance.videoPlayerForm.Pause();
|
||||
PrimaryForm.Instance.pauseButton.Visible = false;
|
||||
PrimaryForm.Instance.playButton.Visible = true;
|
||||
PrimaryForm.Instance.syncPauseButton.Visible = false;
|
||||
PrimaryForm.Instance.syncPlayButton.Visible = true;
|
||||
PrimaryForm.Instance.Invoke(new System.Action(() =>
|
||||
{
|
||||
PrimaryForm.Instance.videoPlayerForm.Pause();
|
||||
PrimaryForm.Instance.pauseButton.Visible = false;
|
||||
PrimaryForm.Instance.playButton.Visible = true;
|
||||
PrimaryForm.Instance.syncPauseButton.Visible = false;
|
||||
PrimaryForm.Instance.syncPlayButton.Visible = true;
|
||||
}));
|
||||
}
|
||||
break;
|
||||
case "volume_up":
|
||||
// 执行音量增大操作
|
||||
PrimaryForm.SendCommandThroughSerialPort("a2 b3 a4");
|
||||
OverlayForm.MainForm.Invoke(new System.Action(() => {
|
||||
OverlayForm.MainForm.Invoke(new System.Action(() =>
|
||||
{
|
||||
OverlayForm.MainForm.ShowVolumeUpLabel();
|
||||
PrimaryForm.Instance.volumeUpTimer.Start();
|
||||
OverlayForm.MainForm.HideAllLabels();
|
||||
PrimaryForm.Instance.volumeUpTimer.Stop();
|
||||
}));
|
||||
break;
|
||||
case "mic_up":
|
||||
// 执行麦克风增大操作
|
||||
PrimaryForm.SendCommandThroughSerialPort("a2 b5 a4");
|
||||
OverlayForm.MainForm.Invoke(new System.Action(() => {
|
||||
OverlayForm.MainForm.Invoke(new System.Action(() =>
|
||||
{
|
||||
OverlayForm.MainForm.ShowMicUpLabel();
|
||||
PrimaryForm.Instance.micControlTimer.Start();
|
||||
OverlayForm.MainForm.HideAllLabels();
|
||||
PrimaryForm.Instance.micControlTimer.Stop();
|
||||
}));
|
||||
break;
|
||||
case "mute":
|
||||
@ -485,15 +500,23 @@ namespace DualScreenDemo
|
||||
case "volume_down":
|
||||
// 执行音量减小操作
|
||||
PrimaryForm.SendCommandThroughSerialPort("a2 b4 a4");
|
||||
OverlayForm.MainForm.Invoke(new System.Action(() => {
|
||||
OverlayForm.MainForm.Invoke(new System.Action(() =>
|
||||
{
|
||||
OverlayForm.MainForm.ShowVolumeDownLabel();
|
||||
PrimaryForm.Instance.volumeDownTimer.Start();
|
||||
OverlayForm.MainForm.HideAllLabels();
|
||||
PrimaryForm.Instance.volumeDownTimer.Stop();
|
||||
}));
|
||||
break;
|
||||
case "mic_down":
|
||||
// 执行麦克风减小操作
|
||||
PrimaryForm.SendCommandThroughSerialPort("a2 b6 a4");
|
||||
OverlayForm.MainForm.Invoke(new System.Action(() => {
|
||||
OverlayForm.MainForm.Invoke(new System.Action(() =>
|
||||
{
|
||||
OverlayForm.MainForm.ShowMicDownLabel();
|
||||
PrimaryForm.Instance.micControlTimer.Start();
|
||||
OverlayForm.MainForm.HideAllLabels();
|
||||
PrimaryForm.Instance.micControlTimer.Stop();
|
||||
}));
|
||||
break;
|
||||
case "original_song":
|
||||
|
@ -450,13 +450,13 @@ private static void SongDisplayTimer_Elapsed(object sender, EventArgs e)
|
||||
// 如果目前不在 UI 執行緒上,必須透過 Invoke 安全執行 UI 更新邏輯
|
||||
Console.WriteLine("SongDisplayTimer_Tick invoked on UI thread.");
|
||||
|
||||
MainForm.Invoke(new System.Action(() =>
|
||||
MainForm.BeginInvoke(new Action(() =>
|
||||
{
|
||||
// 清除目前歌曲的顯示標籤文字
|
||||
MainForm.songDisplayLabel.Text = "";
|
||||
if (MainForm.songDisplayLabel != null)
|
||||
MainForm.songDisplayLabel.Text = "";
|
||||
|
||||
// 顯示下一首歌的標籤
|
||||
MainForm.nextSongLabel.Visible = true;
|
||||
if (MainForm.nextSongLabel != null)
|
||||
MainForm.nextSongLabel.Visible = true;
|
||||
}));
|
||||
}
|
||||
else
|
||||
|
@ -14,7 +14,7 @@ namespace DualScreenDemo
|
||||
/*guoYuSongs = allSongs.Where(song => song.Category == "國語" && (song.ArtistACategory == "團" || song.ArtistBCategory == "團"))
|
||||
.OrderByDescending(song => song.Plays)
|
||||
.ToList();*/
|
||||
string query = "SELECT * FROM song_library_cache WHERE language_name = '國語' AND (`artistA_category` = '團' OR `artistB_category` = '團') ORDER BY song_id DESC;";
|
||||
string query = "SELECT * FROM song_library_cache WHERE language_name = '國語' AND (`artistA_category` = '團' OR `artistB_category` = '團') ORDER BY song_counts DESC;";
|
||||
var guoYuSongs = SearchSongs_Mysql(query);
|
||||
currentPage = 0;
|
||||
currentSongList = guoYuSongs;
|
||||
|
@ -14,7 +14,7 @@ namespace DualScreenDemo
|
||||
/*hanYuSongs = allSongs.Where(song => song.Category == "韓語" && (song.ArtistACategory == "團" || song.ArtistBCategory == "團"))
|
||||
.OrderByDescending(song => song.Plays)
|
||||
.ToList();*/
|
||||
string query = "SELECT * FROM song_library_cache WHERE language_name = '韓語' AND (`artistA_category` = '團' OR `artistB_category` = '團') ORDER BY song_id DESC;";
|
||||
string query = "SELECT * FROM song_library_cache WHERE language_name = '韓語' AND (`artistA_category` = '團' OR `artistB_category` = '團') ORDER BY song_counts DESC;";
|
||||
var hanYuSongs = SearchSongs_Mysql(query);
|
||||
currentPage = 0;
|
||||
currentSongList = hanYuSongs;
|
||||
|
@ -15,7 +15,7 @@ namespace DualScreenDemo
|
||||
.OrderByDescending(song => song.Plays)
|
||||
.ToList();*/
|
||||
|
||||
string query = "SELECT * FROM song_library_cache WHERE language_name = '日語' AND (`artistA_category` = '團' OR `artistB_category` = '團') ORDER BY song_id DESC;";
|
||||
string query = "SELECT * FROM song_library_cache WHERE language_name = '日語' AND (`artistA_category` = '團' OR `artistB_category` = '團') ORDER BY song_counts DESC;";
|
||||
var riYuSongs = SearchSongs_Mysql(query);
|
||||
currentPage = 0;
|
||||
currentSongList = riYuSongs;
|
||||
|
@ -14,7 +14,7 @@ namespace DualScreenDemo
|
||||
/*taiYuSongs = allSongs.Where(song => song.Category == "台語" && (song.ArtistACategory == "團" || song.ArtistBCategory == "團"))
|
||||
.OrderByDescending(song => song.Plays)
|
||||
.ToList();*/
|
||||
string query = "SELECT * FROM song_library_cache WHERE language_name = '台語' AND (`artistA_category` = '團' OR `artistB_category` = '團') ORDER BY song_id DESC;";
|
||||
string query = "SELECT * FROM song_library_cache WHERE language_name = '台語' AND (`artistA_category` = '團' OR `artistB_category` = '團') ORDER BY song_counts DESC;";
|
||||
var taiYuSongs = SearchSongs_Mysql(query);
|
||||
currentPage = 0;
|
||||
currentSongList = taiYuSongs;
|
||||
|
@ -14,7 +14,7 @@ namespace DualScreenDemo
|
||||
/*yingWenSongs = allSongs.Where(song => song.Category == "英語" && (song.ArtistACategory == "團" || song.ArtistBCategory == "團"))
|
||||
.OrderByDescending(song => song.Plays)
|
||||
.ToList();*/
|
||||
string query = "SELECT * FROM song_library_cache WHERE language_name = '英語' AND (`artistA_category` = '團' OR `artistB_category` = '團') ORDER BY song_id DESC;";
|
||||
string query = "SELECT * FROM song_library_cache WHERE language_name = '英語' AND (`artistA_category` = '團' OR `artistB_category` = '團') ORDER BY song_counts DESC;";
|
||||
var yingWenSongs = SearchSongs_Mysql(query);
|
||||
currentPage = 0;
|
||||
currentSongList = yingWenSongs;
|
||||
|
@ -15,7 +15,7 @@ namespace DualScreenDemo
|
||||
.OrderByDescending(song => song.Plays)
|
||||
.ToList();*/
|
||||
|
||||
string query = "SELECT * FROM song_library_cache WHERE language_name = '粵語' AND (`artistA_category` = '團' OR `artistB_category` = '團') ORDER BY song_id DESC;";
|
||||
string query = "SELECT * FROM song_library_cache WHERE language_name = '粵語' AND (`artistA_category` = '團' OR `artistB_category` = '團') ORDER BY song_counts DESC;";
|
||||
var yueYuSongs = SearchSongs_Mysql(query);
|
||||
currentPage = 0;
|
||||
currentSongList = yueYuSongs;
|
||||
|
@ -133,7 +133,7 @@ namespace DualScreenDemo
|
||||
.ToList();*/
|
||||
/* 清空搜尋欄 */
|
||||
ResetinputBox();
|
||||
string query = "SELECT * FROM song_library_cache WHERE language_name = '國語' AND (`artistA_category` = '團' OR `artistB_category` = '團') ORDER BY song_id DESC;";
|
||||
string query = "SELECT * FROM song_library_cache WHERE language_name = '國語' AND (`artistA_category` = '團' OR `artistB_category` = '團') ORDER BY song_counts DESC;";
|
||||
var guoYuSongs = SearchSongs_Mysql(query);
|
||||
currentPage = 0;
|
||||
currentSongList = guoYuSongs;
|
||||
|
@ -25,15 +25,15 @@ namespace DualScreenDemo
|
||||
int[,] coords = new int[,]
|
||||
{
|
||||
{794, 508, 70, 65},
|
||||
{873, 508, 70, 65},
|
||||
{952, 508, 70, 65},
|
||||
{1031, 508, 70, 65},
|
||||
{1110, 508, 70, 65},
|
||||
{878, 508, 70, 65},
|
||||
{962, 508, 70, 65},
|
||||
{1046, 508, 70, 65},
|
||||
{1130, 508, 70, 65},
|
||||
{794, 580, 70, 65},
|
||||
{873, 580, 70, 65},
|
||||
{952, 580, 70, 65},
|
||||
{1031, 580, 70, 65},
|
||||
{1110, 580, 70, 65}
|
||||
{878, 580, 70, 65},
|
||||
{962, 580, 70, 65},
|
||||
{1046, 580, 70, 65},
|
||||
{1130, 580, 70, 65}
|
||||
};
|
||||
|
||||
int screenW = Screen.PrimaryScreen.Bounds.Width;
|
||||
@ -53,7 +53,7 @@ namespace DualScreenDemo
|
||||
|
||||
|
||||
string fileName = (i + 2).ToString("00");
|
||||
string filePath = Path.Combine(Application.StartupPath, @"themes\superstar\我的最愛\我的最愛-" + fileName + ".png");
|
||||
string filePath = Path.Combine(Application.StartupPath, @"themes\superstar\我的最愛\我的最愛-" + fileName + ".jpg");
|
||||
favoriteNumberButton[i].BackgroundImage = Image.FromFile(filePath);
|
||||
favoriteNumberButton[i].BackgroundImageLayout = ImageLayout.Stretch;
|
||||
favoriteNumberButton[i].FlatStyle = FlatStyle.Flat;
|
||||
@ -85,7 +85,7 @@ namespace DualScreenDemo
|
||||
Name = "enterFavoriteButton"
|
||||
};
|
||||
ResizeAndPositionButton(enterFavoriteButton, 832, 657, 70, 65);
|
||||
enterFavoriteButton.BackgroundImage = Image.FromFile(Path.Combine(Application.StartupPath, @"themes\superstar\我的最愛\我的最愛-12.png"));
|
||||
enterFavoriteButton.BackgroundImage = Image.FromFile(Path.Combine(Application.StartupPath, @"themes\superstar\我的最愛\我的最愛-12.jpg"));
|
||||
enterFavoriteButton.BackgroundImageLayout = ImageLayout.Stretch;
|
||||
enterFavoriteButton.FlatStyle = FlatStyle.Flat;
|
||||
enterFavoriteButton.FlatAppearance.BorderSize = 0;
|
||||
@ -100,7 +100,7 @@ namespace DualScreenDemo
|
||||
Name = "newFavoriteButton"
|
||||
};
|
||||
ResizeAndPositionButton(newFavoriteButton, 916, 657, 70, 65);
|
||||
newFavoriteButton.BackgroundImage = Image.FromFile(Path.Combine(Application.StartupPath, @"themes\superstar\我的最愛\我的最愛-13.png"));
|
||||
newFavoriteButton.BackgroundImage = Image.FromFile(Path.Combine(Application.StartupPath, @"themes\superstar\我的最愛\我的最愛-13.jpg"));
|
||||
newFavoriteButton.BackgroundImageLayout = ImageLayout.Stretch;
|
||||
newFavoriteButton.FlatStyle = FlatStyle.Flat;
|
||||
newFavoriteButton.FlatAppearance.BorderSize = 0;
|
||||
@ -115,7 +115,7 @@ namespace DualScreenDemo
|
||||
Name = "refillFavoriteButton"
|
||||
};
|
||||
ResizeAndPositionButton(refillFavoriteButton, 999, 657, 70, 65);
|
||||
refillFavoriteButton.BackgroundImage = Image.FromFile(Path.Combine(Application.StartupPath, @"themes\superstar\我的最愛\我的最愛-14.png"));
|
||||
refillFavoriteButton.BackgroundImage = Image.FromFile(Path.Combine(Application.StartupPath, @"themes\superstar\我的最愛\我的最愛-14.jpg"));
|
||||
refillFavoriteButton.BackgroundImageLayout = ImageLayout.Stretch;
|
||||
refillFavoriteButton.FlatStyle = FlatStyle.Flat;
|
||||
refillFavoriteButton.FlatAppearance.BorderSize = 0;
|
||||
@ -130,7 +130,7 @@ namespace DualScreenDemo
|
||||
Name = "closeFavoriteButton"
|
||||
};
|
||||
ResizeAndPositionButton(closeFavoriteButton, 1083, 657, 70, 65);
|
||||
closeFavoriteButton.BackgroundImage = Image.FromFile(Path.Combine(Application.StartupPath, @"themes\superstar\我的最愛\我的最愛-15.png"));
|
||||
closeFavoriteButton.BackgroundImage = Image.FromFile(Path.Combine(Application.StartupPath, @"themes\superstar\我的最愛\我的最愛-15.jpg"));
|
||||
closeFavoriteButton.BackgroundImageLayout = ImageLayout.Stretch;
|
||||
closeFavoriteButton.FlatStyle = FlatStyle.Flat;
|
||||
closeFavoriteButton.FlatAppearance.BorderSize = 0;
|
||||
@ -349,7 +349,7 @@ namespace DualScreenDemo
|
||||
if (!FavoritePictureBox.Visible)
|
||||
{
|
||||
|
||||
ShowImageOnFavoritePictureBox(Path.Combine(Application.StartupPath, @"themes\superstar\我的最愛\我的最愛_工作區域.png"));
|
||||
ShowImageOnFavoritePictureBox(Path.Combine(Application.StartupPath, @"themes\superstar\我的最愛\我的最愛_工作區域.jpg"));
|
||||
SetFavoritePictureBoxAndButtonsVisibility(true);
|
||||
}
|
||||
else
|
||||
@ -371,25 +371,6 @@ namespace DualScreenDemo
|
||||
|
||||
private void ShowImageOnFavoritePictureBox(string imagePath)
|
||||
{
|
||||
|
||||
/*Bitmap originalImage = new Bitmap(imagePath);
|
||||
|
||||
|
||||
Console.WriteLine(String.Format("Original Image Size: {0}x{1}", originalImage.Width, originalImage.Height));
|
||||
|
||||
|
||||
Rectangle cropArea = new Rectangle(784, 393, 555, 442);
|
||||
|
||||
|
||||
Bitmap croppedImage = CropImage(originalImage, cropArea);
|
||||
|
||||
|
||||
FavoritePictureBox.Image = croppedImage;
|
||||
|
||||
|
||||
ResizeAndPositionPictureBox(FavoritePictureBox, cropArea.X, cropArea.Y, 416, 323);
|
||||
|
||||
FavoritePictureBox.Visible = true;*/
|
||||
if (File.Exists(imagePath))
|
||||
{
|
||||
// 直接載入完整圖
|
||||
@ -399,28 +380,14 @@ namespace DualScreenDemo
|
||||
FavoritePictureBox.Image = image;
|
||||
|
||||
// 設定 PictureBox 的大小與位置(依你的需要調整)
|
||||
// ResizeAndPositionPictureBox(FavoritePictureBox, 773, 380, image.Width , image.Height);
|
||||
// ResizeAndPositionPictureBox(FavoritePictureBox, 773, 380, (int)(image.Width * 0.8f) , (int)(image.Height * 0.8f));
|
||||
// 不要用 ResizeAndPositionPictureBox 這東西是static 他會導致其他東西顯示錯誤
|
||||
int screenW = Screen.PrimaryScreen.Bounds.Width;
|
||||
int screenH = Screen.PrimaryScreen.Bounds.Height;
|
||||
ResizeAndPositionPictureBox(FavoritePictureBox, 773, 380, (int)(image.Width * 0.8f) , (int)(image.Height * 0.8f));
|
||||
|
||||
float widthRatio = screenW / (float)1440;
|
||||
float heightRatio = screenH / (float)900;
|
||||
|
||||
|
||||
FavoritePictureBox.Location = new Point(
|
||||
(int)(773 * widthRatio),
|
||||
(int)(380 * heightRatio)
|
||||
);
|
||||
FavoritePictureBox.Size = new Size(
|
||||
(int)(image.Width * widthRatio),
|
||||
(int)(image.Height * heightRatio)
|
||||
);
|
||||
}
|
||||
FavoritePictureBox.Visible = true;
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("圖片檔案不存在:" + imagePath);
|
||||
}
|
||||
}
|
||||
|
||||
private void ToggleFavoritePictureBoxButtonsVisibility()
|
||||
|
@ -11,7 +11,7 @@ namespace DualScreenDemo
|
||||
try
|
||||
{
|
||||
|
||||
string imagePath = Path.Combine(Application.StartupPath, "themes/superstar/cropped_qrcode.png");
|
||||
string imagePath = Path.Combine(Application.StartupPath, "themes/superstar/cropped_qrcode.jpg");
|
||||
if (!File.Exists(imagePath))
|
||||
{
|
||||
Console.WriteLine("Base image not found: " + imagePath);
|
||||
@ -96,7 +96,7 @@ namespace DualScreenDemo
|
||||
ResizeAndPositionControl(pictureBoxQRCode, 975, 442, 226, 274);
|
||||
|
||||
|
||||
Bitmap originalImage = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\cropped_qrcode.png"));
|
||||
Bitmap originalImage = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\cropped_qrcode.jpg"));
|
||||
|
||||
|
||||
Rectangle closeQRCodeCropArea = new Rectangle(198, 6, 22, 22);
|
||||
|
@ -1,10 +1,6 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
using NAudio.Wave;
|
||||
using WMPLib;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace DualScreenDemo
|
||||
{
|
||||
@ -25,28 +21,6 @@ namespace DualScreenDemo
|
||||
{
|
||||
mediaPlayer = new WindowsMediaPlayer();
|
||||
}
|
||||
private void ConfigureImageButton(Button button, int posX, int posY, int width, int height,
|
||||
string imagePath, EventHandler clickEventHandler)
|
||||
{
|
||||
Bitmap image = new Bitmap(imagePath);
|
||||
button.SetBounds(posX, posY, image.Width, image.Height);
|
||||
|
||||
// 載入圖片
|
||||
button.BackgroundImage = image;
|
||||
button.BackgroundImageLayout = ImageLayout.Stretch;
|
||||
|
||||
// 按鈕樣式設定
|
||||
button.FlatStyle = FlatStyle.Flat;
|
||||
button.FlatAppearance.BorderSize = 0;
|
||||
button.FlatAppearance.MouseDownBackColor = Color.Transparent;
|
||||
button.FlatAppearance.MouseOverBackColor = Color.Transparent;
|
||||
|
||||
// 點擊事件
|
||||
if (clickEventHandler != null)
|
||||
button.Click += clickEventHandler;
|
||||
|
||||
this.Controls.Add(button);
|
||||
}
|
||||
|
||||
private void InitializeSoundEffectButtons()
|
||||
{
|
||||
@ -55,9 +29,9 @@ namespace DualScreenDemo
|
||||
{
|
||||
Name = "constructionButton",
|
||||
};
|
||||
string path = Path.Combine(Application.StartupPath, @"themes\superstar\場景音效\場景音效_工地.png");
|
||||
ConfigureImageButton(constructionButton, 1183, 634, 148, 64,
|
||||
path, ConstructionButton_Click);
|
||||
ConfigureButton(constructionButton, 876, 494, 148, 64,
|
||||
resizedNormalStateImageForSceneSoundEffects, resizedNormalStateImageForSceneSoundEffects, resizedNormalStateImageForSceneSoundEffects,
|
||||
ConstructionButton_Click);
|
||||
this.Controls.Add(constructionButton);
|
||||
|
||||
|
||||
@ -65,9 +39,9 @@ namespace DualScreenDemo
|
||||
{
|
||||
Name = "marketButton",
|
||||
};
|
||||
path = Path.Combine(Application.StartupPath, @"themes\superstar\場景音效\場景音效_市場.png");
|
||||
ConfigureImageButton(marketButton, 1394, 634, 148, 63,
|
||||
path, MarketButton_Click);
|
||||
ConfigureButton(marketButton, 1037, 495, 148, 63,
|
||||
resizedNormalStateImageForSceneSoundEffects, resizedNormalStateImageForSceneSoundEffects, resizedNormalStateImageForSceneSoundEffects,
|
||||
MarketButton_Click);
|
||||
this.Controls.Add(marketButton);
|
||||
|
||||
|
||||
@ -75,9 +49,9 @@ namespace DualScreenDemo
|
||||
{
|
||||
Name = "drivingButton",
|
||||
};
|
||||
path = Path.Combine(Application.StartupPath, @"themes\superstar\場景音效\場景音效_開車.png");
|
||||
ConfigureImageButton(drivingButton, 1183, 720, 148, 63,
|
||||
path, DrivingButton_Click);
|
||||
ConfigureButton(drivingButton, 876, 570, 148, 63,
|
||||
resizedNormalStateImageForSceneSoundEffects, resizedNormalStateImageForSceneSoundEffects, resizedNormalStateImageForSceneSoundEffects,
|
||||
DrivingButton_Click);
|
||||
this.Controls.Add(drivingButton);
|
||||
|
||||
|
||||
@ -85,9 +59,9 @@ namespace DualScreenDemo
|
||||
{
|
||||
Name = "airportButton",
|
||||
};
|
||||
path = Path.Combine(Application.StartupPath, @"themes\superstar\場景音效\場景音效_機場.png");
|
||||
ConfigureImageButton(airportButton, 1394, 720, 148, 63,
|
||||
path, AirportButton_Click);
|
||||
ConfigureButton(airportButton, 1037, 570, 148, 63,
|
||||
resizedNormalStateImageForSceneSoundEffects, resizedNormalStateImageForSceneSoundEffects, resizedNormalStateImageForSceneSoundEffects,
|
||||
AirportButton_Click);
|
||||
this.Controls.Add(airportButton);
|
||||
|
||||
|
||||
@ -95,9 +69,9 @@ namespace DualScreenDemo
|
||||
{
|
||||
Name = "officeButton",
|
||||
};
|
||||
path = Path.Combine(Application.StartupPath, @"themes\superstar\場景音效\場景音效_辦公室.png");
|
||||
ConfigureImageButton(officeButton, 1183, 806, 148, 64,
|
||||
path, OfficeButton_Click);
|
||||
ConfigureButton(officeButton, 876, 646, 148, 64,
|
||||
resizedNormalStateImageForSceneSoundEffects, resizedNormalStateImageForSceneSoundEffects, resizedNormalStateImageForSceneSoundEffects,
|
||||
OfficeButton_Click);
|
||||
this.Controls.Add(officeButton);
|
||||
|
||||
|
||||
@ -105,9 +79,10 @@ namespace DualScreenDemo
|
||||
{
|
||||
Name = "closeButton",
|
||||
};
|
||||
path = Path.Combine(Application.StartupPath, @"themes\superstar\場景音效\場景音效_關閉.png");
|
||||
ConfigureImageButton(closeButton, 1394, 806, 150, 63,
|
||||
path, CloseButton_Click);
|
||||
|
||||
ConfigureButton(closeButton, 1036, 646, 150, 63,
|
||||
resizedNormalStateImageForSceneSoundEffects, resizedNormalStateImageForSceneSoundEffects, resizedNormalStateImageForSceneSoundEffects,
|
||||
CloseButton_Click);
|
||||
this.Controls.Add(closeButton);
|
||||
}
|
||||
|
||||
@ -121,7 +96,7 @@ namespace DualScreenDemo
|
||||
|
||||
if (!pictureBoxSceneSoundEffects.Visible)
|
||||
{
|
||||
ShowImageOnPictureBoxSceneSoundEffects(Path.Combine(Application.StartupPath, @"themes\superstar\場景音效\場景音效.png"));
|
||||
ShowImageOnPictureBoxSceneSoundEffects(Path.Combine(Application.StartupPath, @"themes\superstar\555022.jpg"));
|
||||
SetPictureBoxSceneSoundEffectsAndButtonsVisibility(true);
|
||||
}
|
||||
else
|
||||
@ -156,30 +131,28 @@ namespace DualScreenDemo
|
||||
|
||||
public void PlayApplauseSound()
|
||||
{
|
||||
mediaPlayer.URL = Path.Combine(Application.StartupPath,"sounds" ,"zs.m4a");
|
||||
mediaPlayer.URL = Path.Combine(Application.StartupPath, "sounds", "zs.m4a");
|
||||
mediaPlayer.controls.play();
|
||||
}
|
||||
// 按鈕位置需要更改,底圖需要更改
|
||||
|
||||
private void ShowImageOnPictureBoxSceneSoundEffects(string imagePath)
|
||||
{
|
||||
|
||||
if (File.Exists(imagePath))
|
||||
{
|
||||
// 直接載入完整圖
|
||||
Bitmap image = new Bitmap(imagePath);
|
||||
Bitmap originalImage = new Bitmap(imagePath);
|
||||
|
||||
// 顯示在 PictureBox 上
|
||||
pictureBoxSceneSoundEffects.Image = image;
|
||||
|
||||
Rectangle cropArea = new Rectangle(859, 427, 342, 295);
|
||||
|
||||
// 設定 PictureBox 的大小與位置(依你的需要調整)
|
||||
ResizeAndPositionPictureBox(pictureBoxSceneSoundEffects, 850, 450, image.Width , image.Height);
|
||||
|
||||
Bitmap croppedImage = CropImage(originalImage, cropArea);
|
||||
|
||||
pictureBoxSceneSoundEffects.Visible = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("圖片檔案不存在:" + imagePath);
|
||||
}
|
||||
|
||||
pictureBoxSceneSoundEffects.Image = croppedImage;
|
||||
|
||||
|
||||
ResizeAndPositionPictureBox(pictureBoxSceneSoundEffects, cropArea.X, cropArea.Y, cropArea.Width, cropArea.Height);
|
||||
|
||||
pictureBoxSceneSoundEffects.Visible = true;
|
||||
}
|
||||
|
||||
private void TogglePictureBoxSceneSoundEffectsButtonsVisibility()
|
||||
|
@ -116,9 +116,10 @@ namespace DualScreenDemo
|
||||
}
|
||||
|
||||
|
||||
private void VodButton_Click(object sender, EventArgs e)
|
||||
private async void VodButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
SetVodScreenPictureBoxAndButtonsVisibility(false);
|
||||
await Task.Delay(1000);
|
||||
OverlayForm.MainForm.AddSongToPlaylist(currentSelectedSong);
|
||||
|
||||
}
|
||||
|
@ -1929,7 +1929,7 @@ namespace DualScreenDemo
|
||||
|
||||
string songInfo = songData.Song ?? "未提供歌曲信息";
|
||||
|
||||
g.DrawString(songInfo, font, textBrush, new PointF(73, 8));
|
||||
g.DrawString(songInfo, font, textBrush, new PointF(201, 29));
|
||||
|
||||
}
|
||||
ResizeAndPositionPictureBox(VodScreenPictureBox, xPosition, yPosition, pictureBoxWidth, pictureBoxHeight);
|
||||
|
43
Program.cs
@ -2,7 +2,7 @@ using System.IO;
|
||||
using Microsoft.Win32;
|
||||
using System.Diagnostics;
|
||||
using DBObj;
|
||||
using HeartbeatSender;
|
||||
using DataCheck;
|
||||
|
||||
namespace DualScreenDemo
|
||||
{
|
||||
@ -17,16 +17,28 @@ namespace DualScreenDemo
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
|
||||
|
||||
Console.WriteLine("隱藏滑鼠游標");
|
||||
// Cursor.Hide();
|
||||
AppDomain.CurrentDomain.ProcessExit += (s, e) =>
|
||||
{
|
||||
Cursor.Show();
|
||||
};
|
||||
Console.WriteLine("正在喚醒SVR裝置(每3分鐘呼叫一次)...");
|
||||
_ = Task.Run(async () =>
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
_ = Directory.Exists(@"\\svr01\video");
|
||||
_ = Directory.Exists(@"\\svr02\video");
|
||||
await Task.Delay(180000); // 每3min送一次
|
||||
}
|
||||
});
|
||||
|
||||
Console.WriteLine("正在與中控取得聯繫");
|
||||
// Console.WriteLine("正在與中控取得聯繫...");
|
||||
/*var sender = new HeartbeatSender.heartbeatSender();
|
||||
|
||||
|
||||
// 同步呼叫非同步登入取得 token
|
||||
bool loginSuccess = sender.LoginAndGetTokenAsync().GetAwaiter().GetResult();
|
||||
|
||||
@ -35,21 +47,27 @@ namespace DualScreenDemo
|
||||
// 先送一次心跳 (同步呼叫)
|
||||
sender.SendHeartbeatAsync().GetAwaiter().GetResult();
|
||||
|
||||
// 背景持續每3秒送心跳
|
||||
// 背景持續每5分鐘送心跳
|
||||
_ = Task.Run(async () =>
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
await sender.SendHeartbeatAsync();
|
||||
await Task.Delay(300000); // 每3秒送一次
|
||||
await Task.Delay(300000); // 每5min送一次
|
||||
}
|
||||
});
|
||||
Console.WriteLine("正在發送心跳中...");
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("登入失敗,無法送出心跳");
|
||||
}
|
||||
*/
|
||||
//之後需要做添加同步菜單+酒單+背景圖(若圖規格有做正規化)
|
||||
// DataCheck.cs 有預寫好相關流程函式
|
||||
Console.WriteLine("更新菜單和酒單...");
|
||||
dataCheck Checkprocess = new dataCheck();
|
||||
|
||||
try
|
||||
{
|
||||
// COM 初始化
|
||||
@ -62,7 +80,7 @@ namespace DualScreenDemo
|
||||
// 初始化管理器
|
||||
|
||||
songListManager = new SongListManager(); // 使用单例
|
||||
//artistManager = new ArtistManager();
|
||||
//artistManager = new ArtistManager();
|
||||
|
||||
var commandHandler = new CommandHandler(songListManager);
|
||||
serialPortManager = new SerialPortManager(commandHandler);
|
||||
@ -106,9 +124,22 @@ namespace DualScreenDemo
|
||||
primaryForm.ShowSendOffScreen();
|
||||
};
|
||||
}
|
||||
WatchDog _watchDog = new WatchDog(
|
||||
() => VideoPlayerForm.Instance.GetCurrentVideoStatus(),
|
||||
() => primaryForm.IsAppResponsive()
|
||||
);
|
||||
_watchDog.Start();
|
||||
Console.WriteLine("啟動WatchDog進行監聽");
|
||||
AppDomain.CurrentDomain.ProcessExit += (s, e) =>
|
||||
{
|
||||
_watchDog.Stop();
|
||||
};
|
||||
|
||||
|
||||
primaryForm.Show();
|
||||
Application.Run(primaryForm);
|
||||
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
@ -1,5 +1,6 @@
|
||||
using System.IO.Ports;
|
||||
using System.Text;
|
||||
using System.Collections.Concurrent;
|
||||
|
||||
namespace DualScreenDemo
|
||||
{
|
||||
@ -48,18 +49,26 @@ namespace DualScreenDemo
|
||||
|
||||
// 綁定資料接收事件
|
||||
mySerialPort.DataReceived += new SerialDataReceivedEventHandler(DataReceivedHandler);
|
||||
AppDomain.CurrentDomain.ProcessExit += (s, e) =>
|
||||
{
|
||||
cts.Cancel();
|
||||
};
|
||||
|
||||
try
|
||||
{
|
||||
mySerialPort.Open();
|
||||
Console.WriteLine($"{selectedPort} 串列埠已成功開啟。");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show($"開啟 {selectedPort} 串列埠時發生錯誤: {ex.Message}");
|
||||
}
|
||||
{
|
||||
mySerialPort.Open();
|
||||
Console.WriteLine($"{selectedPort} 串列埠已成功開啟。");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show($"開啟 {selectedPort} 串列埠時發生錯誤: {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private readonly ConcurrentQueue<string> commandQueue = new();
|
||||
public readonly CancellationTokenSource cts = new();
|
||||
private bool isProcessing = false;
|
||||
|
||||
private void DataReceivedHandler(object sender, SerialDataReceivedEventArgs e)
|
||||
{
|
||||
@ -68,19 +77,14 @@ namespace DualScreenDemo
|
||||
SerialPort sp = (SerialPort)sender;
|
||||
|
||||
if (!sp.IsOpen)
|
||||
{
|
||||
// Console.WriteLine("串列埠未開啟,無法接收資料。");
|
||||
return;
|
||||
}
|
||||
|
||||
int bytesToRead = sp.BytesToRead;
|
||||
if (bytesToRead > 0)
|
||||
{
|
||||
|
||||
byte[] buffer = new byte[bytesToRead];
|
||||
int bytesRead = sp.Read(buffer, 0, bytesToRead);
|
||||
|
||||
|
||||
StringBuilder hexData = new StringBuilder(bytesRead * 2);
|
||||
for (int i = 0; i < bytesRead; i++)
|
||||
{
|
||||
@ -88,31 +92,46 @@ namespace DualScreenDemo
|
||||
}
|
||||
|
||||
string indata = hexData.ToString();
|
||||
// Console.WriteLine($"接收到的資料 (Hex): {indata}");
|
||||
|
||||
|
||||
Task.Run(() =>
|
||||
Console.WriteLine($"[{DateTime.Now:HH:mm:ss.fff}] 遙控器: {indata}");
|
||||
|
||||
// 將資料放入佇列
|
||||
commandQueue.Enqueue(indata);
|
||||
|
||||
// 如果尚未啟動處理迴圈,則啟動
|
||||
if (!isProcessing)
|
||||
{
|
||||
try
|
||||
{
|
||||
commandHandler.ProcessData(indata);
|
||||
}
|
||||
catch (Exception processEx)
|
||||
{
|
||||
Console.WriteLine($"處理資料時發生錯誤: {processEx.Message}");
|
||||
}
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
// Console.WriteLine("未接收到任何資料。");
|
||||
isProcessing = true;
|
||||
Task.Run(ProcessQueueAsync);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine($"接收資料時發生錯誤: {ex.Message}");
|
||||
Console.WriteLine($"接收資料時發生錯誤: {ex.Message}");
|
||||
}
|
||||
}
|
||||
private async Task ProcessQueueAsync()
|
||||
{
|
||||
while (!cts.Token.IsCancellationRequested)
|
||||
{
|
||||
while (commandQueue.TryDequeue(out var cmd))
|
||||
{
|
||||
try
|
||||
{
|
||||
commandHandler.ProcessData(cmd);
|
||||
}
|
||||
catch (Exception processEx)
|
||||
{
|
||||
Console.WriteLine($"處理資料時發生錯誤: {processEx.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
await Task.Delay(10); // 避免 CPU 空轉
|
||||
}
|
||||
cts.Cancel();
|
||||
isProcessing = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -4,7 +4,6 @@ using DirectShowLib;
|
||||
using DBObj;
|
||||
using OverlayFormObj;
|
||||
using DualScreenDemo.Shared;
|
||||
|
||||
namespace DualScreenDemo
|
||||
{
|
||||
public class VideoPlayerForm : Form
|
||||
@ -1859,17 +1858,20 @@ namespace DualScreenDemo
|
||||
{
|
||||
var state = (FilterState)stateCode;
|
||||
status.PlayState = state.ToString();
|
||||
status.LastError = state.ToString();
|
||||
status.IsGraphOk = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
status.PlayState = "無法取得播放狀態";
|
||||
status.LastError = "無法取得播放狀態";
|
||||
status.IsGraphOk = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
status.PlayState = "mediaControlSecondary 物件為 null";
|
||||
status.LastError = "mediaControlSecondary 物件為 null";
|
||||
status.IsGraphOk = false;
|
||||
}
|
||||
}
|
||||
|
189
config.ini
@ -51,46 +51,46 @@ Height = 394
|
||||
Symbols=ㄅ,ㄉ,ㄍ,ㄐ,ㄓ,ㄗ,ㄛ,ㄡ,ㄤ,ㄧ,ㄆ,ㄊ,ㄎ,ㄑ,ㄔ,ㄘ,ㄜ,ㄢ,ㄦ,ㄨ,ㄇ,ㄋ,ㄏ,ㄒ,ㄕ,ㄙ,ㄞ,ㄣ,ㄩ,ㄈ,ㄌ, ,ㄖ,ㄚ,ㄠ
|
||||
|
||||
[PhoneticButtonCoordinates]
|
||||
button1 = 150,338,93,86
|
||||
button2 = 255,338,93,86
|
||||
button3 = 359,338,93,86
|
||||
button4 = 463,338,93,86
|
||||
button5 = 567,338,93,87
|
||||
button6 = 671,338,93,86
|
||||
button7 = 775,338,93,86
|
||||
button8 = 879,338,93,86
|
||||
button9 = 984,338,93,86
|
||||
button10 = 1088,338,93,86
|
||||
button11 = 151,434,93,86
|
||||
button12 = 255,434,93,86
|
||||
button13 = 359,434,93,86
|
||||
button14 = 463,434,93,86
|
||||
button15 = 567,434,93,86
|
||||
button16 = 671,434,93,86
|
||||
button17 = 775,434,93,86
|
||||
button18 = 879,434,93,86
|
||||
button19 = 984,434,93,86
|
||||
button20 = 1088,434,93,86
|
||||
button21 = 203,530,93,86
|
||||
button22 = 307,530,93,86
|
||||
button23 = 411,530,93,86
|
||||
button24 = 515,530,93,86
|
||||
button25 = 619,530,93,86
|
||||
button26 = 723,530,93,86
|
||||
button27 = 827,530,93,86
|
||||
button28 = 931,530,93,86
|
||||
button29 = 1035,530,93,86
|
||||
button30 = 255,624,93,86
|
||||
button31 = 359,624,93,86
|
||||
button32 = 463,624,202,86
|
||||
button33 = 676,624,93,86
|
||||
button34 = 780,624,93,86
|
||||
button35 = 884,624,93,86
|
||||
button1 = 150,342,93,86
|
||||
button2 = 255,342,93,86
|
||||
button3 = 359,342,93,86
|
||||
button4 = 463,342,93,86
|
||||
button5 = 567,341,93,87
|
||||
button6 = 671,341,93,86
|
||||
button7 = 775,341,93,86
|
||||
button8 = 879,340,93,86
|
||||
button9 = 984,340,93,86
|
||||
button10 = 1088,340,93,86
|
||||
button11 = 151,436,93,86
|
||||
button12 = 255,436,93,86
|
||||
button13 = 359,436,93,86
|
||||
button14 = 463,436,93,86
|
||||
button15 = 567,435,93,86
|
||||
button16 = 671,436,93,86
|
||||
button17 = 775,436,93,86
|
||||
button18 = 879,436,93,86
|
||||
button19 = 984,436,93,86
|
||||
button20 = 1088,436,93,86
|
||||
button21 = 203,532,93,86
|
||||
button22 = 307,532,93,86
|
||||
button23 = 411,532,93,86
|
||||
button24 = 515,532,93,86
|
||||
button25 = 619,531,93,86
|
||||
button26 = 723,532,93,86
|
||||
button27 = 827,532,93,86
|
||||
button28 = 931,532,93,86
|
||||
button29 = 1035,532,93,86
|
||||
button30 = 255,628,93,86
|
||||
button31 = 359,628,93,86
|
||||
button32 = 463,628,202,86
|
||||
button33 = 676,628,93,86
|
||||
button34 = 780,628,93,86
|
||||
button35 = 884,628,93,86
|
||||
|
||||
[SpecialButtonCoordinates]
|
||||
modifyButtonZhuYinSingers = 989,624,94,87
|
||||
clearButtonZhuYinSingers = 151,624,93,87
|
||||
closeButtonZhuYinSingers = 1093,624,94,87
|
||||
modifyButtonZhuYinSingers = 989,627,94,87
|
||||
clearButtonZhuYinSingers = 151,627,93,87
|
||||
closeButtonZhuYinSingers = 1093,627,94,87
|
||||
modifyButtonEnglishSingers = 1032,633,70,66
|
||||
clearButtonEnglishSingers = 408,633,70,66
|
||||
closeButtonEnglishSingers = 1110,633,70,66
|
||||
@ -100,12 +100,12 @@ closeButtonPinYinSingers = 1091,642,94,87
|
||||
refillButtonHandWritingSingers = 918,372,70,65
|
||||
clearButtonHandWritingSingers = 996,372,70,65
|
||||
closeButtonForSingers = 1074,372,70,65
|
||||
modifyButtonZhuYinSongs = 989,624,94,87
|
||||
clearButtonZhuYinSongs = 151,624,93,87
|
||||
closeButtonZhuYinSongs = 1093,624,94,87
|
||||
modifyButtonEnglishSongs = 1032,631,70,66
|
||||
clearButtonEnglishSongs = 408,631,70,66
|
||||
closeButtonEnglishSongs = 1110,631,70,66
|
||||
modifyButtonZhuYinSongs = 989,627,94,87
|
||||
clearButtonZhuYinSongs = 151,627,93,87
|
||||
closeButtonZhuYinSongs = 1093,627,94,87
|
||||
modifyButtonEnglishSongs = 1032,633,70,66
|
||||
clearButtonEnglishSongs = 408,633,70,66
|
||||
closeButtonEnglishSongs = 1110,633,70,66
|
||||
modifyButtonPinYinSongs = 987,642,94,87
|
||||
clearButtonPinYinSongs = 154,642,94,87
|
||||
closeButtonPinYinSongs = 1091,642,94,87
|
||||
@ -118,9 +118,9 @@ closeButtonWordCountSongs = 1088,624,72,67
|
||||
modifyButtonWordCountSingers = 926,624,72,67
|
||||
clearButtonWordCountSingers = 845,624,72,67
|
||||
closeButtonWordCountSingers = 1088,624,72,67
|
||||
modifyButtonSongIDSearch = 829,643,94,87
|
||||
clearButtonSongIDSearch = 722,643,93,87
|
||||
closeButtonSongIDSearch = 1043,643,94,87
|
||||
modifyButtonSongIDSearch = 811,643,94,87
|
||||
clearButtonSongIDSearch = 692,643,93,87
|
||||
closeButtonSongIDSearch = 1051,643,94,87
|
||||
|
||||
|
||||
[ModifyButtonImagesZhuYin]
|
||||
@ -141,7 +141,7 @@ mouseDown = themes\superstar\歌星\注音\VOD_歌星查詢_注音查詢(按鍵)
|
||||
[InputBoxZhuYinSingers]
|
||||
X=150
|
||||
Y=264
|
||||
Width=605
|
||||
Width=596
|
||||
Height=63
|
||||
FontName=微軟正黑體
|
||||
FontSize=26
|
||||
@ -300,32 +300,32 @@ button9_mouseDown = themes\superstar\歌星\英文\VOD_歌星查詢_英文查詢
|
||||
button9_mouseOver = themes\superstar\歌星\英文\VOD_歌星查詢_英文查詢(按鍵)-12.png
|
||||
|
||||
[EnglishLetterButtonCoordinates]
|
||||
button0 = 408,489,70,66
|
||||
button1 = 486,489,70,66
|
||||
button2 = 564,489,70,66
|
||||
button3 = 642,489,70,66
|
||||
button0 = 408,490,70,66
|
||||
button1 = 486,490,70,66
|
||||
button2 = 564,490,70,66
|
||||
button3 = 642,490,70,66
|
||||
button4 = 720,489,70,66
|
||||
button5 = 798,489,70,66
|
||||
button6 = 876,489,70,66
|
||||
button7 = 953,489,70,66
|
||||
button8 = 1032,489,70,66
|
||||
button9 = 1110,489,70,66
|
||||
button10 = 449,560,70,66
|
||||
button11 = 527,560,70,66
|
||||
button12 = 605,560,70,66
|
||||
button13 = 683,560,70,66
|
||||
button14 = 761,560,70,66
|
||||
button15 = 838,560,70,66
|
||||
button16 = 916,560,70,66
|
||||
button17 = 994,560,70,66
|
||||
button18 = 1072,560,70,66
|
||||
button19 = 486,631,70,66
|
||||
button20 = 564,631,70,66
|
||||
button21 = 642,631,70,66
|
||||
button22 = 720,631,70,66
|
||||
button23 = 798,631,70,66
|
||||
button24 = 876,631,70,66
|
||||
button25 = 954,631,70,66
|
||||
button5 = 798,490,70,66
|
||||
button6 = 876,490,70,66
|
||||
button7 = 954,490,70,66
|
||||
button8 = 1033,490,70,66
|
||||
button9 = 1111,490,70,66
|
||||
button10 = 449,561,70,66
|
||||
button11 = 527,561,70,66
|
||||
button12 = 605,561,70,66
|
||||
button13 = 683,561,70,66
|
||||
button14 = 761,561,70,66
|
||||
button15 = 839,561,70,66
|
||||
button16 = 917,561,70,66
|
||||
button17 = 995,561,70,66
|
||||
button18 = 1073,561,70,66
|
||||
button19 = 486,633,70,66
|
||||
button20 = 564,633,70,66
|
||||
button21 = 642,633,70,66
|
||||
button22 = 720,634,70,66
|
||||
button23 = 798,633,70,66
|
||||
button24 = 876,633,70,66
|
||||
button25 = 954,633,70,66
|
||||
|
||||
[EnglishLetterButtonImages]
|
||||
button0_normal = themes\superstar\歌星\英文\VOD_歌星查詢_英文查詢(按鍵)-13.png
|
||||
@ -423,9 +423,9 @@ mouseOver = themes\superstar\歌星\英文\VOD_歌星查詢_英文查詢(按鍵)
|
||||
mouseDown = themes\superstar\歌星\英文\VOD_歌星查詢_英文查詢(按鍵)-80.png
|
||||
|
||||
[InputBoxEnglishSingers]
|
||||
X = 409
|
||||
Y = 360
|
||||
Width = 478
|
||||
X = 408
|
||||
Y = 361
|
||||
Width = 444
|
||||
Height = 47
|
||||
FontName = Times New Roman
|
||||
FontSize = 26
|
||||
@ -460,7 +460,6 @@ button23 = 674,642,94,87
|
||||
button24 = 778,642,94,87
|
||||
button25 = 882,642,94,87
|
||||
|
||||
|
||||
[PinYinLetterButtonImages]
|
||||
button0_normal = themes\superstar\歌星\拼音\VOD_歌星查詢_拼音查詢(按鍵)-03.png
|
||||
button0_mouseDown = themes\superstar\歌星\拼音\VOD_歌星查詢_拼音查詢(按鍵)-32.png
|
||||
@ -557,9 +556,9 @@ mouseOver = themes\superstar\歌星\拼音\VOD_歌星查詢_拼音查詢(按鍵)
|
||||
mouseDown = themes\superstar\歌星\拼音\VOD_歌星查詢_拼音查詢(按鍵)-60.png
|
||||
|
||||
[InputBoxPinYinSingers]
|
||||
X = 156
|
||||
X = 154
|
||||
Y = 370
|
||||
Width = 628
|
||||
Width = 593
|
||||
Height = 63
|
||||
FontName = Times New Roman
|
||||
FontSize = 26
|
||||
@ -592,9 +591,9 @@ FontStyle=Bold
|
||||
ForeColor=Black
|
||||
|
||||
[InputBoxEnglishSongs]
|
||||
X = 409
|
||||
Y = 360
|
||||
Width = 478
|
||||
X = 408
|
||||
Y = 361
|
||||
Width = 444
|
||||
Height = 47
|
||||
FontName = Times New Roman
|
||||
FontSize = 26
|
||||
@ -602,9 +601,9 @@ FontStyle = Regular
|
||||
ForeColor = Black
|
||||
|
||||
[InputBoxPinYinSongs]
|
||||
X = 156
|
||||
X = 154
|
||||
Y = 370
|
||||
Width = 628
|
||||
Width = 593
|
||||
Height = 63
|
||||
FontName = Times New Roman
|
||||
FontSize = 26
|
||||
@ -698,7 +697,7 @@ Height = 442
|
||||
|
||||
[InputBoxSongIDSearch]
|
||||
X = 660
|
||||
Y = 380
|
||||
Y = 370
|
||||
Width = 530
|
||||
Height = 63
|
||||
FontName = Times New Roman
|
||||
@ -711,16 +710,16 @@ Symbols=1,2,3,4,5,6,7,8,9,0
|
||||
|
||||
[NumberSongIDButtonCoordinates]
|
||||
button0 = 650,300,94,87
|
||||
button1 = 668,453,94,87
|
||||
button2 = 775,453,94,87
|
||||
button3 = 882,453,94,87
|
||||
button4 = 989,453,94,87
|
||||
button5 = 1097,453,94,87
|
||||
button6 = 668,547,94,87
|
||||
button7 = 775,547,94,87
|
||||
button8 = 882,547,94,87
|
||||
button9 = 989,547,94,87
|
||||
button10 = 1097,547,94,87
|
||||
button1 = 662,445,94,87
|
||||
button2 = 770,445,94,87
|
||||
button3 = 880,445,94,87
|
||||
button4 = 989,445,94,87
|
||||
button5 = 1098,445,94,87
|
||||
button6 = 662,545,94,87
|
||||
button7 = 770,545,94,87
|
||||
button8 = 880,545,94,87
|
||||
button9 = 989,545,94,87
|
||||
button10 = 1098,545,94,87
|
||||
|
||||
[NumberSongIDButtonImages]
|
||||
button0_normal = themes\superstar\歌名\編號\VOD_歌名查詢_編號查詢(按鍵)-02.png
|
||||
|
@ -1,210 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup />
|
||||
<ItemGroup>
|
||||
<Compile Update="ImagePanel.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Update="OverlayFormObj\OverlayForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="OverlayFormObj\OverlayForm.Helpers.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="OverlayFormObj\OverlayForm.Labels.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PrimaryFormParts\CategorySearch\PrimaryForm.CategorySearch.ChinaSongs.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PrimaryFormParts\CategorySearch\PrimaryForm.CategorySearch.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PrimaryFormParts\CategorySearch\PrimaryForm.CategorySearch.LoveDuet.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PrimaryFormParts\CategorySearch\PrimaryForm.CategorySearch.MedleyDance.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PrimaryFormParts\CategorySearch\PrimaryForm.CategorySearch.Nineties.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PrimaryFormParts\CategorySearch\PrimaryForm.CategorySearch.NostalgicSongs.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PrimaryFormParts\CategorySearch\PrimaryForm.CategorySearch.TalentShow.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PrimaryFormParts\CategorySearch\PrimaryForm.CategorySearch.VietnameseSongs.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PrimaryFormParts\GroupSearch\PrimaryForm.GroupSearch.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PrimaryFormParts\GroupSearch\PrimaryForm.GroupSearch.GuoYu.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PrimaryFormParts\GroupSearch\PrimaryForm.GroupSearch.HanYu.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PrimaryFormParts\GroupSearch\PrimaryForm.GroupSearch.RiYu.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PrimaryFormParts\GroupSearch\PrimaryForm.GroupSearch.TaiYu.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PrimaryFormParts\GroupSearch\PrimaryForm.GroupSearch.YingYu.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PrimaryFormParts\GroupSearch\PrimaryForm.GroupSearch.YueYu.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PrimaryFormParts\HotSong\PrimaryForm.HotSong.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PrimaryFormParts\HotSong\PrimaryForm.HotSongCantonese.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PrimaryFormParts\HotSong\PrimaryForm.HotSongChinese.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PrimaryFormParts\HotSong\PrimaryForm.HotSongEnglish.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PrimaryFormParts\HotSong\PrimaryForm.HotSongJapanese.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PrimaryFormParts\HotSong\PrimaryForm.HotSongKorean.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PrimaryFormParts\HotSong\PrimaryForm.HotSongMandarinNew.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PrimaryFormParts\HotSong\PrimaryForm.HotSongTaiwanese.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PrimaryFormParts\HotSong\PrimaryForm.HotSongTaiwaneseNew.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PrimaryFormParts\LanguageSearch\PrimaryForm.LanguageSearch.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PrimaryFormParts\LanguageSearch\PrimaryForm.LanguageSearch.GuoYu.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PrimaryFormParts\LanguageSearch\PrimaryForm.LanguageSearch.HanYu.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PrimaryFormParts\LanguageSearch\PrimaryForm.LanguageSearch.KeYu.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PrimaryFormParts\LanguageSearch\PrimaryForm.LanguageSearch.RiYu.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PrimaryFormParts\LanguageSearch\PrimaryForm.LanguageSearch.TaiYu.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PrimaryFormParts\LanguageSearch\PrimaryForm.LanguageSearch.YingWen.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PrimaryFormParts\LanguageSearch\PrimaryForm.LanguageSearch.YueYu.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PrimaryFormParts\NewSongAlert\PrimaryForm.NewSongAlert.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PrimaryFormParts\NewSongAlert\PrimaryForm.NewSongAlertCantonese.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PrimaryFormParts\NewSongAlert\PrimaryForm.NewSongAlertChinese.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PrimaryFormParts\NewSongAlert\PrimaryForm.NewSongAlertEnglish.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PrimaryFormParts\NewSongAlert\PrimaryForm.NewSongAlertJapanese.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PrimaryFormParts\NewSongAlert\PrimaryForm.NewSongAlertKorean.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PrimaryFormParts\NewSongAlert\PrimaryForm.NewSongAlertTaiwanese.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PrimaryFormParts\PrimaryForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PrimaryFormParts\PrimaryForm.Favorite.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PrimaryFormParts\PrimaryForm.OrderedSongs.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PrimaryFormParts\PrimaryForm.Promotions.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PrimaryFormParts\PrimaryForm.PromotionsAndMenuPanel.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PrimaryFormParts\PrimaryForm.QRCode.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PrimaryFormParts\PrimaryForm.SoundEffects.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PrimaryFormParts\PrimaryForm.SyncScreen.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PrimaryFormParts\PrimaryForm.ToggleLight.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PrimaryFormParts\PrimaryForm.VodScreen.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PrimaryFormParts\SingerSearch\PrimaryForm.SingerSearch.BopomofoSearch.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PrimaryFormParts\SingerSearch\PrimaryForm.SingerSearch.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PrimaryFormParts\SingerSearch\PrimaryForm.SingerSearch.EnglishSearch.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PrimaryFormParts\SingerSearch\PrimaryForm.SingerSearch.HandwritingSearch.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PrimaryFormParts\SingerSearch\PrimaryForm.SingerSearch.PinyinSearch.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PrimaryFormParts\SingerSearch\PrimaryForm.SingerSearch.WordCountSearch.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PrimaryFormParts\SongSearch\PrimaryForm.SongSearch.BopomofoSearch.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PrimaryFormParts\SongSearch\PrimaryForm.SongSearch.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PrimaryFormParts\SongSearch\PrimaryForm.SongSearch.EnglishSearch.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PrimaryFormParts\SongSearch\PrimaryForm.SongSearch.HandwritingSearch.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PrimaryFormParts\SongSearch\PrimaryForm.SongSearch.NumberSearch.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PrimaryFormParts\SongSearch\PrimaryForm.SongSearch.PinyinSearch.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PrimaryFormParts\SongSearch\PrimaryForm.SongSearch.WordCountSearch.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PromotionsAndMenuPanel.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Update="VideoPlayerForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
</Project>
|
@ -4,8 +4,8 @@
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net8.0-windows</TargetFramework>
|
||||
<ApplicationIcon>Images/superstar.ico</ApplicationIcon>
|
||||
<RootNamespace>superstar_1.1.0</RootNamespace>
|
||||
<AssemblyName>superstar_1.1.0</AssemblyName>
|
||||
<RootNamespace>superstar_1.2.0</RootNamespace>
|
||||
<AssemblyName>superstar_1.2.0</AssemblyName>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<UseWPF>true</UseWPF>
|
@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.11.35303.130
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "superstar_1.0.0", "superstar_1.0.0.csproj", "{7B73DAAC-0C3D-47D0-8ABC-CAF0B80350EB}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "superstar_1.2.0", "superstar_1.2.0.csproj", "{7B73DAAC-0C3D-47D0-8ABC-CAF0B80350EB}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
@ -17,7 +17,7 @@
|
||||
margin: 20px;
|
||||
}
|
||||
.header {
|
||||
background: #FFA500;
|
||||
background: #D32F2F;
|
||||
padding: 10px 0;
|
||||
color: white;
|
||||
font-size: 24px;
|
||||
|
@ -17,7 +17,7 @@
|
||||
margin: 20px;
|
||||
}
|
||||
.header {
|
||||
background: #FFA500;
|
||||
background: #D32F2F;
|
||||
padding: 10px 0;
|
||||
color: white;
|
||||
font-size: 24px;
|
||||
|
@ -17,7 +17,7 @@
|
||||
margin: 20px;
|
||||
}
|
||||
.header {
|
||||
background: #FFA500;
|
||||
background: #D32F2F;
|
||||
padding: 10px 0;
|
||||
color: white;
|
||||
font-size: 24px;
|
||||
|
@ -17,7 +17,7 @@
|
||||
margin: 20px;
|
||||
}
|
||||
.header {
|
||||
background: #FFA500;
|
||||
background: #D32F2F;
|
||||
padding: 10px 0;
|
||||
color: white;
|
||||
font-size: 24px;
|
||||
|
@ -17,7 +17,7 @@
|
||||
margin: 20px;
|
||||
}
|
||||
.header {
|
||||
background: #FFA500;
|
||||
background: #D32F2F;
|
||||
padding: 10px 0;
|
||||
color: white;
|
||||
font-size: 24px;
|
||||
@ -254,7 +254,7 @@
|
||||
<tr>
|
||||
<th>歌名</th>
|
||||
<th>歌手</th>
|
||||
<!-- <th>語別</th> -->
|
||||
<th>語別</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@ -270,7 +270,7 @@
|
||||
<p>歌名:<span id="detail-song-name"></span></p>
|
||||
<p>編號:<span id="detail-song-number"></span></p>
|
||||
<p>歌手:<span id="detail-singer"></span></p>
|
||||
<!-- <p>語別:<span id="detail-language"></span></p> -->
|
||||
<p>語別:<span id="detail-language"></span></p>
|
||||
<button id="order-song-button">包廂點歌</button>
|
||||
<button id="insert-song-button">插播歌曲</button>
|
||||
</div>
|
||||
@ -350,15 +350,15 @@
|
||||
const row = document.createElement('tr');
|
||||
const songNameCell = document.createElement('td');
|
||||
const singerCell = document.createElement('td');
|
||||
// const languageCell = document.createElement('td');
|
||||
const languageCell = document.createElement('td');
|
||||
|
||||
songNameCell.textContent = song.Song;
|
||||
singerCell.textContent = song.ArtistA;
|
||||
// languageCell.textContent = song.Category;
|
||||
languageCell.textContent = song.Category;
|
||||
|
||||
row.appendChild(songNameCell);
|
||||
row.appendChild(singerCell);
|
||||
// row.appendChild(languageCell);
|
||||
row.appendChild(languageCell);
|
||||
|
||||
row.addEventListener('click', (e) => {
|
||||
e.preventDefault();
|
||||
@ -369,7 +369,7 @@
|
||||
document.getElementById('detail-song-name').textContent = song.Song;
|
||||
document.getElementById('detail-song-number').textContent = song.SongNumber;
|
||||
document.getElementById('detail-singer').textContent = song.ArtistA;
|
||||
// document.getElementById('detail-language').textContent = song.Category;
|
||||
document.getElementById('detail-language').textContent = song.Category;
|
||||
|
||||
document.getElementById('song-details').style.display = 'block';
|
||||
});
|
||||
|
@ -17,7 +17,7 @@
|
||||
margin: 20px;
|
||||
}
|
||||
.header {
|
||||
background: #FFA500;
|
||||
background: #D32F2F;
|
||||
padding: 10px 0;
|
||||
color: white;
|
||||
font-size: 24px;
|
||||
@ -95,7 +95,7 @@
|
||||
|
||||
<!-- Add Banner -->
|
||||
<div class="banner">
|
||||
<img src="手機點歌/BANNER-13.png" alt="金麗都 Banner">
|
||||
<img src="手機點歌/BANNER-13.png" alt="超級巨星 Banner">
|
||||
</div>
|
||||
|
||||
<div class="menu-toggle">
|
||||
|
@ -17,7 +17,7 @@
|
||||
margin: 20px;
|
||||
}
|
||||
.header {
|
||||
background: #FFA500;
|
||||
background: #D32F2F;
|
||||
padding: 10px 0;
|
||||
color: white;
|
||||
font-size: 24px;
|
||||
@ -157,7 +157,7 @@
|
||||
|
||||
<!-- Add Banner -->
|
||||
<div class="banner">
|
||||
<img src="手機點歌/BANNER-14.png" alt="金麗都 Banner">
|
||||
<img src="手機點歌/BANNER-14.png" alt="超級巨星 Banner">
|
||||
</div>
|
||||
|
||||
<div class="menu-toggle">
|
||||
|
BIN
themes/superstar/_www/sctkynnxp2b/qrcode.png
Normal file
After Width: | Height: | Size: 3.8 KiB |
288
themes/superstar/_www/sctkynnxp2b/windows.html
Normal file
@ -0,0 +1,288 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Super Star</title>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500&display=swap" rel="stylesheet">
|
||||
<style>
|
||||
body {
|
||||
font-family: 'Roboto', sans-serif;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background-color: #f4f4f4;
|
||||
}
|
||||
.container {
|
||||
text-align: center;
|
||||
margin: 20px;
|
||||
}
|
||||
.header {
|
||||
background: #D32F2F;
|
||||
padding: 10px 0;
|
||||
color: white;
|
||||
font-size: 24px;
|
||||
font-weight: 500;
|
||||
text-align: center;
|
||||
}
|
||||
.banner {
|
||||
width: 100%;
|
||||
max-width: 600px;
|
||||
margin: 0 auto 20px;
|
||||
}
|
||||
.banner img {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
.menu-toggle {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
left: 10px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.menu {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 100%;
|
||||
width: 250px;
|
||||
background: white;
|
||||
transform: translateX(-250px);
|
||||
transition: transform 0.3s ease;
|
||||
box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
.menu.active {
|
||||
transform: translateX(0);
|
||||
}
|
||||
.menu ul {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
.menu ul li {
|
||||
padding: 15px 20px;
|
||||
border-bottom: 1px solid #ccc;
|
||||
}
|
||||
.menu ul li a {
|
||||
text-decoration: none;
|
||||
color: #333;
|
||||
display: block;
|
||||
}
|
||||
.menu ul li a:hover {
|
||||
background: #eee;
|
||||
}
|
||||
.container {
|
||||
margin: 20px;
|
||||
}
|
||||
.button-container {
|
||||
max-width: 600px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.content {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: 10px;
|
||||
padding: 10px 20px;
|
||||
max-width: 600px;
|
||||
margin: 0 auto;
|
||||
justify-content: center;
|
||||
}
|
||||
@media (max-width: 600px) {
|
||||
.content {
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: 10px;
|
||||
}
|
||||
}
|
||||
@media (max-width: 400px) {
|
||||
.content {
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.card {
|
||||
width: auto;
|
||||
max-width: 160px;
|
||||
}
|
||||
}
|
||||
.card {
|
||||
width: 100%;
|
||||
max-width: 180px;
|
||||
margin: 0 auto;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background: linear-gradient(135deg, #FF4081, #FF4081);
|
||||
color: white;
|
||||
border-radius: 10px;
|
||||
text-align: center;
|
||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
||||
overflow: hidden;
|
||||
cursor: pointer;
|
||||
}
|
||||
.card:hover {
|
||||
transform: scale(1.05); /* 增加按鈕的點擊反應 */
|
||||
}
|
||||
.card img {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
object-fit: contain;
|
||||
}
|
||||
.section {
|
||||
display: none;
|
||||
}
|
||||
.section.active {
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="header">超級巨星 自助式KTV</div>
|
||||
|
||||
<!-- Add Banner -->
|
||||
<div class="banner">
|
||||
<img src="手機點歌/LOGO_721x211px.png" alt="超級巨星 Banner">
|
||||
</div>
|
||||
|
||||
<div class="menu-toggle">
|
||||
<svg height="32px" id="Layer_1" style="enable-background:new 0 0 32 32;" version="1.1" viewBox="0 0 32 32" width="32px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="M4,10h24c0.553,0,1-0.447,1-1s-0.447-1-1-1H4c-0.553,0-1,0.447-1,1S3.447,10,4,10z"/><path d="M28,15H4c-0.553,0-1,0.447-1,1s0.447,1,1,1h24c0.553,0,1-0.447,1-1S28.553,15,28,15z"/><path d="M28,22H4c-0.553,0-1,0.447-1,1s0.447,1,1,1h24c0.553,0,1-0.447,1-1S28.553,22,28,22z"/></svg>
|
||||
</div>
|
||||
|
||||
<div class="menu">
|
||||
<ul>
|
||||
<li><a href="windows.html" class="menu-link">首頁</a></li>
|
||||
<li><a href="new-songs.html" class="menu-link">新歌快報</a></li>
|
||||
<li><a href="top-ranking.html" class="menu-link">熱門排行</a></li>
|
||||
<li><a href="search-singer.html" class="menu-link">歌星查詢</a></li>
|
||||
<li><a href="search-song.html" class="menu-link">歌名查詢</a></li>
|
||||
<li><a href="clicked-song.html" class="menu-link">已點歌曲</a></li>
|
||||
<!-- <!-- //<li><a href="my-favorite.html" class="menu-link">我的最愛</a></li> -->
|
||||
<li><a href="sound-control.html" class="menu-link">聲音控制</a></li>
|
||||
<li><a href="social-media.html" class="menu-link">社群媒體</a></li>
|
||||
<li><a href="love-message.html" class="menu-link">真情告白</a></li>
|
||||
<li><a href="mood-stickers.html" class="menu-link">心情貼圖</a></li>
|
||||
<!-- <li><a href="song-order.html" class="menu-link">輸入點歌序號</a></li>
|
||||
<li><a href="profile-settings.html" class="menu-link">會員資料設定</a></li>
|
||||
<li><a href="register.html" class="menu-link">註冊會員</a></li> -->
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<div class="button-container">
|
||||
<div class="content">
|
||||
<div class="card" onclick="location.href='new-songs.html'">
|
||||
<img src="手機點歌/首頁_工作區域 1.png" alt="New Song">
|
||||
</div>
|
||||
<div class="card" onclick="location.href='top-ranking.html'">
|
||||
<img src="手機點歌/首頁-02.png" alt="Top Ranking">
|
||||
</div>
|
||||
<div class="card" onclick="location.href='search-singer.html'">
|
||||
<img src="手機點歌/首頁-03.png" alt="Search Singer">
|
||||
</div>
|
||||
<div class="card" onclick="location.href='search-song.html'">
|
||||
<img src="手機點歌/首頁-04.png" alt="Search Song">
|
||||
</div>
|
||||
<div class="card" onclick="orderSongAndNavigate()">
|
||||
<img src="手機點歌/首頁-05.png" alt="Clicked Song">
|
||||
</div>
|
||||
<!-- <div class="card" onclick="location.href='my-favorite.html'">
|
||||
<img src="手機點歌/首頁-06.png" alt="My Favorite">
|
||||
</div> -->
|
||||
<div class="card" onclick="location.href='sound-control.html'">
|
||||
<img src="手機點歌/首頁-07.png" alt="Sound Control">
|
||||
</div>
|
||||
<div class="card" onclick="location.href='social-media.html'">
|
||||
<img src="手機點歌/首頁-08.png" alt="Social Media">
|
||||
</div>
|
||||
<div class="card" onclick="location.href='love-message.html'">
|
||||
<img src="手機點歌/首頁-09.png" alt="Social Media">
|
||||
</div>
|
||||
<div class="card" onclick="location.href='mood-stickers.html'">
|
||||
<img src="手機點歌/首頁-10.png" alt="Social Media">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var randomFolder = 'sctkynnxp2b'; // 這裡的 'abc123' 應由服務器生成並注入
|
||||
|
||||
// 獲取當前頁面的 URL
|
||||
var currentURL = window.location.href;
|
||||
|
||||
// 檢查是否包含正確的隨機亂碼
|
||||
if (!currentURL.includes('/' + randomFolder + '/')) {
|
||||
// 如果不包含正確的亂碼,顯示錯誤或跳轉到正確的頁面
|
||||
document.body.innerHTML = '<h1>403 Forbidden: Invalid Access</h1>';
|
||||
// 也可以重定向到正確的頁面
|
||||
// window.location.href = `http://${window.location.hostname}/${randomFolder}/index.html`;
|
||||
}
|
||||
|
||||
// 首先處理導航 - 確保最高優先級
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
// 導航處理
|
||||
const menuLinks = document.querySelectorAll('.menu-link');
|
||||
menuLinks.forEach(link => {
|
||||
// 移除所有現有的事件監聽器
|
||||
const oldLink = link.cloneNode(true);
|
||||
link.parentNode.replaceChild(oldLink, link);
|
||||
|
||||
// 添加新的點擊處理
|
||||
oldLink.addEventListener('click', function(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
e.stopImmediatePropagation();
|
||||
const href = this.getAttribute('href');
|
||||
if (href) {
|
||||
window.location.href = href;
|
||||
}
|
||||
}, true); // 使用捕獲階段
|
||||
});
|
||||
|
||||
// 菜單切換
|
||||
const menuToggle = document.querySelector('.menu-toggle');
|
||||
const menu = document.querySelector('.menu');
|
||||
|
||||
if (menuToggle && menu) {
|
||||
menuToggle.addEventListener('click', (e) => {
|
||||
e.stopPropagation();
|
||||
e.stopImmediatePropagation();
|
||||
menu.classList.toggle('active');
|
||||
}, true);
|
||||
|
||||
document.addEventListener('click', (e) => {
|
||||
if (!menu.contains(e.target) && !menuToggle.contains(e.target)) {
|
||||
menu.classList.remove('active');
|
||||
}
|
||||
}, true);
|
||||
}
|
||||
});
|
||||
|
||||
function orderSongAndNavigate() {
|
||||
// 先發送 POST 請求到本機伺服器
|
||||
fetch('/ordered-song', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: null
|
||||
})
|
||||
.then(response => {
|
||||
if (!response.ok) {
|
||||
throw new Error('Network response was not ok');
|
||||
}
|
||||
return response.json();
|
||||
})
|
||||
.then(data => {
|
||||
console.log('Request successful:', data);
|
||||
// 請求成功後導向到 clicked-song.html
|
||||
location.href = 'clicked-song.html';
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('There was a problem with the request:', error);
|
||||
// 可以在這裡顯示錯誤信息或進行其他錯誤處理
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -17,7 +17,7 @@
|
||||
margin: 20px;
|
||||
}
|
||||
.header {
|
||||
background: #FFA500;
|
||||
background: #D32F2F;
|
||||
padding: 10px 0;
|
||||
color: white;
|
||||
font-size: 24px;
|
||||
@ -271,7 +271,7 @@
|
||||
|
||||
<!-- Add Banner -->
|
||||
<div class="banner">
|
||||
<img src="手機點歌/BANNER-05.png" alt="金麗都 Banner">
|
||||
<img src="手機點歌/BANNER-05.png" alt="超級巨星 Banner">
|
||||
</div>
|
||||
|
||||
<div class="menu-toggle">
|
||||
@ -310,7 +310,7 @@
|
||||
<tr>
|
||||
<th>歌名</th>
|
||||
<th>歌手</th>
|
||||
<th>語別</th>
|
||||
<th>編號</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@ -327,7 +327,7 @@
|
||||
<p>歌名:<span id="detail-song-name"></span></p>
|
||||
<p>編號:<span id="detail-song-number"></span></p>
|
||||
<p>歌手:<span id="detail-singer"></span></p>
|
||||
<p>語別:<span id="detail-language"></span></p>
|
||||
|
||||
<button id="order-song-button">包廂點歌</button>
|
||||
<button id="insert-song-button">插播歌曲</button>
|
||||
</div>
|
||||
@ -388,17 +388,16 @@
|
||||
const song = {
|
||||
Song: row.cells[0].textContent,
|
||||
ArtistA: row.cells[1].textContent,
|
||||
Category: row.cells[2].textContent,
|
||||
SongNumber: row.cells[3].textContent,
|
||||
SongFilePathHost1: row.cells[4].textContent,
|
||||
SongFilePathHost2: row.cells[5].textContent
|
||||
SongNumber: row.cells[2].textContent,
|
||||
SongFilePathHost1: row.cells[3].textContent,
|
||||
SongFilePathHost2: row.cells[4].textContent
|
||||
};
|
||||
|
||||
window.selectedSong = song;
|
||||
document.getElementById('detail-song-name').textContent = song.Song;
|
||||
document.getElementById('detail-song-number').textContent = song.SongNumber;
|
||||
document.getElementById('detail-singer').textContent = song.ArtistA;
|
||||
document.getElementById('detail-language').textContent = song.Category;
|
||||
//document.getElementById('detail-language').textContent = song.Category;
|
||||
|
||||
document.getElementById('song-details').style.display = 'block';
|
||||
document.getElementById('overlay').style.display = 'block';
|
||||
@ -543,7 +542,6 @@
|
||||
row.innerHTML = `
|
||||
<td>${song.Song}</td>
|
||||
<td>${song.ArtistA}</td>
|
||||
<td>${song.Category}</td>
|
||||
<td>${song.SongNumber}</td>
|
||||
<td style="display:none;">${song.SongFilePathHost1}</td>
|
||||
<td style="display:none;">${song.SongFilePathHost2}</td>
|
||||
@ -556,7 +554,7 @@
|
||||
document.getElementById('detail-song-name').textContent = song.Song;
|
||||
document.getElementById('detail-song-number').textContent = song.SongNumber;
|
||||
document.getElementById('detail-singer').textContent = song.ArtistA;
|
||||
document.getElementById('detail-language').textContent = song.Category;
|
||||
|
||||
|
||||
document.getElementById('song-details').style.display = 'block';
|
||||
document.getElementById('overlay').style.display = 'block';
|
||||
|
@ -17,7 +17,7 @@
|
||||
margin: 20px;
|
||||
}
|
||||
.header {
|
||||
background: #FFA500;
|
||||
background: #D32F2F;
|
||||
padding: 10px 0;
|
||||
color: white;
|
||||
font-size: 24px;
|
||||
@ -291,7 +291,7 @@
|
||||
<tr>
|
||||
<th>歌名</th>
|
||||
<th>歌手</th>
|
||||
<th>語別</th>
|
||||
<th>編號</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@ -309,7 +309,6 @@
|
||||
<p>歌名:<span id="detail-song-name"></span></p>
|
||||
<p>編號:<span id="detail-song-number"></span></p>
|
||||
<p>歌手:<span id="detail-singer"></span></p>
|
||||
<p>語別:<span id="detail-language"></span></p>
|
||||
<button id="order-song-button">包廂點歌</button>
|
||||
<button id="insert-song-button">插播歌曲</button>
|
||||
</div>
|
||||
@ -380,15 +379,15 @@
|
||||
const row = document.createElement('tr');
|
||||
const songNameCell = document.createElement('td');
|
||||
const singerCell = document.createElement('td');
|
||||
const languageCell = document.createElement('td');
|
||||
const SongNumberCell = document.createElement('td');
|
||||
|
||||
songNameCell.textContent = song.Song;
|
||||
singerCell.textContent = song.ArtistA;
|
||||
languageCell.textContent = song.Category;
|
||||
SongNumberCell.textContent = song.SongNumber;
|
||||
|
||||
row.appendChild(songNameCell);
|
||||
row.appendChild(singerCell);
|
||||
row.appendChild(languageCell);
|
||||
row.appendChild(SongNumberCell);
|
||||
|
||||
row.addEventListener('click', (e) => {
|
||||
e.preventDefault();
|
||||
@ -399,7 +398,7 @@
|
||||
document.getElementById('detail-song-name').textContent = song.Song;
|
||||
document.getElementById('detail-song-number').textContent = song.SongNumber;
|
||||
document.getElementById('detail-singer').textContent = song.ArtistA;
|
||||
document.getElementById('detail-language').textContent = song.Category;
|
||||
//document.getElementById('detail-language').textContent = song.Category;
|
||||
|
||||
document.getElementById('song-details').style.display = 'block';
|
||||
});
|
||||
|
@ -17,7 +17,7 @@
|
||||
margin: 20px;
|
||||
}
|
||||
.header {
|
||||
background: #FFA500;
|
||||
background: #D32F2F;
|
||||
padding: 10px 0;
|
||||
color: white;
|
||||
font-size: 24px;
|
||||
|
@ -17,7 +17,7 @@
|
||||
margin: 20px;
|
||||
}
|
||||
.header {
|
||||
background: #FFA500;
|
||||
background: #D32F2F;
|
||||
padding: 10px 0;
|
||||
color: white;
|
||||
font-size: 24px;
|
||||
|
@ -17,7 +17,7 @@
|
||||
margin: 20px;
|
||||
}
|
||||
.header {
|
||||
background: #FFA500;
|
||||
background: #D32F2F;
|
||||
padding: 10px 0;
|
||||
color: white;
|
||||
font-size: 24px;
|
||||
@ -86,14 +86,14 @@
|
||||
@media (max-width: 600px) {
|
||||
.content {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: 5px;
|
||||
grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
|
||||
gap: 10px;
|
||||
}
|
||||
}
|
||||
.card {
|
||||
background: linear-gradient(135deg, #FF4081, #FF4081);
|
||||
color: white;
|
||||
width: 100%;
|
||||
width: 130px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
@ -17,7 +17,7 @@
|
||||
margin: 20px;
|
||||
}
|
||||
.header {
|
||||
background: #FFA500;
|
||||
background: #D32F2F;
|
||||
padding: 10px 0;
|
||||
color: white;
|
||||
font-size: 24px;
|
||||
@ -259,7 +259,7 @@
|
||||
<tr>
|
||||
<th>歌名</th>
|
||||
<th>歌手</th>
|
||||
<!--<th>語別</th>-->
|
||||
<th>語別</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@ -275,7 +275,7 @@
|
||||
<p>歌名:<span id="detail-song-name"></span></p>
|
||||
<p>編號:<span id="detail-song-number"></span></p>
|
||||
<p>歌手:<span id="detail-singer"></span></p>
|
||||
<!---<p>語別:<span id="detail-language"></span></p>-->
|
||||
<p>語別:<span id="detail-language"></span></p>
|
||||
<button id="order-song-button">包廂點歌</button>
|
||||
<button id="insert-song-button">插播歌曲</button>
|
||||
</div>
|
||||
@ -348,7 +348,6 @@
|
||||
})
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
console.log('回傳資料',data);
|
||||
const tableBody = document.querySelector('#results-table tbody');
|
||||
tableBody.innerHTML = '';
|
||||
|
||||
@ -356,15 +355,15 @@
|
||||
const row = document.createElement('tr');
|
||||
const songNameCell = document.createElement('td');
|
||||
const singerCell = document.createElement('td');
|
||||
// const languageCell = document.createElement('td');
|
||||
const languageCell = document.createElement('td');
|
||||
|
||||
songNameCell.textContent = song.Song;
|
||||
singerCell.textContent = song.ArtistA;
|
||||
//languageCell.textContent = song.Category;
|
||||
languageCell.textContent = song.Category;
|
||||
|
||||
row.appendChild(songNameCell);
|
||||
row.appendChild(singerCell);
|
||||
//row.appendChild(languageCell);
|
||||
row.appendChild(languageCell);
|
||||
|
||||
row.addEventListener('click', (e) => {
|
||||
e.preventDefault(); // 阻止默認行為
|
||||
@ -377,7 +376,7 @@
|
||||
document.getElementById('detail-song-name').textContent = song.Song;
|
||||
document.getElementById('detail-song-number').textContent = song.SongNumber;
|
||||
document.getElementById('detail-singer').textContent = song.ArtistA;
|
||||
//document.getElementById('detail-language').textContent = song.Category;
|
||||
document.getElementById('detail-language').textContent = song.Category;
|
||||
|
||||
// 顯示詳情視窗和遮罩
|
||||
document.getElementById('song-details').style.display = 'block';
|
||||
|
@ -17,7 +17,7 @@
|
||||
margin: 20px;
|
||||
}
|
||||
.header {
|
||||
background: #FFA500;
|
||||
background: #D32F2F;
|
||||
padding: 10px 0;
|
||||
color: white;
|
||||
font-size: 24px;
|
||||
@ -136,7 +136,7 @@
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="header">金麗都 自助式KTV</div>
|
||||
<div class="header">超級巨星 自助式KTV</div>
|
||||
|
||||
<!-- Add Banner -->
|
||||
<div class="banner">
|
||||
|
Before Width: | Height: | Size: 84 KiB After Width: | Height: | Size: 133 KiB |
Before Width: | Height: | Size: 72 KiB After Width: | Height: | Size: 116 KiB |
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 108 KiB |
Before Width: | Height: | Size: 93 KiB After Width: | Height: | Size: 134 KiB |
Before Width: | Height: | Size: 85 KiB After Width: | Height: | Size: 133 KiB |
Before Width: | Height: | Size: 75 KiB After Width: | Height: | Size: 116 KiB |
Before Width: | Height: | Size: 85 KiB After Width: | Height: | Size: 134 KiB |
Before Width: | Height: | Size: 92 KiB After Width: | Height: | Size: 134 KiB |
Before Width: | Height: | Size: 84 KiB After Width: | Height: | Size: 133 KiB |
Before Width: | Height: | Size: 88 KiB After Width: | Height: | Size: 134 KiB |
Before Width: | Height: | Size: 84 KiB After Width: | Height: | Size: 132 KiB |
Before Width: | Height: | Size: 93 KiB After Width: | Height: | Size: 134 KiB |
Before Width: | Height: | Size: 84 KiB After Width: | Height: | Size: 132 KiB |
Before Width: | Height: | Size: 93 KiB After Width: | Height: | Size: 136 KiB |
BIN
themes/superstar/_www/手機點歌/BG-3-01.png
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
themes/superstar/_www/手機點歌/BG-3-02.png
Normal file
After Width: | Height: | Size: 32 KiB |
BIN
themes/superstar/_www/手機點歌/BG-3-03.png
Normal file
After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 525 KiB After Width: | Height: | Size: 579 KiB |
BIN
themes/superstar/_www/手機點歌/LOGO0728-02.png
Normal file
After Width: | Height: | Size: 32 KiB |
BIN
themes/superstar/_www/手機點歌/LOGO0728-03.png
Normal file
After Width: | Height: | Size: 29 KiB |
BIN
themes/superstar/_www/手機點歌/LOGO0728_工作區域 1.png
Normal file
After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 140 KiB After Width: | Height: | Size: 150 KiB |
Before Width: | Height: | Size: 206 KiB After Width: | Height: | Size: 440 KiB |
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 45 KiB |
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 43 KiB |
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 43 KiB |
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 43 KiB |
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 43 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 9.1 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 8.7 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 7.4 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 8.7 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 16 KiB |
BIN
themes/superstars/3.歌星查詢_已按.jpg
Normal file
After Width: | Height: | Size: 194 KiB |
BIN
themes/superstars/3.歌星查詢_未按.jpg
Normal file
After Width: | Height: | Size: 181 KiB |
BIN
themes/superstars/4.歌名查詢_已按.jpg
Normal file
After Width: | Height: | Size: 200 KiB |
BIN
themes/superstars/4.歌名查詢_未按.jpg
Normal file
After Width: | Height: | Size: 184 KiB |
BIN
themes/superstars/555009.jpg
Normal file
After Width: | Height: | Size: 239 KiB |
BIN
themes/superstars/555019.jpg
Normal file
After Width: | Height: | Size: 161 KiB |
BIN
themes/superstars/555021.jpg
Normal file
After Width: | Height: | Size: 439 KiB |
BIN
themes/superstars/555022.jpg
Normal file
After Width: | Height: | Size: 254 KiB |
BIN
themes/superstars/ButtonImages/服務鈴.png
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
themes/superstars/ICON上方/上方ICON_優惠活動-11.png
Normal file
After Width: | Height: | Size: 4.4 KiB |
BIN
themes/superstars/ICON上方/上方ICON_優惠活動-23.png
Normal file
After Width: | Height: | Size: 5.3 KiB |
BIN
themes/superstars/ICON上方/上方ICON_合唱查詢-06.png
Normal file
After Width: | Height: | Size: 3.7 KiB |