2508130948
This commit is contained in:
parent
685afb1642
commit
b88b39c1c8
@ -19,7 +19,7 @@ namespace DualScreenDemo
|
|||||||
int baseY = Screen.PrimaryScreen.Bounds.Height - 120;
|
int baseY = Screen.PrimaryScreen.Bounds.Height - 120;
|
||||||
int buttonSpacing = 90;
|
int buttonSpacing = 90;
|
||||||
|
|
||||||
var data = LoadConfigData();
|
var data = LoadBtnConfigData();
|
||||||
|
|
||||||
// 共用的按鈕設置
|
// 共用的按鈕設置
|
||||||
void ConfigurePromotionButton(Button button, string imagePath, Point location)
|
void ConfigurePromotionButton(Button button, string imagePath, Point location)
|
||||||
@ -55,15 +55,15 @@ namespace DualScreenDemo
|
|||||||
|
|
||||||
// 配置各個按鈕
|
// 配置各個按鈕
|
||||||
previousPromotionButton = new Button { Name = "previousPromotionButton", Visible = true };
|
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;
|
previousPromotionButton.Click += PreviousPromotionButton_Click;
|
||||||
|
|
||||||
closePromotionsButton = new Button { Name = "closePromotionsButton", Visible = false };
|
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;
|
closePromotionsButton.Click += ClosePromotionsButton_Click;
|
||||||
|
|
||||||
nextPromotionButton = new Button { Name = "nextPromotionButton", Visible = true };
|
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;
|
nextPromotionButton.Click += NextPromotionButton_Click;
|
||||||
|
|
||||||
this.Controls.Add(previousPromotionButton);
|
this.Controls.Add(previousPromotionButton);
|
||||||
@ -80,20 +80,8 @@ namespace DualScreenDemo
|
|||||||
|
|
||||||
private void promotionsButton_Click(object sender, EventArgs e)
|
private void promotionsButton_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
var data = LoadConfigData();
|
|
||||||
|
|
||||||
promotionsAndMenuPanel.currentPageIndex=0;
|
UpdateButtonBackgrounds(promotionsButton,promotionsActiveBackground);
|
||||||
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;
|
|
||||||
isOnOrderedSongsPage = false;
|
isOnOrderedSongsPage = false;
|
||||||
|
|
||||||
|
|
||||||
|
@ -24,16 +24,16 @@ namespace DualScreenDemo
|
|||||||
|
|
||||||
private void InitializeSoundEffectButtons()
|
private void InitializeSoundEffectButtons()
|
||||||
{
|
{
|
||||||
var data = LoadConfigData();
|
var data = LoadBtnConfigData();
|
||||||
|
|
||||||
constructionButton = new Button
|
constructionButton = new Button
|
||||||
{
|
{
|
||||||
Name = "constructionButton",
|
Name = "constructionButton",
|
||||||
};
|
};
|
||||||
ConfigureButton(constructionButton, 876, 494, 148, 64,
|
ConfigureButton(constructionButton, 876, 494, 148, 64,
|
||||||
new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\場景音效_工地.png")),
|
new Bitmap(Path.Combine(serverPath, data["SoundEffect"]["ConstruSite"])),
|
||||||
new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\場景音效_工地.png")),
|
new Bitmap(Path.Combine(serverPath, data["SoundEffect"]["ConstruSite"])),
|
||||||
new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\場景音效_工地.png")),
|
new Bitmap(Path.Combine(serverPath, data["SoundEffect"]["ConstruSite"])),
|
||||||
ConstructionButton_Click);
|
ConstructionButton_Click);
|
||||||
this.Controls.Add(constructionButton);
|
this.Controls.Add(constructionButton);
|
||||||
|
|
||||||
@ -43,9 +43,9 @@ namespace DualScreenDemo
|
|||||||
Name = "marketButton",
|
Name = "marketButton",
|
||||||
};
|
};
|
||||||
ConfigureButton(marketButton, 1037, 495, 148, 63,
|
ConfigureButton(marketButton, 1037, 495, 148, 63,
|
||||||
new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\場景音效_市場.png")),
|
new Bitmap(Path.Combine(serverPath, data["SoundEffect"]["Market"])),
|
||||||
new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\場景音效_市場.png")),
|
new Bitmap(Path.Combine(serverPath, data["SoundEffect"]["Market"])),
|
||||||
new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\場景音效_市場.png")),
|
new Bitmap(Path.Combine(serverPath, data["SoundEffect"]["Market"])),
|
||||||
MarketButton_Click);
|
MarketButton_Click);
|
||||||
this.Controls.Add(marketButton);
|
this.Controls.Add(marketButton);
|
||||||
|
|
||||||
@ -55,9 +55,9 @@ namespace DualScreenDemo
|
|||||||
Name = "drivingButton",
|
Name = "drivingButton",
|
||||||
};
|
};
|
||||||
ConfigureButton(drivingButton, 876, 570, 148, 63,
|
ConfigureButton(drivingButton, 876, 570, 148, 63,
|
||||||
new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\場景音效_開車.png")),
|
new Bitmap(Path.Combine(serverPath, data["SoundEffect"]["Drive"])),
|
||||||
new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\場景音效_開車.png")),
|
new Bitmap(Path.Combine(serverPath, data["SoundEffect"]["Drive"])),
|
||||||
new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\場景音效_開車.png")),
|
new Bitmap(Path.Combine(serverPath, data["SoundEffect"]["Drive"])),
|
||||||
DrivingButton_Click);
|
DrivingButton_Click);
|
||||||
this.Controls.Add(drivingButton);
|
this.Controls.Add(drivingButton);
|
||||||
|
|
||||||
@ -67,9 +67,9 @@ namespace DualScreenDemo
|
|||||||
Name = "airportButton",
|
Name = "airportButton",
|
||||||
};
|
};
|
||||||
ConfigureButton(airportButton, 1037, 570, 148, 63,
|
ConfigureButton(airportButton, 1037, 570, 148, 63,
|
||||||
new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\場景音效_機場.png")),
|
new Bitmap(Path.Combine(serverPath, data["SoundEffect"]["Airport"])),
|
||||||
new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\場景音效_機場.png")),
|
new Bitmap(Path.Combine(serverPath, data["SoundEffect"]["Airport"])),
|
||||||
new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\場景音效_機場.png")),
|
new Bitmap(Path.Combine(serverPath, data["SoundEffect"]["Airport"])),
|
||||||
AirportButton_Click);
|
AirportButton_Click);
|
||||||
this.Controls.Add(airportButton);
|
this.Controls.Add(airportButton);
|
||||||
|
|
||||||
@ -79,9 +79,9 @@ namespace DualScreenDemo
|
|||||||
Name = "officeButton",
|
Name = "officeButton",
|
||||||
};
|
};
|
||||||
ConfigureButton(officeButton, 876, 646, 148, 64,
|
ConfigureButton(officeButton, 876, 646, 148, 64,
|
||||||
new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\場景音效_辦公室.png")),
|
new Bitmap(Path.Combine(serverPath, data["SoundEffect"]["Office"])),
|
||||||
new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\場景音效_辦公室.png")),
|
new Bitmap(Path.Combine(serverPath, data["SoundEffect"]["Office"])),
|
||||||
new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\場景音效_辦公室.png")),
|
new Bitmap(Path.Combine(serverPath, data["SoundEffect"]["Office"])),
|
||||||
OfficeButton_Click);
|
OfficeButton_Click);
|
||||||
this.Controls.Add(officeButton);
|
this.Controls.Add(officeButton);
|
||||||
|
|
||||||
@ -92,16 +92,16 @@ namespace DualScreenDemo
|
|||||||
};
|
};
|
||||||
|
|
||||||
ConfigureButton(closeButton, 1036, 646, 150, 63,
|
ConfigureButton(closeButton, 1036, 646, 150, 63,
|
||||||
new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\場景音效_關閉.png")),
|
new Bitmap(Path.Combine(serverPath, data["SoundEffect"]["Close"])),
|
||||||
new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\場景音效_關閉.png")),
|
new Bitmap(Path.Combine(serverPath, data["SoundEffect"]["Close"])),
|
||||||
new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\場景音效_關閉.png")),
|
new Bitmap(Path.Combine(serverPath, data["SoundEffect"]["Close"])),
|
||||||
CloseButton_Click);
|
CloseButton_Click);
|
||||||
this.Controls.Add(closeButton);
|
this.Controls.Add(closeButton);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SoundEffectButton_Click(object sender, EventArgs e)
|
private void SoundEffectButton_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
var data = LoadConfigData();
|
var data = LoadBtnConfigData();
|
||||||
|
|
||||||
SetHotSongButtonsVisibility(false);
|
SetHotSongButtonsVisibility(false);
|
||||||
SetNewSongButtonsVisibility(false);
|
SetNewSongButtonsVisibility(false);
|
||||||
@ -110,7 +110,7 @@ namespace DualScreenDemo
|
|||||||
|
|
||||||
if (!pictureBoxSceneSoundEffects.Visible)
|
if (!pictureBoxSceneSoundEffects.Visible)
|
||||||
{
|
{
|
||||||
ShowImageOnPictureBoxSceneSoundEffects(Path.Combine(serverPath, @"themes\superstar\button\3.介面\場景音效_空白介面.png"));
|
ShowImageOnPictureBoxSceneSoundEffects(Path.Combine(serverPath, data["SoundEffect"]["SoundEffectBaseUI"]));
|
||||||
SetPictureBoxSceneSoundEffectsAndButtonsVisibility(true);
|
SetPictureBoxSceneSoundEffectsAndButtonsVisibility(true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -30,13 +30,13 @@ namespace DualScreenDemo
|
|||||||
|
|
||||||
private void InitializeButtonsForPictureBoxToggleLight()
|
private void InitializeButtonsForPictureBoxToggleLight()
|
||||||
{
|
{
|
||||||
var data=LoadConfigData();
|
var data=LoadBtnConfigData();
|
||||||
|
|
||||||
btnTurnOn = new Button { Text = "" };
|
btnTurnOn = new Button { Text = "" };
|
||||||
ConfigureButton(btnTurnOn, 29, 45, 250, 67,
|
ConfigureButton(btnTurnOn, 29, 45, 250, 67,
|
||||||
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, "themes\\superstar\\button\\3.介面\\燈光控制_ON-OFF.png")),
|
new Bitmap(Path.Combine(serverPath, data["LightControl"]["OnOff"])),
|
||||||
new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_ON-OFF.png")),
|
new Bitmap(Path.Combine(serverPath, data["LightControl"]["OnOff"])),
|
||||||
null);
|
null);
|
||||||
|
|
||||||
|
|
||||||
@ -72,9 +72,9 @@ namespace DualScreenDemo
|
|||||||
|
|
||||||
btnBright = new Button{ Text = "" };
|
btnBright = new Button{ Text = "" };
|
||||||
ConfigureButton(btnBright, 295, 45, 118, 65,
|
ConfigureButton(btnBright, 295, 45, 118, 65,
|
||||||
new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_明亮.png")),
|
new Bitmap(Path.Combine(serverPath, data["LightControl"]["Brightness"])),
|
||||||
new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_明亮.png")),
|
new Bitmap(Path.Combine(serverPath, data["LightControl"]["Brightness"])),
|
||||||
new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_明亮.png")),
|
new Bitmap(Path.Combine(serverPath, data["LightControl"]["Brightness"])),
|
||||||
null);
|
null);
|
||||||
btnBright.Click += (sender, e) =>
|
btnBright.Click += (sender, e) =>
|
||||||
{
|
{
|
||||||
|
@ -28,9 +28,9 @@ namespace DualScreenDemo
|
|||||||
vodButton = new Button();
|
vodButton = new Button();
|
||||||
vodButton.Text = "";
|
vodButton.Text = "";
|
||||||
ConfigureButton(vodButton, xPosition - 119, yPosition + 35, 110, 50,
|
ConfigureButton(vodButton, xPosition - 119, yPosition + 35, 110, 50,
|
||||||
new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\歌曲點播_點播.png")),
|
new Bitmap(Path.Combine(serverPath, data["SongOrderPanel"]["Request"])),
|
||||||
new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\歌曲點播_點播.png")),
|
new Bitmap(Path.Combine(serverPath, data["SongOrderPanel"]["Request"])),
|
||||||
new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\歌曲點播_點播.png")),
|
new Bitmap(Path.Combine(serverPath, data["SongOrderPanel"]["Request"])),
|
||||||
VodButton_Click);
|
VodButton_Click);
|
||||||
|
|
||||||
vodButton.Visible = false;
|
vodButton.Visible = false;
|
||||||
@ -38,9 +38,9 @@ namespace DualScreenDemo
|
|||||||
insertButton = new Button();
|
insertButton = new Button();
|
||||||
insertButton.Text = "";
|
insertButton.Text = "";
|
||||||
ConfigureButton(insertButton, xPosition + 12, yPosition + 35, 110, 50,
|
ConfigureButton(insertButton, xPosition + 12, yPosition + 35, 110, 50,
|
||||||
new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\歌曲點播_插播.png")),
|
new Bitmap(Path.Combine(serverPath, data["SongOrderPanel"]["Insert"])),
|
||||||
new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\歌曲點播_插播.png")),
|
new Bitmap(Path.Combine(serverPath, data["SongOrderPanel"]["Insert"])),
|
||||||
new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\歌曲點播_插播.png")),
|
new Bitmap(Path.Combine(serverPath, data["SongOrderPanel"]["Insert"])),
|
||||||
InsertButton_Click);
|
InsertButton_Click);
|
||||||
|
|
||||||
insertButton.Visible = false;
|
insertButton.Visible = false;
|
||||||
@ -49,9 +49,9 @@ namespace DualScreenDemo
|
|||||||
albumButton = new Button();
|
albumButton = new Button();
|
||||||
albumButton.Text = "";
|
albumButton.Text = "";
|
||||||
ConfigureButton(albumButton, xPosition + 142, yPosition + 35, 140, 50,
|
ConfigureButton(albumButton, xPosition + 142, yPosition + 35, 140, 50,
|
||||||
new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\歌曲點播_歷年專輯.png")),
|
new Bitmap(Path.Combine(serverPath, data["SongOrderPanel"]["Discography"])),
|
||||||
new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\歌曲點播_歷年專輯.png")),
|
new Bitmap(Path.Combine(serverPath, data["SongOrderPanel"]["Discography"])),
|
||||||
new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\歌曲點播_歷年專輯.png")),
|
new Bitmap(Path.Combine(serverPath, data["SongOrderPanel"]["Discography"])),
|
||||||
AlbumButton_Click);
|
AlbumButton_Click);
|
||||||
|
|
||||||
albumButton.Visible = false;
|
albumButton.Visible = false;
|
||||||
@ -60,9 +60,9 @@ namespace DualScreenDemo
|
|||||||
favoriteButton = new Button();
|
favoriteButton = new Button();
|
||||||
favoriteButton.Text = "";
|
favoriteButton.Text = "";
|
||||||
ConfigureButton(favoriteButton, xPosition + 302, yPosition + 35, 140, 50,
|
ConfigureButton(favoriteButton, xPosition + 302, yPosition + 35, 140, 50,
|
||||||
new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\歌曲點播_我的最愛.png")),
|
new Bitmap(Path.Combine(serverPath, data["SongOrderPanel"]["Favorites"])),
|
||||||
new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\歌曲點播_我的最愛.png")),
|
new Bitmap(Path.Combine(serverPath, data["SongOrderPanel"]["Favorites"])),
|
||||||
new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\歌曲點播_我的最愛.png")),
|
new Bitmap(Path.Combine(serverPath, data["SongOrderPanel"]["Favorites"])),
|
||||||
FavoriteButton_Click);
|
FavoriteButton_Click);
|
||||||
|
|
||||||
|
|
||||||
@ -87,9 +87,9 @@ namespace DualScreenDemo
|
|||||||
vodScreenCloseButton = new Button();
|
vodScreenCloseButton = new Button();
|
||||||
vodScreenCloseButton.Text = "";
|
vodScreenCloseButton.Text = "";
|
||||||
ConfigureButton(vodScreenCloseButton, xPosition + 462, yPosition + 35, 110, 50,
|
ConfigureButton(vodScreenCloseButton, xPosition + 462, yPosition + 35, 110, 50,
|
||||||
new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\歌曲點播_關閉.png")),
|
new Bitmap(Path.Combine(serverPath, data["SongOrderPanel"]["Exit"])),
|
||||||
new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\歌曲點播_關閉.png")),
|
new Bitmap(Path.Combine(serverPath, data["SongOrderPanel"]["Exit"])),
|
||||||
new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\歌曲點播_關閉.png")),
|
new Bitmap(Path.Combine(serverPath, data["SongOrderPanel"]["Exit"])),
|
||||||
VodScreenCloseButton_Click);
|
VodScreenCloseButton_Click);
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user