Compare commits
9 Commits
99ae486567
...
3d255da675
Author | SHA1 | Date | |
---|---|---|---|
3d255da675 | |||
020f19bf93 | |||
2e664788ca | |||
b8416494d8 | |||
1ac545ecaf | |||
9f5b51649d | |||
e9ba3b229e | |||
6f8dd92285 | |||
e77b4f4fec |
@ -55,7 +55,7 @@ namespace DBObj
|
||||
return PrimaryForm.Instance.SearchSongs_Mysql(query);
|
||||
}
|
||||
public List<SongData> SearchHotSongs(){
|
||||
string query= $"SELECT * FROM song_library_cache WHERE language_name = '國語' ORDER BY song_conts DESC LIMIT {PrimaryForm.ReadHotSongLimit()};";
|
||||
string query= $"SELECT * FROM song_library_cache WHERE language_name = '國語' ORDER BY song_counts DESC LIMIT {PrimaryForm.ReadHotSongLimit()};";
|
||||
return PrimaryForm.Instance.SearchSongs_Mysql(query);
|
||||
}
|
||||
public List<SongData> SearchSongsBySinger(string keyword)
|
||||
|
@ -41,8 +41,8 @@ namespace DualScreenDemo
|
||||
randomFolderPath = randomFolderName;
|
||||
|
||||
string localAddress = GetLocalIPAddress();
|
||||
string externalAddress = File.Exists(@"\\JLDKTV\txt\ip.txt")
|
||||
? File.ReadAllText(@"\\JLDKTV\txt\ip.txt").Trim()
|
||||
string externalAddress = File.Exists(@"\\svr01\txt\ip.txt")
|
||||
? File.ReadAllText(@"\\svr01\txt\ip.txt").Trim()
|
||||
: "";
|
||||
|
||||
_listener = new HttpListener();
|
||||
@ -964,6 +964,7 @@ namespace DualScreenDemo
|
||||
// 将读取到的 "message" 字段传递给 UI 控件显示
|
||||
InvokeAction(() => OverlayForm.MainForm.ShowmessageLabel(Messagefist+Messagelast+'_'));
|
||||
}
|
||||
// 真情告白顯示秒數
|
||||
await Task.Delay(3000);
|
||||
}
|
||||
}
|
||||
|
@ -128,7 +128,7 @@ namespace OverlayFormObj
|
||||
standardKeyTimer.Interval = 1000;
|
||||
standardKeyTimer.Tick += (sender, e) => {standardKeyLabel.Visible = false;standardKeyTimer.Stop();keepshowmic();};
|
||||
|
||||
messageTimer.Interval = 1000;
|
||||
messageTimer.Interval = 5000;
|
||||
messageTimer.Tick += (sender, e) => {messageLabel.Visible = false;messageTimer.Stop();keepshowmic();};
|
||||
|
||||
keyUpTimer.Interval = 1000;
|
||||
|
@ -120,7 +120,7 @@ namespace DualScreenDemo
|
||||
if (isDragging)
|
||||
{
|
||||
int deltaX = e.X - mouseDownLocation.X;
|
||||
if (Math.Abs(deltaX) > 50) // 滑動距離超過50像素才觸發
|
||||
if (Math.Abs(deltaX) > 20) // 滑動距離超過50像素才觸發
|
||||
{
|
||||
if (deltaX > 0 && currentPageIndex > 0)
|
||||
{
|
||||
@ -158,10 +158,10 @@ namespace DualScreenDemo
|
||||
}
|
||||
public void LoadPreviousPage()
|
||||
{
|
||||
if (currentPageIndex > 0)
|
||||
if (currentPageIndex - 1 >= 0)
|
||||
{
|
||||
currentPageIndex--;
|
||||
if(currentSongList.Count == 0)
|
||||
if(_isShowingSinger)
|
||||
{
|
||||
RefreshDisplayBase_Singer();
|
||||
}
|
||||
@ -358,6 +358,10 @@ namespace DualScreenDemo
|
||||
// 添加滑鼠事件
|
||||
artistLabel.MouseEnter += mouseEnter;
|
||||
artistLabel.MouseLeave += mouseLeave;
|
||||
// 滑動
|
||||
artistLabel.MouseDown += MultiPagePanel_MouseDown;
|
||||
artistLabel.MouseMove += MultiPagePanel_MouseMove;
|
||||
artistLabel.MouseUp += MultiPagePanel_MouseUp;
|
||||
separatorPanel.MouseEnter += mouseEnter;
|
||||
separatorPanel.MouseLeave += mouseLeave;
|
||||
// 添加到畫面上
|
||||
@ -612,10 +616,18 @@ namespace DualScreenDemo
|
||||
// 添加事件处理
|
||||
songLabel.Click += PrimaryForm.Instance.Label_Click;
|
||||
artistLabel.Click += PrimaryForm.Instance.Label_Click;
|
||||
// 滑動事件調整位置
|
||||
songLabel.MouseDown += MultiPagePanel_MouseDown;
|
||||
songLabel.MouseMove += MultiPagePanel_MouseMove;
|
||||
songLabel.MouseUp += MultiPagePanel_MouseUp;
|
||||
songLabel.MouseEnter += mouseEnter;
|
||||
songLabel.MouseLeave += mouseLeave;
|
||||
artistLabel.MouseEnter += mouseEnter;
|
||||
artistLabel.MouseLeave += mouseLeave;
|
||||
// 滑動事件調整位置
|
||||
artistLabel.MouseDown += MultiPagePanel_MouseDown;
|
||||
artistLabel.MouseMove += MultiPagePanel_MouseMove;
|
||||
artistLabel.MouseUp += MultiPagePanel_MouseUp;
|
||||
separatorPanel.MouseEnter += mouseEnter;
|
||||
separatorPanel.MouseLeave += mouseLeave;
|
||||
// 按正确顺序添加控件
|
||||
|
@ -64,8 +64,8 @@ namespace DualScreenDemo
|
||||
|
||||
|
||||
|
||||
|
||||
ConfigureButton(this.syncOriginalSongButton, 1218, 335, 205, 56, resizedNormalStateImageForSyncScreen, resizedNormalStateImageForSyncScreen, resizedNormalStateImageForSyncScreen, null);
|
||||
// 有人聲入口位置
|
||||
ConfigureButton(this.syncOriginalSongButton, 1218, 335, 205, 56, resizedNormalStateImageForSyncScreen, resizedNormalStateImageForSyncScreen, resizedNormalStateImageForSyncScreen, (sender,e) => videoPlayerForm.ToggleVocalRemoval());
|
||||
|
||||
|
||||
|
||||
|
@ -18,14 +18,14 @@ namespace DualScreenDemo
|
||||
static void Main()
|
||||
{
|
||||
Console.WriteLine("隱藏滑鼠游標");
|
||||
Cursor.Hide();
|
||||
// Cursor.Hide();
|
||||
AppDomain.CurrentDomain.ProcessExit += (s, e) =>
|
||||
{
|
||||
Cursor.Show();
|
||||
};
|
||||
|
||||
Console.WriteLine("正在與中控取得聯繫");
|
||||
var sender = new HeartbeatSender.heartbeatSender();
|
||||
/*var sender = new HeartbeatSender.heartbeatSender();
|
||||
|
||||
// 同步呼叫非同步登入取得 token
|
||||
bool loginSuccess = sender.LoginAndGetTokenAsync().GetAwaiter().GetResult();
|
||||
@ -49,7 +49,7 @@ namespace DualScreenDemo
|
||||
{
|
||||
Console.WriteLine("登入失敗,無法送出心跳");
|
||||
}
|
||||
|
||||
*/
|
||||
try
|
||||
{
|
||||
// COM 初始化
|
||||
|
13
TCPServer.cs
13
TCPServer.cs
@ -86,27 +86,29 @@ namespace DualScreenDemo
|
||||
//heartbeatSender sender = new heartbeatSender("127.0.0.1", 8888);
|
||||
//sender.Start();
|
||||
// Console.WriteLine($"heart beat for server{sender.RemoteEndPoint.Address}:{sender.RemoteEndPoint.Port}");
|
||||
|
||||
try {
|
||||
|
||||
string stateFilePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "txt", "states.txt");
|
||||
string initialState = ReadStateFile(stateFilePath);
|
||||
|
||||
/*
|
||||
if (initialState.Equals("CLOSE", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
_ = SafeInvoke(PrimaryForm.Instance, () =>
|
||||
{
|
||||
try {
|
||||
/*foreach (Control ctrl in PrimaryForm.Instance.Controls)
|
||||
foreach (Control ctrl in PrimaryForm.Instance.Controls)
|
||||
{
|
||||
ctrl.Enabled = false;
|
||||
}*/
|
||||
}
|
||||
PrimaryForm.Instance.ShowSendOffScreen();
|
||||
}
|
||||
catch (Exception ex) {
|
||||
Console.WriteLine($"顯示送客畫面時發生錯誤: {ex.Message}");
|
||||
}
|
||||
});
|
||||
}
|
||||
} */
|
||||
|
||||
|
||||
|
||||
while (true)
|
||||
@ -152,6 +154,7 @@ namespace DualScreenDemo
|
||||
PrimaryForm.Instance.ShowSendOffScreen();
|
||||
Console.WriteLine("開始設置新的播放列表");
|
||||
|
||||
|
||||
string closePath = @"D:\video\CLOSE.MPG";
|
||||
if (File.Exists(closePath))
|
||||
{
|
||||
@ -215,6 +218,8 @@ namespace DualScreenDemo
|
||||
PrimaryForm.currentSongIndexInHistory = -1;
|
||||
PrimaryForm.Instance.HotPlayButton_Click(null, EventArgs.Empty);
|
||||
UpdateStateFile(stateFilePath, "OPEN");
|
||||
PrimaryForm.Instance.HideSendOffScreen();
|
||||
|
||||
|
||||
byte[] okResponse = Encoding.UTF8.GetBytes("OK\n");
|
||||
stream.Write(okResponse, 0, okResponse.Length);
|
||||
|
@ -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>
|
||||
|
@ -80,14 +80,20 @@
|
||||
}
|
||||
.content {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
|
||||
gap: 5px;
|
||||
grid-template-columns: repeat(3, 1fr); /* 固定3欄 */
|
||||
gap: 5px; /* 移除格子之間的空隙 */
|
||||
margin: 0; /* 沒有外邊距 */
|
||||
padding: 0; /* 沒有內邊距 */
|
||||
width: 36.5vw; /* 滿版寬度 */
|
||||
}
|
||||
@media (max-width: 600px) {
|
||||
.content {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
|
||||
gap: 10px;
|
||||
grid-template-columns: repeat(3, 1fr); /* 固定3欄 */
|
||||
gap: 5px; /* 移除格子之間的空隙 */
|
||||
margin: 0; /* 沒有外邊距 */
|
||||
padding: 0; /* 沒有內邊距 */
|
||||
width: 78vw; /* 滿版寬度 */
|
||||
}
|
||||
}
|
||||
.card {
|
||||
|
@ -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,6 +348,7 @@
|
||||
})
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
console.log('回傳資料',data);
|
||||
const tableBody = document.querySelector('#results-table tbody');
|
||||
tableBody.innerHTML = '';
|
||||
|
||||
@ -355,15 +356,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(); // 阻止默認行為
|
||||
@ -376,7 +377,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';
|
||||
|
Loading…
x
Reference in New Issue
Block a user