From a3955b2672de57f940cec3ea18e0fc25195d040d Mon Sep 17 00:00:00 2001 From: jasonchenwork Date: Wed, 13 Aug 2025 16:42:22 +0800 Subject: [PATCH] 2508131641 --- Env.cs | 11 ++- .../PrimaryForm.CategorySearch.cs | 8 +- .../GroupSearch/PrimaryForm.GroupSearch.cs | 6 ++ .../HotSong/PrimaryForm.HotSong.cs | 6 ++ .../PrimaryForm.LanguageSearch.cs | 6 ++ .../NewSongAlert/PrimaryForm.NewSongAlert.cs | 6 ++ PrimaryFormParts/PrimaryForm.Favorite.cs | 25 ++---- PrimaryFormParts/PrimaryForm.QRCode.cs | 4 +- PrimaryFormParts/PrimaryForm.SyncScreen.cs | 72 +++++++-------- PrimaryFormParts/PrimaryForm.ToggleLight.cs | 58 +++++++------ PrimaryFormParts/PrimaryForm.cs | 8 +- .../SingerSearch/PrimaryForm.SingerSearch.cs | 8 +- .../PrimaryForm.SongSearch.NumberSearch.cs | 4 +- .../PrimaryForm.SongSearch.WordCountSearch.cs | 2 +- .../SongSearch/PrimaryForm.SongSearch.cs | 6 +- img.ini | 87 +++++++++++++------ 16 files changed, 193 insertions(+), 124 deletions(-) diff --git a/Env.cs b/Env.cs index 707a4be..bb28717 100644 --- a/Env.cs +++ b/Env.cs @@ -52,10 +52,13 @@ namespace Utils } public static string[] GetSongServers() { - return Get("songServer", "") - .Split(',', StringSplitOptions.RemoveEmptyEntries | StringSplitOptions.TrimEntries) - .Select(s => s.Trim('\'', '"').TrimEnd('\\')) // 清理 - .ToArray(); + // return Get("songServer", "") + // .Split(',', StringSplitOptions.RemoveEmptyEntries | StringSplitOptions.TrimEntries) + // .Select(s => s.Trim('\'', '"').TrimEnd('\\')) // 清理 + // .ToArray(); + + return new string[] { @"\\svr01", @"\\svr02" }; + } public static string Get(string key, string fallback = "") => diff --git a/PrimaryFormParts/CategorySearch/PrimaryForm.CategorySearch.cs b/PrimaryFormParts/CategorySearch/PrimaryForm.CategorySearch.cs index 17fa266..305e35d 100644 --- a/PrimaryFormParts/CategorySearch/PrimaryForm.CategorySearch.cs +++ b/PrimaryFormParts/CategorySearch/PrimaryForm.CategorySearch.cs @@ -97,8 +97,14 @@ namespace DualScreenDemo SetPinYinSongsAndButtonsVisibility(false); SetPictureBoxToggleLightAndButtonsVisibility(false); SetPictureBoxSceneSoundEffectsAndButtonsVisibility(false); - SetPictureBoxCategoryAndButtonsVisibility(true); + SetHandWritingForSongsAndButtonsVisibility(false); + SetWordCountSongsAndButtonsVisibility(false); + SetSongIDSearchAndButtonsVisibility(false); + SetHandWritingForSingersAndButtonsVisibility(false); + SetWordCountSingersAndButtonsVisibility(false); + SetPictureBoxCategoryAndButtonsVisibility(true); + UpdateCatBtns(loveDuetButton, loveDuetActiveBackground); if (pictureBoxQRCode != null) diff --git a/PrimaryFormParts/GroupSearch/PrimaryForm.GroupSearch.cs b/PrimaryFormParts/GroupSearch/PrimaryForm.GroupSearch.cs index e513b74..ae0f7ba 100644 --- a/PrimaryFormParts/GroupSearch/PrimaryForm.GroupSearch.cs +++ b/PrimaryFormParts/GroupSearch/PrimaryForm.GroupSearch.cs @@ -95,6 +95,12 @@ namespace DualScreenDemo SetPinYinSongsAndButtonsVisibility(false); SetPictureBoxToggleLightAndButtonsVisibility(false); SetPictureBoxSceneSoundEffectsAndButtonsVisibility(false); + SetHandWritingForSongsAndButtonsVisibility(false); + SetWordCountSongsAndButtonsVisibility(false); + SetSongIDSearchAndButtonsVisibility(false); + SetHandWritingForSingersAndButtonsVisibility(false); + SetWordCountSingersAndButtonsVisibility(false); + SetGroupButtonsVisibility(true); UpdateGroupSubBtns(groupGuoYuButton, groupGuoYuActiveBackground); diff --git a/PrimaryFormParts/HotSong/PrimaryForm.HotSong.cs b/PrimaryFormParts/HotSong/PrimaryForm.HotSong.cs index ce5ea1e..4535897 100644 --- a/PrimaryFormParts/HotSong/PrimaryForm.HotSong.cs +++ b/PrimaryFormParts/HotSong/PrimaryForm.HotSong.cs @@ -133,6 +133,12 @@ namespace DualScreenDemo SetPinYinSongsAndButtonsVisibility(false); SetPictureBoxToggleLightAndButtonsVisibility(false); SetPictureBoxSceneSoundEffectsAndButtonsVisibility(false); + SetHandWritingForSongsAndButtonsVisibility(false); + SetWordCountSongsAndButtonsVisibility(false); + SetSongIDSearchAndButtonsVisibility(false); + SetHandWritingForSingersAndButtonsVisibility(false); + SetWordCountSingersAndButtonsVisibility(false); + SetHotSongButtonsVisibility(true); } diff --git a/PrimaryFormParts/LanguageSearch/PrimaryForm.LanguageSearch.cs b/PrimaryFormParts/LanguageSearch/PrimaryForm.LanguageSearch.cs index db41bec..2901ed1 100644 --- a/PrimaryFormParts/LanguageSearch/PrimaryForm.LanguageSearch.cs +++ b/PrimaryFormParts/LanguageSearch/PrimaryForm.LanguageSearch.cs @@ -97,6 +97,12 @@ namespace DualScreenDemo SetPinYinSongsAndButtonsVisibility(false); SetPictureBoxToggleLightAndButtonsVisibility(false); SetPictureBoxSceneSoundEffectsAndButtonsVisibility(false); + SetHandWritingForSongsAndButtonsVisibility(false); + SetWordCountSongsAndButtonsVisibility(false); + SetSongIDSearchAndButtonsVisibility(false); + SetHandWritingForSingersAndButtonsVisibility(false); + SetWordCountSingersAndButtonsVisibility(false); + SetPictureBoxLanguageButtonsVisibility(true); diff --git a/PrimaryFormParts/NewSongAlert/PrimaryForm.NewSongAlert.cs b/PrimaryFormParts/NewSongAlert/PrimaryForm.NewSongAlert.cs index 8c71718..c17db3c 100644 --- a/PrimaryFormParts/NewSongAlert/PrimaryForm.NewSongAlert.cs +++ b/PrimaryFormParts/NewSongAlert/PrimaryForm.NewSongAlert.cs @@ -109,6 +109,12 @@ namespace DualScreenDemo SetPinYinSongsAndButtonsVisibility(false); SetPictureBoxToggleLightAndButtonsVisibility(false); SetPictureBoxSceneSoundEffectsAndButtonsVisibility(false); + SetHandWritingForSongsAndButtonsVisibility(false); + SetWordCountSongsAndButtonsVisibility(false); + SetSongIDSearchAndButtonsVisibility(false); + SetHandWritingForSingersAndButtonsVisibility(false); + SetWordCountSingersAndButtonsVisibility(false); + SetNewSongButtonsVisibility(true); UpdateNewSongBtns(guoYuButtonNewSong, guoYuNewSongActiveBackground); diff --git a/PrimaryFormParts/PrimaryForm.Favorite.cs b/PrimaryFormParts/PrimaryForm.Favorite.cs index 1938a40..90a2528 100644 --- a/PrimaryFormParts/PrimaryForm.Favorite.cs +++ b/PrimaryFormParts/PrimaryForm.Favorite.cs @@ -55,7 +55,7 @@ namespace DualScreenDemo string fileName = (i+1).ToString(); - string filePath = Path.Combine(serverPath, @"themes\superstar\button\3.介面\我的最愛_" + fileName + ".png"); + string filePath = Path.Combine(serverPath, data["Favorite"]["FilePath"] + fileName + ".png"); favoriteNumberButton[i].BackgroundImage = Image.FromFile(filePath); favoriteNumberButton[i].BackgroundImageLayout = ImageLayout.Stretch; favoriteNumberButton[i].FlatStyle = FlatStyle.Flat; @@ -87,7 +87,7 @@ namespace DualScreenDemo Name = "enterFavoriteButton" }; ResizeAndPositionButton(enterFavoriteButton, 832, 657, 70, 65); - enterFavoriteButton.BackgroundImage = Image.FromFile(Path.Combine(serverPath, @"themes\superstar\button\3.介面\我的最愛_確認.png")); + enterFavoriteButton.BackgroundImage = Image.FromFile(Path.Combine(serverPath, data["Favorite"]["Enter"])); enterFavoriteButton.BackgroundImageLayout = ImageLayout.Stretch; enterFavoriteButton.FlatStyle = FlatStyle.Flat; enterFavoriteButton.FlatAppearance.BorderSize = 0; @@ -102,7 +102,7 @@ namespace DualScreenDemo Name = "newFavoriteButton" }; ResizeAndPositionButton(newFavoriteButton, 916, 657, 70, 65); - newFavoriteButton.BackgroundImage = Image.FromFile(Path.Combine(serverPath, @"themes\superstar\button\3.介面\我的最愛_新建.png")); + newFavoriteButton.BackgroundImage = Image.FromFile(Path.Combine(serverPath, data["Favorite"]["New"])); newFavoriteButton.BackgroundImageLayout = ImageLayout.Stretch; newFavoriteButton.FlatStyle = FlatStyle.Flat; newFavoriteButton.FlatAppearance.BorderSize = 0; @@ -117,7 +117,7 @@ namespace DualScreenDemo Name = "refillFavoriteButton" }; ResizeAndPositionButton(refillFavoriteButton, 999, 657, 70, 65); - refillFavoriteButton.BackgroundImage = Image.FromFile(Path.Combine(serverPath, @"themes\superstar\button\3.介面\我的最愛_重填.png")); + refillFavoriteButton.BackgroundImage = Image.FromFile(Path.Combine(serverPath, data["Favorite"]["Refill"])); refillFavoriteButton.BackgroundImageLayout = ImageLayout.Stretch; refillFavoriteButton.FlatStyle = FlatStyle.Flat; refillFavoriteButton.FlatAppearance.BorderSize = 0; @@ -132,7 +132,7 @@ namespace DualScreenDemo Name = "closeFavoriteButton" }; ResizeAndPositionButton(closeFavoriteButton, 1083, 657, 70, 65); - closeFavoriteButton.BackgroundImage = Image.FromFile(Path.Combine(serverPath, @"themes\superstar\button\3.介面\我的最愛_關閉.png")); + closeFavoriteButton.BackgroundImage = Image.FromFile(Path.Combine(serverPath, data["Favorite"]["Close"])); closeFavoriteButton.BackgroundImageLayout = ImageLayout.Stretch; closeFavoriteButton.FlatStyle = FlatStyle.Flat; closeFavoriteButton.FlatAppearance.BorderSize = 0; @@ -332,25 +332,16 @@ namespace DualScreenDemo private void MyFavoritesButton_Click(object sender, EventArgs e) { var data = LoadBtnConfigData(); + + UpdateButtonBackgrounds(myFavoritesButton, myFavoritesActiveBackground); - newSongAlertButton.BackgroundImage = newSongAlertNormalBackground; - hotPlayButton.BackgroundImage = hotPlayNormalBackground; - singerSearchButton.BackgroundImage = singerSearchNormalBackground; - songSearchButton.BackgroundImage = songSearchNormalBackground; - languageSearchButton.BackgroundImage = languageSearchNormalBackground; - groupSearchButton.BackgroundImage = groupSearchNormalBackground; - categorySearchButton.BackgroundImage = categorySearchNormalBackground; - orderedSongsButton.BackgroundImage = orderedSongsNormalBackground; - myFavoritesButton.BackgroundImage = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別上方_我的最愛(已按).png")); - promotionsButton.BackgroundImage = promotionsNormalBackground; - deliciousFoodButton.BackgroundImage = deliciousFoodNormalBackground; isOnOrderedSongsPage = false; if (!FavoritePictureBox.Visible) { - ShowImageOnFavoritePictureBox(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\我的最愛_空白介面.png")); + ShowImageOnFavoritePictureBox(Path.Combine(serverPath, data["Favorite"]["FavoriteBaseUI"])); SetFavoritePictureBoxAndButtonsVisibility(true); } else diff --git a/PrimaryFormParts/PrimaryForm.QRCode.cs b/PrimaryFormParts/PrimaryForm.QRCode.cs index fcca413..2f53fd6 100644 --- a/PrimaryFormParts/PrimaryForm.QRCode.cs +++ b/PrimaryFormParts/PrimaryForm.QRCode.cs @@ -14,7 +14,7 @@ namespace DualScreenDemo try { - string imagePath = Path.Combine(serverPath, "themes/superstar/button/3.介面/手機點歌QR碼_完整介面.png"); + string imagePath = Path.Combine(serverPath, data["QrCode"]["QrCodeBaseUI"]); if (!File.Exists(imagePath)) { Console.WriteLine("Base image not found: " + imagePath); @@ -82,7 +82,7 @@ namespace DualScreenDemo ResizeAndPositionControl(pictureBoxQRCode, 975, 442, 226, 274); - Bitmap originalImage = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\手機點歌QR碼_完整介面.png")); + Bitmap originalImage = new Bitmap(Path.Combine(serverPath, data["QrCode"]["QrCodeBaseUI"])); //Rectangle closeQRCodeCropArea = new Rectangle(198, 6, 22, 22); diff --git a/PrimaryFormParts/PrimaryForm.SyncScreen.cs b/PrimaryFormParts/PrimaryForm.SyncScreen.cs index 3a7b71c..16b577d 100644 --- a/PrimaryFormParts/PrimaryForm.SyncScreen.cs +++ b/PrimaryFormParts/PrimaryForm.SyncScreen.cs @@ -50,70 +50,70 @@ namespace DualScreenDemo // 同步畫面 服務鈴 ConfigureButton(this.syncServiceBellButton, 1240, 17, 161, 161, - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_服務鈴.png")), - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_服務鈴.png")), - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_服務鈴.png")), + new Bitmap(Path.Combine(serverPath, data["SyncScreen"]["ServiceBell"])), + new Bitmap(Path.Combine(serverPath, data["SyncScreen"]["ServiceBell"])), + new Bitmap(Path.Combine(serverPath, data["SyncScreen"]["ServiceBell"])), //(sender, e) => SendCommandThroughSerialPort("a2 53 a4")); (sender,e)=>OnServiceBellButtonClick(sender,e)); ConfigureButton(this.syncCutSongButton, 1218, 195, 205, 56, - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_切歌.png")), - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_切歌.png")), - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_切歌.png")), (sender, e) => videoPlayerForm.PlayNextSong()); + new Bitmap(Path.Combine(serverPath, data["SyncScreen"]["CutSong"])), + new Bitmap(Path.Combine(serverPath, data["SyncScreen"]["CutSong"])), + new Bitmap(Path.Combine(serverPath, data["SyncScreen"]["CutSong"])), (sender, e) => videoPlayerForm.PlayNextSong()); ConfigureButton(this.syncReplayButton, 1218, 265, 205, 56, - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_重唱.png")), - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_重唱.png")), - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_重唱.png")), ReplayButton_Click); + new Bitmap(Path.Combine(serverPath, data["SyncScreen"]["Replay"])), + new Bitmap(Path.Combine(serverPath, data["SyncScreen"]["Replay"])), + new Bitmap(Path.Combine(serverPath, data["SyncScreen"]["Replay"])), ReplayButton_Click); // 有人聲入口位置 ConfigureButton(this.syncOriginalSongButton, 1218, 335, 205, 56, - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_原唱.png")), - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_原唱.png")), - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_原唱.png")), (sender,e) => videoPlayerForm.ToggleVocalRemoval()); + new Bitmap(Path.Combine(serverPath, data["SyncScreen"]["Original"])), + new Bitmap(Path.Combine(serverPath, data["SyncScreen"]["Original"])), + new Bitmap(Path.Combine(serverPath, data["SyncScreen"]["Original"])), (sender,e) => videoPlayerForm.ToggleVocalRemoval()); ConfigureButton(this.syncMuteButton, 1218, 406, 205, 55, - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_靜音.png")), - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_靜音.png")), - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_靜音.png")), MuteUnmuteButton_Click); + new Bitmap(Path.Combine(serverPath, data["SyncScreen"]["Mute"])), + new Bitmap(Path.Combine(serverPath, data["SyncScreen"]["Mute"])), + new Bitmap(Path.Combine(serverPath, data["SyncScreen"]["Mute"])), MuteUnmuteButton_Click); ConfigureButton(this.syncPauseButton, 1218, 475, 205, 56, - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_暫停.png")), - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_暫停.png")), - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_暫停.png")), SyncPauseButton_Click); + new Bitmap(Path.Combine(serverPath, data["SyncScreen"]["Stop"])), + new Bitmap(Path.Combine(serverPath, data["SyncScreen"]["Stop"])), + new Bitmap(Path.Combine(serverPath, data["SyncScreen"]["Stop"])), SyncPauseButton_Click); ConfigureButton(this.syncPlayButton, 1218, 475, 205, 56, - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_暫停.png")), - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_暫停.png")), - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_暫停.png")), SyncPlayButton_Click); + new Bitmap(Path.Combine(serverPath, data["SyncScreen"]["Play"])), + new Bitmap(Path.Combine(serverPath, data["SyncScreen"]["Play"])), + new Bitmap(Path.Combine(serverPath, data["SyncScreen"]["Play"])), SyncPlayButton_Click); ConfigureButton(this.syncVolumeUpButton, 1218, 546, 205, 55, - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_音樂+.png")), - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_音樂+.png")), - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_音樂+.png")), null); + new Bitmap(Path.Combine(serverPath, data["SyncScreen"]["MusicVolGain"])), + new Bitmap(Path.Combine(serverPath, data["SyncScreen"]["MusicVolGain"])), + new Bitmap(Path.Combine(serverPath, data["SyncScreen"]["MusicVolGain"])), null); this.syncVolumeUpButton.MouseDown += (sender, e) => { OverlayForm.MainForm.ShowTopRightLabel("音量 ↑ ","a2 b3 a4"); }; this.syncVolumeUpButton.MouseUp += (sender, e) => { OverlayForm.MainForm.RedisplayTopRigthLabel(); }; ConfigureButton(this.syncVolumeDownButton, 1218, 616, 205, 55, - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_音樂-.png")), - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_音樂-.png")), - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_音樂-.png")), null); + new Bitmap(Path.Combine(serverPath, data["SyncScreen"]["MusicVolDown"])), + new Bitmap(Path.Combine(serverPath, data["SyncScreen"]["MusicVolDown"])), + new Bitmap(Path.Combine(serverPath, data["SyncScreen"]["MusicVolDown"])), null); this.syncVolumeDownButton.MouseDown += (sender, e) => { OverlayForm.MainForm.ShowTopRightLabel("音量 ↓ ","a2 b4 a4");}; this.syncVolumeDownButton.MouseUp += (sender, e) => { OverlayForm.MainForm.RedisplayTopRigthLabel();}; ConfigureButton(this.syncMicUpButton, 1218, 686, 205, 56, - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_麥克風+.png")), - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_麥克風+.png")), - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_麥克風+.png")), null); + new Bitmap(Path.Combine(serverPath, data["SyncScreen"]["MicVolGain"])), + new Bitmap(Path.Combine(serverPath, data["SyncScreen"]["MicVolGain"])), + new Bitmap(Path.Combine(serverPath, data["SyncScreen"]["MicVolGain"])), null); this.syncMicUpButton.MouseDown += (sender, e) => { OverlayForm.MainForm.ShowTopRightLabel("麥克風 ↑ ","a2 b5 a4");}; this.syncMicUpButton.MouseUp += (sender, e) => { OverlayForm.MainForm.RedisplayTopRigthLabel(); }; ConfigureButton(this.syncMicDownButton, 1218, 756, 205, 56, - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_麥克風-.png")), - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_麥克風-.png")), - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_麥克風-.png")), null); + new Bitmap(Path.Combine(serverPath, data["SyncScreen"]["MicVolDown"])), + new Bitmap(Path.Combine(serverPath, data["SyncScreen"]["MicVolDown"])), + new Bitmap(Path.Combine(serverPath, data["SyncScreen"]["MicVolDown"])), null); this.syncMicDownButton.MouseDown += (sender, e) => { OverlayForm.MainForm.ShowTopRightLabel("麥克風 ↓ ","a2 b6 a4");}; this.syncMicDownButton.MouseUp += (sender, e) => { OverlayForm.MainForm.RedisplayTopRigthLabel(); }; @@ -122,9 +122,9 @@ namespace DualScreenDemo ConfigureButton(this.syncCloseButton, 1218, 826, 205, 56, - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_關閉.png")), - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_關閉.png")), - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_關閉.png")), SyncCloseButton_Click); + new Bitmap(Path.Combine(serverPath, data["SyncScreen"]["Close"])), + new Bitmap(Path.Combine(serverPath, data["SyncScreen"]["Close"])), + new Bitmap(Path.Combine(serverPath, data["SyncScreen"]["Close"])), SyncCloseButton_Click); diff --git a/PrimaryFormParts/PrimaryForm.ToggleLight.cs b/PrimaryFormParts/PrimaryForm.ToggleLight.cs index 9116470..8b2c61e 100644 --- a/PrimaryFormParts/PrimaryForm.ToggleLight.cs +++ b/PrimaryFormParts/PrimaryForm.ToggleLight.cs @@ -96,74 +96,74 @@ namespace DualScreenDemo btnRomantic = new Button{ Text = "" }; ConfigureButton(btnRomantic, 430, 45, 118, 65, - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_浪漫.png")), - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_浪漫.png")), - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_浪漫.png")), + new Bitmap(Path.Combine(serverPath, data["LightControl"]["Romantic"])), + new Bitmap(Path.Combine(serverPath, data["LightControl"]["Romantic"])), + new Bitmap(Path.Combine(serverPath, data["LightControl"]["Romantic"])), (sender, e) => SendCommandThroughSerialPort("a2 d7 a4")); btnAuto = new Button{ Text = "" }; ConfigureButton(btnAuto, 430, 125, 118, 65, - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_自動.png")), - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_自動.png")), - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_自動.png")), + new Bitmap(Path.Combine(serverPath, data["LightControl"]["Auto"])), + new Bitmap(Path.Combine(serverPath, data["LightControl"]["Auto"])), + new Bitmap(Path.Combine(serverPath, data["LightControl"]["Auto"])), null); btnColorTuning = new Button{ Text = "" }; ConfigureButton(btnColorTuning, 430, 203, 118, 65, - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_調色.png")), - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_調色.png")), - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_調色.png")), + new Bitmap(Path.Combine(serverPath, data["LightControl"]["ColorTune"])), + new Bitmap(Path.Combine(serverPath, data["LightControl"]["ColorTune"])), + new Bitmap(Path.Combine(serverPath, data["LightControl"]["ColorTune"])), (sender, e) => SendCommandThroughSerialPort("a2 75 a4")); btnSoft = new Button{ Text = "" }; ConfigureButton(btnSoft, 295, 125, 118, 65, - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_柔和.png")), - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_柔和.png")), - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_柔和.png")), + new Bitmap(Path.Combine(serverPath, data["LightControl"]["Soft"])), + new Bitmap(Path.Combine(serverPath, data["LightControl"]["Soft"])), + new Bitmap(Path.Combine(serverPath, data["LightControl"]["Soft"])), (sender, e) => SendCommandThroughSerialPort("a2 d6 a4")); btnDynamic = new Button{ Text = "" }; ConfigureButton(btnDynamic, 295, 203, 118, 65, - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_動感.png")), - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_動感.png")), - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_動感.png")), + new Bitmap(Path.Combine(serverPath, data["LightControl"]["Dynamic"])), + new Bitmap(Path.Combine(serverPath, data["LightControl"]["Dynamic"])), + new Bitmap(Path.Combine(serverPath, data["LightControl"]["Dynamic"])), (sender, e) => SendCommandThroughSerialPort("a2 d8 a4")); btnDeskLamp = new Button{ Text = "" }; ConfigureButton(btnDeskLamp, 430, 283, 118, 65, - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_桌燈.png")), - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_桌燈.png")), - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_桌燈.png")), + new Bitmap(Path.Combine(serverPath, data["LightControl"]["Lamp"])), + new Bitmap(Path.Combine(serverPath, data["LightControl"]["Lamp"])), + new Bitmap(Path.Combine(serverPath, data["LightControl"]["Lamp"])), (sender, e) => SendCommandThroughSerialPort("a2 fb a4")); btnStageLight = new Button{ Text = "" }; ConfigureButton(btnStageLight, 295, 283, 118, 65, - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_舞台燈.png")), - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_舞台燈.png")), - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_舞台燈.png")), + new Bitmap(Path.Combine(serverPath, data["LightControl"]["StageLight"])), + new Bitmap(Path.Combine(serverPath, data["LightControl"]["StageLight"])), + new Bitmap(Path.Combine(serverPath, data["LightControl"]["StageLight"])), (sender, e) => SendCommandThroughSerialPort("a2 fa a4")); btnShelfLight = new Button{ Text = "" }; ConfigureButton(btnShelfLight, 163, 283, 118, 65, - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_層板燈.png")), - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_層板燈.png")), - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_層板燈.png")), + new Bitmap(Path.Combine(serverPath, data["LightControl"]["ShelfLight"])), + new Bitmap(Path.Combine(serverPath, data["LightControl"]["ShelfLight"])), + new Bitmap(Path.Combine(serverPath, data["LightControl"]["ShelfLight"])), (sender, e) => SendCommandThroughSerialPort("a2 f9 a4")); btnWallLight = new Button{ Text = "" }; ConfigureButton(btnWallLight, 29, 283, 118, 65, - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_壁燈.png")), - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_壁燈.png")), - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_壁燈.png")), + new Bitmap(Path.Combine(serverPath, data["LightControl"]["WallLight"])), + new Bitmap(Path.Combine(serverPath, data["LightControl"]["WallLight"])), + new Bitmap(Path.Combine(serverPath, data["LightControl"]["WallLight"])), (sender, e) => SendCommandThroughSerialPort("a2 f8 a4")); @@ -248,10 +248,12 @@ namespace DualScreenDemo if (!pictureBoxToggleLight.Visible) { + var data = LoadBtnConfigData(); + pictureBoxToggleLight.Size = new Size(630, 379); pictureBoxToggleLight.Location = new Point(570, 359); ResizeAndPositionPictureBox(pictureBoxToggleLight, 570, 359, 570, 359); - pictureBoxToggleLight.BackgroundImage = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_完整介面.png")); + pictureBoxToggleLight.BackgroundImage = new Bitmap(Path.Combine(serverPath, data["LightControl"]["LightControlBaseUI"])); pictureBoxToggleLight.BackgroundImageLayout = ImageLayout.Stretch; pictureBoxToggleLight.BringToFront(); SetUIVisible(pictureBoxToggleLight); diff --git a/PrimaryFormParts/PrimaryForm.cs b/PrimaryFormParts/PrimaryForm.cs index 495fd94..52b28a6 100644 --- a/PrimaryFormParts/PrimaryForm.cs +++ b/PrimaryFormParts/PrimaryForm.cs @@ -1089,7 +1089,7 @@ namespace DualScreenDemo new Bitmap(Path.Combine(serverPath, data["PrimaryFormSubBtn"]["MusicGainNormal"])), new Bitmap(Path.Combine(serverPath, data["PrimaryFormSubBtn"]["MusicGainNormal"])), new Bitmap(Path.Combine(serverPath, data["PrimaryFormSubBtn"]["MusicGainActive"])), - (sender, e) => { OverlayForm.MainForm.ShowTopRightLabel("音量 ↑", "a2 b3 a4"); }); + (sender, e) => { OverlayForm.MainForm.ShowTopRightLabelTime("音量 ↑", "a2 b3 a4"); }); @@ -1099,7 +1099,7 @@ namespace DualScreenDemo new Bitmap(Path.Combine(serverPath, data["PrimaryFormSubBtn"]["MusicLowNormal"])), new Bitmap(Path.Combine(serverPath, data["PrimaryFormSubBtn"]["MusicLowNormal"])), new Bitmap(Path.Combine(serverPath, data["PrimaryFormSubBtn"]["MusicLowActive"])), - (sender, e) => { OverlayForm.MainForm.ShowTopRightLabel("音量 ↓", "a2 b4 a4"); }); + (sender, e) => { OverlayForm.MainForm.ShowTopRightLabelTime("音量 ↓", "a2 b4 a4"); }); if (test) { @@ -1125,7 +1125,7 @@ namespace DualScreenDemo new Bitmap(Path.Combine(serverPath, data["PrimaryFormSubBtn"]["MiPhoneGainNormal"])), new Bitmap(Path.Combine(serverPath, data["PrimaryFormSubBtn"]["MiPhoneGainNormal"])), new Bitmap(Path.Combine(serverPath, data["PrimaryFormSubBtn"]["MiPhoneGainActive"])), - (sender, e) => { OverlayForm.MainForm.ShowTopRightLabel("麥克風 ↑", "a2 b5 a4"); }); + (sender, e) => { OverlayForm.MainForm.ShowTopRightLabelTime("麥克風 ↑", "a2 b5 a4"); }); micDownButton = new Button { Text = "" }; @@ -1134,7 +1134,7 @@ namespace DualScreenDemo new Bitmap(Path.Combine(serverPath, data["PrimaryFormSubBtn"]["MiPhoneLowNormal"])), new Bitmap(Path.Combine(serverPath, data["PrimaryFormSubBtn"]["MiPhoneLowNormal"])), new Bitmap(Path.Combine(serverPath, data["PrimaryFormSubBtn"]["MiPhoneLowActive"])), - (sender, e) => { OverlayForm.MainForm.ShowTopRightLabel("麥克風 ↓", "a2 b6 a4"); }); + (sender, e) => { OverlayForm.MainForm.ShowTopRightLabelTime("麥克風 ↓", "a2 b6 a4"); }); originalSongButton = new Button { Text = "" }; diff --git a/PrimaryFormParts/SingerSearch/PrimaryForm.SingerSearch.cs b/PrimaryFormParts/SingerSearch/PrimaryForm.SingerSearch.cs index 9887886..ff9f046 100644 --- a/PrimaryFormParts/SingerSearch/PrimaryForm.SingerSearch.cs +++ b/PrimaryFormParts/SingerSearch/PrimaryForm.SingerSearch.cs @@ -66,6 +66,12 @@ namespace DualScreenDemo SetPinYinSongsAndButtonsVisibility(false); SetPictureBoxToggleLightAndButtonsVisibility(false); SetPictureBoxSceneSoundEffectsAndButtonsVisibility(false); + SetHandWritingForSongsAndButtonsVisibility(false); + SetWordCountSongsAndButtonsVisibility(false); + SetSongIDSearchAndButtonsVisibility(false); + SetHandWritingForSingersAndButtonsVisibility(false); + SetWordCountSingersAndButtonsVisibility(false); + SetSingerSearchButtonsVisibility(true); @@ -106,7 +112,7 @@ namespace DualScreenDemo InitializeButton(ref wordCountSearchButton, ref wordCountSearchNormalBackground, ref wordCountSearchActiveBackground, "wordCountSearchButton", 1197, 390, 225, 50, data["SingerSearch"]["WordCntSingerNormal"], data["SingerSearch"]["WordCntSingerActive"], WordCountSearchSingersButton_Click); - InitializeButton(ref handWritingSearchButton, ref handWritingSearchNormalBackground, ref handWritingSearchActiveBackground, "handWritingSearchButton", 1197, 445, 225, 50, data["SingerSearch"]["EngSingerNormal"], data["SingerSearch"]["EngSingerActive"], HandWritingSearchButtonForSingers_Click); + InitializeButton(ref handWritingSearchButton, ref handWritingSearchNormalBackground, ref handWritingSearchActiveBackground, "handWritingSearchButton", 1197, 445, 225, 50, data["SingerSearch"]["HWritingSingerNormal"], data["SingerSearch"]["HWritingSingerActive"], HandWritingSearchButtonForSingers_Click); } diff --git a/PrimaryFormParts/SongSearch/PrimaryForm.SongSearch.NumberSearch.cs b/PrimaryFormParts/SongSearch/PrimaryForm.SongSearch.NumberSearch.cs index 125404e..0a335f8 100644 --- a/PrimaryFormParts/SongSearch/PrimaryForm.SongSearch.NumberSearch.cs +++ b/PrimaryFormParts/SongSearch/PrimaryForm.SongSearch.NumberSearch.cs @@ -555,6 +555,8 @@ namespace DualScreenDemo } private void FindNumberSongs(){ + var data = LoadBtnConfigData(); + string searchText = inputBoxSongIDSearch.Text; // 在這裡添加搜尋歌曲的邏輯 // 例如:根據輸入框的內容搜尋歌曲 @@ -580,7 +582,7 @@ namespace DualScreenDemo this.DoubleBuffered = true; this.SuspendLayout(); - DrawTextOnVodScreenPictureBox(Path.Combine(serverPath, @"themes\superstar\button\3.介面\歌曲點播_空白介面.png"), currentSelectedSong); + DrawTextOnVodScreenPictureBox(Path.Combine(serverPath, data["SongOrderPanel"]["UIBase"]), currentSelectedSong); SetVodScreenPictureBoxAndButtonsVisibility(true); this.ResumeLayout(true); diff --git a/PrimaryFormParts/SongSearch/PrimaryForm.SongSearch.WordCountSearch.cs b/PrimaryFormParts/SongSearch/PrimaryForm.SongSearch.WordCountSearch.cs index 1f00094..8fbc526 100644 --- a/PrimaryFormParts/SongSearch/PrimaryForm.SongSearch.WordCountSearch.cs +++ b/PrimaryFormParts/SongSearch/PrimaryForm.SongSearch.WordCountSearch.cs @@ -52,7 +52,7 @@ namespace DualScreenDemo SetHandWritingForSongsAndButtonsVisibility(false); SetSongIDSearchAndButtonsVisibility(false); SetZhuYinSongsAndButtonsVisibility(false); - + SetHandWritingForSongsAndButtonsVisibility(false); SetWordCountSongsAndButtonsVisibility(true); // 顯示字數搜尋相關控件 // 顯示「注音歌手搜尋」的圖片框 diff --git a/PrimaryFormParts/SongSearch/PrimaryForm.SongSearch.cs b/PrimaryFormParts/SongSearch/PrimaryForm.SongSearch.cs index ee2f688..0a60715 100644 --- a/PrimaryFormParts/SongSearch/PrimaryForm.SongSearch.cs +++ b/PrimaryFormParts/SongSearch/PrimaryForm.SongSearch.cs @@ -76,8 +76,12 @@ namespace DualScreenDemo SetPinYinSingersAndButtonsVisibility(false); SetPinYinSongsAndButtonsVisibility(false); SetPictureBoxToggleLightAndButtonsVisibility(false); + SetHandWritingForSongsAndButtonsVisibility(false); SetPictureBoxSceneSoundEffectsAndButtonsVisibility(false); - + SetWordCountSongsAndButtonsVisibility(false); + SetSongIDSearchAndButtonsVisibility(false); + SetHandWritingForSingersAndButtonsVisibility(false); + SetWordCountSingersAndButtonsVisibility(false); // 顯示歌曲搜尋選單按鈕 SetSongSearchButtonsVisibility(true); diff --git a/img.ini b/img.ini index 65e4394..f0e9c4e 100644 --- a/img.ini +++ b/img.ini @@ -305,41 +305,72 @@ OnOff=themes\\superstar\\button\\3.介面\\燈光控制_ON-OFF.png Brightness=themes\\superstar\\button\\3.介面\\燈光控制_明亮.png +Romantic=themes\\superstar\\button\\3.介面\\燈光控制_浪漫.png + +Auto=themes\\superstar\\button\\3.介面\\燈光控制_自動.png + +ColorTune=themes\\superstar\\button\\3.介面\\燈光控制_調色.png + +Soft=themes\\superstar\\button\\3.介面\\燈光控制_柔和.png + +Dynamic=themes\\superstar\\button\\3.介面\\燈光控制_動感.png + +Lamp=themes\\superstar\\button\\3.介面\\燈光控制_桌燈.png + +StageLight=themes\\superstar\\button\\3.介面\\燈光控制_舞台燈.png + +ShelfLight=themes\\superstar\\button\\3.介面\\燈光控制_層板燈.png + +WallLight=themes\\superstar\\button\\3.介面\\燈光控制_壁燈.png + +LightControlBaseUI=themes\\superstar\\button\\3.介面\\燈光控制_完整介面.png +[SyncScreen] + +ServiceBell=themes\\superstar\\button\\3.介面\\同步畫面_服務鈴.png + +CutSong=themes\\superstar\\button\\3.介面\\同步畫面_切歌.png + +Replay=themes\\superstar\\button\\3.介面\\同步畫面_重唱.png + +Original=themes\\superstar\\button\\3.介面\\同步畫面_原唱.png + +Mute=themes\\superstar\\button\\3.介面\\同步畫面_靜音.png + +Stop=themes\\superstar\\button\\3.介面\\同步畫面_暫停.png + +Play=themes\\superstar\\button\\3.介面\\同步畫面_暫停.png + +MusicVolGain=themes\\superstar\\button\\3.介面\\同步畫面_音樂+.png + +MusicVolDown=themes\\superstar\\button\\3.介面\\同步畫面_音樂-.png + +MicVolGain=themes\\superstar\\button\\3.介面\\同步畫面_麥克風+.png + +MicVolDown=themes\\superstar\\button\\3.介面\\同步畫面_麥克風-.png + +Close=themes\\superstar\\button\\3.介面\\同步畫面_關閉.png +[Favorite] + +FilePath=themes\superstar\button\3.介面\我的最愛_ + +Enter=themes\superstar\button\3.介面\我的最愛_確認.png + +New=themes\superstar\button\3.介面\我的最愛_新建.png + +Refill=themes\superstar\button\3.介面\我的最愛_重填.png + +Close=themes\superstar\button\3.介面\我的最愛_關閉.png + +FavoriteBaseUI=themes\\superstar\\button\\3.介面\\我的最愛_空白介面.png +[QrCode] - - - - - - - - - - - - - - - - - - - - - - - - - - - - +QrCodeBaseUI=themes/superstar/button/3.介面/手機點歌QR碼_完整介面.png [ImagePaths]