From 04c10d23cb3fce7169633608f02371d5b1a81783 Mon Sep 17 00:00:00 2001 From: jasonchenwork Date: Thu, 28 Aug 2025 17:49:07 +0800 Subject: [PATCH] =?UTF-8?q?2508281746=20=E6=8E=A7=E5=88=B6=E9=A0=85?= =?UTF-8?q?=E5=BE=9E=E5=B1=AC=E8=A8=AD=E5=AE=9A=E6=9B=B4=E6=AD=A3=20?= =?UTF-8?q?=E7=A8=8B=E5=BC=8F=E7=A2=BC=E9=87=8D=E6=A7=8B/=E7=98=A6?= =?UTF-8?q?=E8=BA=AB=20Media=E8=BC=89=E5=85=A5=E6=B5=81=E7=A8=8B=E8=AA=BF?= =?UTF-8?q?=E6=95=B4,=E9=99=8D=E4=BD=8E=E9=96=83=E7=88=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PrimaryFormParts/PrimaryForm.SoundEffects.cs | 78 +- PrimaryFormParts/PrimaryForm.ToggleLight.cs | 59 +- PrimaryFormParts/PrimaryForm.cs | 26 +- ...maryForm.SingerSearch.HandwritingSearch.cs | 412 ++++---- ...rimaryForm.SingerSearch.WordCountSearch.cs | 941 +++-------------- ...rimaryForm.SongSearch.HandwritingSearch.cs | 396 +++---- .../PrimaryForm.SongSearch.WordCountSearch.cs | 970 +++++------------- Services/MediaService.cs | 3 +- img.ini | 42 +- 9 files changed, 768 insertions(+), 2159 deletions(-) diff --git a/PrimaryFormParts/PrimaryForm.SoundEffects.cs b/PrimaryFormParts/PrimaryForm.SoundEffects.cs index 449e0b5..38738d0 100644 --- a/PrimaryFormParts/PrimaryForm.SoundEffects.cs +++ b/PrimaryFormParts/PrimaryForm.SoundEffects.cs @@ -30,60 +30,60 @@ namespace DualScreenDemo { Name = "constructionButton", }; - ConfigureButton(constructionButton, 876, 494, 148, 64, + ConfigureButton(constructionButton, 18, 68, 148, 64, new Bitmap(Path.Combine(serverPath, data["SoundEffect"]["ConstruSite"])), new Bitmap(Path.Combine(serverPath, data["SoundEffect"]["ConstruSite"])), new Bitmap(Path.Combine(serverPath, data["SoundEffect"]["ConstruSite"])), ConstructionButton_Click); - this.Controls.Add(constructionButton); + pictureBoxSceneSoundEffects.Controls.Add(constructionButton); marketButton = new Button { Name = "marketButton", }; - ConfigureButton(marketButton, 1037, 495, 148, 63, + ConfigureButton(marketButton, 179, 68, 148, 63, new Bitmap(Path.Combine(serverPath, data["SoundEffect"]["Market"])), new Bitmap(Path.Combine(serverPath, data["SoundEffect"]["Market"])), new Bitmap(Path.Combine(serverPath, data["SoundEffect"]["Market"])), MarketButton_Click); - this.Controls.Add(marketButton); + pictureBoxSceneSoundEffects.Controls.Add(marketButton); drivingButton = new Button { Name = "drivingButton", }; - ConfigureButton(drivingButton, 876, 570, 148, 63, + ConfigureButton(drivingButton, 18, 144, 148, 63, new Bitmap(Path.Combine(serverPath, data["SoundEffect"]["Drive"])), new Bitmap(Path.Combine(serverPath, data["SoundEffect"]["Drive"])), new Bitmap(Path.Combine(serverPath, data["SoundEffect"]["Drive"])), DrivingButton_Click); - this.Controls.Add(drivingButton); + pictureBoxSceneSoundEffects.Controls.Add(drivingButton); airportButton = new Button { Name = "airportButton", }; - ConfigureButton(airportButton, 1037, 570, 148, 63, + ConfigureButton(airportButton, 179, 144, 148, 63, new Bitmap(Path.Combine(serverPath, data["SoundEffect"]["Airport"])), new Bitmap(Path.Combine(serverPath, data["SoundEffect"]["Airport"])), new Bitmap(Path.Combine(serverPath, data["SoundEffect"]["Airport"])), AirportButton_Click); - this.Controls.Add(airportButton); + pictureBoxSceneSoundEffects.Controls.Add(airportButton); officeButton = new Button { Name = "officeButton", }; - ConfigureButton(officeButton, 876, 646, 148, 64, + ConfigureButton(officeButton, 18, 220, 148, 64, new Bitmap(Path.Combine(serverPath, data["SoundEffect"]["Office"])), new Bitmap(Path.Combine(serverPath, data["SoundEffect"]["Office"])), new Bitmap(Path.Combine(serverPath, data["SoundEffect"]["Office"])), OfficeButton_Click); - this.Controls.Add(officeButton); + pictureBoxSceneSoundEffects.Controls.Add(officeButton); closeButton = new Button @@ -91,22 +91,19 @@ namespace DualScreenDemo Name = "closeButton", }; - ConfigureButton(closeButton, 1036, 646, 150, 63, + ConfigureButton(closeButton, 179, 220, 150, 63, new Bitmap(Path.Combine(serverPath, data["SoundEffect"]["Close"])), new Bitmap(Path.Combine(serverPath, data["SoundEffect"]["Close"])), new Bitmap(Path.Combine(serverPath, data["SoundEffect"]["Close"])), CloseButton_Click); - this.Controls.Add(closeButton); + pictureBoxSceneSoundEffects.Controls.Add(closeButton); } private void SoundEffectButton_Click(object sender, EventArgs e) { var data = LoadBtnConfigData(); - - SetHotSongButtonsVisibility(false); - SetNewSongButtonsVisibility(false); - SetSingerSearchButtonsVisibility(false); - SetSongSearchButtonsVisibility(false); + SetPictureBoxToggleLightAndButtonsVisibility(false); + CloseUI(pictureBoxQRCode); if (!pictureBoxSceneSoundEffects.Visible) { @@ -150,19 +147,12 @@ namespace DualScreenDemo } private void ShowImageOnPictureBoxSceneSoundEffects(string imagePath) - { - + { Bitmap originalImage = new Bitmap(imagePath); - - Rectangle cropArea = new Rectangle(859, 427, 342, 295); - - - Bitmap croppedImage = CropImage(originalImage, cropArea); - - - pictureBoxSceneSoundEffects.Image = originalImage; - + Rectangle cropArea = new Rectangle(856, 422, 342, 295); + + pictureBoxSceneSoundEffects.Image = originalImage; ResizeAndPositionPictureBox(pictureBoxSceneSoundEffects, cropArea.X, cropArea.Y, cropArea.Width, cropArea.Height); @@ -170,45 +160,19 @@ namespace DualScreenDemo } private void TogglePictureBoxSceneSoundEffectsButtonsVisibility() - { - + { bool areButtonsVisible = pictureBoxSceneSoundEffects.Visible; - SetPictureBoxSceneSoundEffectsAndButtonsVisibility(!areButtonsVisible); } - private void SetPictureBoxSceneSoundEffectsAndButtonsVisibility(bool isVisible) - { - + { pictureBoxSceneSoundEffects.Visible = isVisible; if (isVisible) { - - pictureBoxSceneSoundEffects.BringToFront(); - } - - - List