From 1c8cee23c93d03bf9002d83a944563844e9ad571 Mon Sep 17 00:00:00 2001 From: "allen.yan" Date: Thu, 7 Aug 2025 17:17:02 +0800 Subject: [PATCH] =?UTF-8?q?=E7=87=88=E5=85=89=E6=8E=A7=E5=88=B6=E8=88=87?= =?UTF-8?q?=E6=88=91=E7=9A=84=E6=9C=80=E6=84=9B=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PrimaryFormParts/PrimaryForm.Favorite.cs | 2 +- PrimaryFormParts/PrimaryForm.ToggleLight.cs | 55 +++++++++++---------- 2 files changed, 31 insertions(+), 26 deletions(-) diff --git a/PrimaryFormParts/PrimaryForm.Favorite.cs b/PrimaryFormParts/PrimaryForm.Favorite.cs index 1287df8..1392db0 100644 --- a/PrimaryFormParts/PrimaryForm.Favorite.cs +++ b/PrimaryFormParts/PrimaryForm.Favorite.cs @@ -350,7 +350,7 @@ namespace DualScreenDemo if (!FavoritePictureBox.Visible) { - ShowImageOnFavoritePictureBox(Path.Combine(serverPath, @"themes\superstar\我的最愛\我的最愛_工作區域.jpg")); + ShowImageOnFavoritePictureBox(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\我的最愛_空白介面.png")); SetFavoritePictureBoxAndButtonsVisibility(true); } else diff --git a/PrimaryFormParts/PrimaryForm.ToggleLight.cs b/PrimaryFormParts/PrimaryForm.ToggleLight.cs index af1eda3..f5ad738 100644 --- a/PrimaryFormParts/PrimaryForm.ToggleLight.cs +++ b/PrimaryFormParts/PrimaryForm.ToggleLight.cs @@ -25,8 +25,8 @@ namespace DualScreenDemo private int OnOffState; private PictureBox pictureBoxToggleLight; - private PictureBox Brightness1; - private PictureBox Brightness2; + //private PictureBox Brightness1; + //private PictureBox Brightness2; private void InitializeButtonsForPictureBoxToggleLight() { @@ -167,20 +167,21 @@ namespace DualScreenDemo (sender, e) => SendCommandThroughSerialPort("a2 f8 a4")); - Brightness1 = new PictureBox { }; - Brightness1.BackgroundImage = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_桌燈調光.png")); - Brightness1.BackgroundImageLayout = ImageLayout.Stretch; - Brightness1.Size = new Size(155, 172); - Brightness1.Location = new Point(38, 151); + //Brightness1 = new PictureBox { }; + //Brightness1.BackgroundImage = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_桌燈調光.png")); + //Brightness1.BackgroundImageLayout = ImageLayout.Stretch; + //Brightness1.Size = new Size(155, 172); + //Brightness1.Location = new Point(38, 151); btnBrightnessUp1 = new Button{ Text = "" }; - ConfigureTransButton(btnBrightnessUp1, 1, 1, 116, 40, null); + ConfigureTransButton(btnBrightnessUp1, 30, 125, 118, 65, null); btnBrightnessUp1.MouseDown += (sender, e) => { lightControlTimer.Tag = "a2 d9 a4"; - lightControlTimer.Start(); + lightControlTimer.Start(); }; + //btnBrightnessUp1.BackColor = Color.Red; btnBrightnessUp1.MouseUp += (sender, e) => { @@ -188,26 +189,26 @@ namespace DualScreenDemo }; btnBrightnessDown1 = new Button{ Text = "" }; - ConfigureTransButton(btnBrightnessDown1, 1, 100, 116, 42, null); + ConfigureTransButton(btnBrightnessDown1, 30, 203, 118, 65, null); btnBrightnessDown1.MouseDown += (sender, e) => { lightControlTimer.Tag = "a2 da a4"; lightControlTimer.Start(); }; btnBrightnessDown1.MouseUp += (sender, e) => { lightControlTimer.Stop(); }; + //btnBrightnessDown1.BackColor = Color.Red; - - Brightness2 = new PictureBox { }; - Brightness2.BackgroundImage = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_層板調光.png")); - Brightness2.BackgroundImageLayout = ImageLayout.Stretch; - Brightness2.Size = new Size(155, 172); - Brightness2.Location = new Point(216, 151); + //Brightness2 = new PictureBox { }; + //Brightness2.BackgroundImage = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_層板調光.png")); + //Brightness2.BackgroundImageLayout = ImageLayout.Stretch; + //Brightness2.Size = new Size(155, 172); + //Brightness2.Location = new Point(216, 151); btnBrightnessUp2 = new Button{ Text = "" }; - ConfigureTransButton(btnBrightnessUp2, 1, 1, 116, 42, null); - btnBrightnessUp2.MouseDown += (sender, e) => { lightControlTimer.Tag = "a2 f6 a4"; lightControlTimer.Start(); }; + ConfigureTransButton(btnBrightnessUp2, 163, 125, 118, 65, null); + btnBrightnessUp2.MouseDown += (sender, e) => { lightControlTimer.Tag = "a2 f6 a4"; lightControlTimer.Start(); }; btnBrightnessUp2.MouseUp += (sender, e) => { lightControlTimer.Stop(); }; btnBrightnessDown2 = new Button{ Text = "" }; - ConfigureTransButton(btnBrightnessDown2, 1, 100, 116, 42, null); + ConfigureTransButton(btnBrightnessDown2, 163, 203, 118, 65, null); btnBrightnessDown2.MouseDown += (sender, e) => { lightControlTimer.Tag = "a2 f7 a4"; lightControlTimer.Start(); }; btnBrightnessDown2.MouseUp += (sender, e) => { lightControlTimer.Stop(); }; @@ -223,12 +224,16 @@ namespace DualScreenDemo pictureBoxToggleLight.Controls.Add(btnStageLight); pictureBoxToggleLight.Controls.Add(btnShelfLight); pictureBoxToggleLight.Controls.Add(btnWallLight); - Brightness1.Controls.Add(btnBrightnessUp1); - Brightness1.Controls.Add(btnBrightnessDown1); - Brightness2.Controls.Add(btnBrightnessUp2); - Brightness2.Controls.Add(btnBrightnessDown2); - pictureBoxToggleLight.Controls.Add(Brightness1); - pictureBoxToggleLight.Controls.Add(Brightness2); + //Brightness1.Controls.Add(btnBrightnessUp1); + //Brightness1.Controls.Add(btnBrightnessDown1); + //Brightness2.Controls.Add(btnBrightnessUp2); + //Brightness2.Controls.Add(btnBrightnessDown2); + pictureBoxToggleLight.Controls.Add(btnBrightnessUp1); + pictureBoxToggleLight.Controls.Add(btnBrightnessDown1); + pictureBoxToggleLight.Controls.Add(btnBrightnessUp2); + pictureBoxToggleLight.Controls.Add(btnBrightnessDown2); + //pictureBoxToggleLight.Controls.Add(Brightness1); + //pictureBoxToggleLight.Controls.Add(Brightness2); }