diff --git a/PrimaryFormParts/PrimaryForm.Promotions.cs b/PrimaryFormParts/PrimaryForm.Promotions.cs index 80a13e2..e4c82fb 100644 --- a/PrimaryFormParts/PrimaryForm.Promotions.cs +++ b/PrimaryFormParts/PrimaryForm.Promotions.cs @@ -19,7 +19,7 @@ namespace DualScreenDemo int baseY = Screen.PrimaryScreen.Bounds.Height - 120; int buttonSpacing = 90; - var data = LoadConfigData(); + var data = LoadBtnConfigData(); // 共用的按鈕設置 void ConfigurePromotionButton(Button button, string imagePath, Point location) @@ -55,15 +55,15 @@ namespace DualScreenDemo // 配置各個按鈕 previousPromotionButton = new Button { Name = "previousPromotionButton", Visible = true }; - ConfigurePromotionButton(previousPromotionButton, "themes\\superstar\\button\\3.介面\\切換頁面_上一頁.png", new Point(baseX, baseY)); + ConfigurePromotionButton(previousPromotionButton, data["PromoFood"]["PrePage"], new Point(baseX, baseY)); previousPromotionButton.Click += PreviousPromotionButton_Click; closePromotionsButton = new Button { Name = "closePromotionsButton", Visible = false }; - ConfigurePromotionButton(closePromotionsButton, "themes\\superstar\\button\\3.介面\\切換頁面_退出.png", new Point(baseX + buttonSpacing, baseY)); + ConfigurePromotionButton(closePromotionsButton, data["PromoFood"]["Exit"], new Point(baseX + buttonSpacing, baseY)); closePromotionsButton.Click += ClosePromotionsButton_Click; nextPromotionButton = new Button { Name = "nextPromotionButton", Visible = true }; - ConfigurePromotionButton(nextPromotionButton, "themes\\superstar\\button\\3.介面\\切換頁面_下一頁.png", new Point(baseX + (buttonSpacing * 2), baseY)); + ConfigurePromotionButton(nextPromotionButton, data["PromoFood"]["NextPage"], new Point(baseX + (buttonSpacing * 2), baseY)); nextPromotionButton.Click += NextPromotionButton_Click; this.Controls.Add(previousPromotionButton); @@ -80,20 +80,8 @@ namespace DualScreenDemo private void promotionsButton_Click(object sender, EventArgs e) { - var data = LoadConfigData(); - promotionsAndMenuPanel.currentPageIndex=0; - 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 = myFavoritesNormalBackground; - promotionsButton.BackgroundImage = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別上方_優惠活動(已按).png")); - deliciousFoodButton.BackgroundImage = deliciousFoodNormalBackground; + UpdateButtonBackgrounds(promotionsButton,promotionsActiveBackground); isOnOrderedSongsPage = false; diff --git a/PrimaryFormParts/PrimaryForm.SoundEffects.cs b/PrimaryFormParts/PrimaryForm.SoundEffects.cs index aa95e77..449e0b5 100644 --- a/PrimaryFormParts/PrimaryForm.SoundEffects.cs +++ b/PrimaryFormParts/PrimaryForm.SoundEffects.cs @@ -24,16 +24,16 @@ namespace DualScreenDemo private void InitializeSoundEffectButtons() { - var data = LoadConfigData(); + var data = LoadBtnConfigData(); constructionButton = new Button { Name = "constructionButton", }; ConfigureButton(constructionButton, 876, 494, 148, 64, - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.\\_ua.png")), - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.\\_ua.png")), - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.\\_ua.png")), + 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); @@ -43,9 +43,9 @@ namespace DualScreenDemo Name = "marketButton", }; ConfigureButton(marketButton, 1037, 495, 148, 63, - 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["SoundEffect"]["Market"])), + new Bitmap(Path.Combine(serverPath, data["SoundEffect"]["Market"])), + new Bitmap(Path.Combine(serverPath, data["SoundEffect"]["Market"])), MarketButton_Click); this.Controls.Add(marketButton); @@ -55,9 +55,9 @@ namespace DualScreenDemo Name = "drivingButton", }; ConfigureButton(drivingButton, 876, 570, 148, 63, - 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["SoundEffect"]["Drive"])), + new Bitmap(Path.Combine(serverPath, data["SoundEffect"]["Drive"])), + new Bitmap(Path.Combine(serverPath, data["SoundEffect"]["Drive"])), DrivingButton_Click); this.Controls.Add(drivingButton); @@ -67,9 +67,9 @@ namespace DualScreenDemo Name = "airportButton", }; ConfigureButton(airportButton, 1037, 570, 148, 63, - 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["SoundEffect"]["Airport"])), + new Bitmap(Path.Combine(serverPath, data["SoundEffect"]["Airport"])), + new Bitmap(Path.Combine(serverPath, data["SoundEffect"]["Airport"])), AirportButton_Click); this.Controls.Add(airportButton); @@ -79,9 +79,9 @@ namespace DualScreenDemo Name = "officeButton", }; ConfigureButton(officeButton, 876, 646, 148, 64, - 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["SoundEffect"]["Office"])), + new Bitmap(Path.Combine(serverPath, data["SoundEffect"]["Office"])), + new Bitmap(Path.Combine(serverPath, data["SoundEffect"]["Office"])), OfficeButton_Click); this.Controls.Add(officeButton); @@ -92,16 +92,16 @@ namespace DualScreenDemo }; ConfigureButton(closeButton, 1036, 646, 150, 63, - 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["SoundEffect"]["Close"])), + new Bitmap(Path.Combine(serverPath, data["SoundEffect"]["Close"])), + new Bitmap(Path.Combine(serverPath, data["SoundEffect"]["Close"])), CloseButton_Click); this.Controls.Add(closeButton); } private void SoundEffectButton_Click(object sender, EventArgs e) { - var data = LoadConfigData(); + var data = LoadBtnConfigData(); SetHotSongButtonsVisibility(false); SetNewSongButtonsVisibility(false); @@ -110,7 +110,7 @@ namespace DualScreenDemo if (!pictureBoxSceneSoundEffects.Visible) { - ShowImageOnPictureBoxSceneSoundEffects(Path.Combine(serverPath, @"themes\superstar\button\3.\_ťդ.png")); + ShowImageOnPictureBoxSceneSoundEffects(Path.Combine(serverPath, data["SoundEffect"]["SoundEffectBaseUI"])); SetPictureBoxSceneSoundEffectsAndButtonsVisibility(true); } else diff --git a/PrimaryFormParts/PrimaryForm.ToggleLight.cs b/PrimaryFormParts/PrimaryForm.ToggleLight.cs index f5ad738..9116470 100644 --- a/PrimaryFormParts/PrimaryForm.ToggleLight.cs +++ b/PrimaryFormParts/PrimaryForm.ToggleLight.cs @@ -30,13 +30,13 @@ namespace DualScreenDemo private void InitializeButtonsForPictureBoxToggleLight() { - var data=LoadConfigData(); + var data=LoadBtnConfigData(); btnTurnOn = new Button { Text = "" }; ConfigureButton(btnTurnOn, 29, 45, 250, 67, - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_ON-OFF.png")), - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_ON-OFF.png")), - new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_ON-OFF.png")), + new Bitmap(Path.Combine(serverPath, data["LightControl"]["OnOff"])), + new Bitmap(Path.Combine(serverPath, data["LightControl"]["OnOff"])), + new Bitmap(Path.Combine(serverPath, data["LightControl"]["OnOff"])), null); @@ -72,9 +72,9 @@ namespace DualScreenDemo btnBright = new Button{ Text = "" }; ConfigureButton(btnBright, 295, 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"]["Brightness"])), + new Bitmap(Path.Combine(serverPath, data["LightControl"]["Brightness"])), + new Bitmap(Path.Combine(serverPath, data["LightControl"]["Brightness"])), null); btnBright.Click += (sender, e) => { diff --git a/PrimaryFormParts/PrimaryForm.VodScreen.cs b/PrimaryFormParts/PrimaryForm.VodScreen.cs index af0502f..13da108 100644 --- a/PrimaryFormParts/PrimaryForm.VodScreen.cs +++ b/PrimaryFormParts/PrimaryForm.VodScreen.cs @@ -28,9 +28,9 @@ namespace DualScreenDemo vodButton = new Button(); vodButton.Text = ""; ConfigureButton(vodButton, xPosition - 119, yPosition + 35, 110, 50, - 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["SongOrderPanel"]["Request"])), + new Bitmap(Path.Combine(serverPath, data["SongOrderPanel"]["Request"])), + new Bitmap(Path.Combine(serverPath, data["SongOrderPanel"]["Request"])), VodButton_Click); vodButton.Visible = false; @@ -38,9 +38,9 @@ namespace DualScreenDemo insertButton = new Button(); insertButton.Text = ""; ConfigureButton(insertButton, xPosition + 12, yPosition + 35, 110, 50, - 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["SongOrderPanel"]["Insert"])), + new Bitmap(Path.Combine(serverPath, data["SongOrderPanel"]["Insert"])), + new Bitmap(Path.Combine(serverPath, data["SongOrderPanel"]["Insert"])), InsertButton_Click); insertButton.Visible = false; @@ -49,9 +49,9 @@ namespace DualScreenDemo albumButton = new Button(); albumButton.Text = ""; ConfigureButton(albumButton, xPosition + 142, yPosition + 35, 140, 50, - 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["SongOrderPanel"]["Discography"])), + new Bitmap(Path.Combine(serverPath, data["SongOrderPanel"]["Discography"])), + new Bitmap(Path.Combine(serverPath, data["SongOrderPanel"]["Discography"])), AlbumButton_Click); albumButton.Visible = false; @@ -60,9 +60,9 @@ namespace DualScreenDemo favoriteButton = new Button(); favoriteButton.Text = ""; ConfigureButton(favoriteButton, xPosition + 302, yPosition + 35, 140, 50, - 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["SongOrderPanel"]["Favorites"])), + new Bitmap(Path.Combine(serverPath, data["SongOrderPanel"]["Favorites"])), + new Bitmap(Path.Combine(serverPath, data["SongOrderPanel"]["Favorites"])), FavoriteButton_Click); @@ -87,9 +87,9 @@ namespace DualScreenDemo vodScreenCloseButton = new Button(); vodScreenCloseButton.Text = ""; ConfigureButton(vodScreenCloseButton, xPosition + 462, yPosition + 35, 110, 50, - 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["SongOrderPanel"]["Exit"])), + new Bitmap(Path.Combine(serverPath, data["SongOrderPanel"]["Exit"])), + new Bitmap(Path.Combine(serverPath, data["SongOrderPanel"]["Exit"])), VodScreenCloseButton_Click);