圖檔路徑改至server

This commit is contained in:
allen.yan 2025-08-07 13:09:10 +08:00
parent be74704be2
commit 7b2e5a8196
35 changed files with 444 additions and 412 deletions

View File

@ -30,8 +30,6 @@ namespace DualScreenDemo
private Bitmap vietnameseNormalBackground; private Bitmap vietnameseNormalBackground;
private Bitmap vietnameseActiveBackground; private Bitmap vietnameseActiveBackground;
string serverPath = Utils.Env.GetPath("", "");
private void ResetBtnStatus() private void ResetBtnStatus()
{ {
@ -66,20 +64,20 @@ namespace DualScreenDemo
{ {
loveDuetNormalBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\7.類別查詢_男女情歌(未按).png")); loveDuetNormalBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\7.類別查詢_男女情歌(未按).png"));
talentShowNormalBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\7.類別查詢_選秀節目(未按).png")); talentShowNormalBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\7.類別查詢_選秀節目(未按).png"));
medleyDanceNormalBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\7.類別查詢_串燒舞曲(未按).png")); medleyDanceNormalBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\7.類別查詢_串燒舞曲(未按).png"));
ninetiesNormalBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\7.類別查詢_90年代(未按).png")); ninetiesNormalBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\7.類別查詢_90年代(未按).png"));
nostalgicSongsNormalBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\7.類別查詢_懷舊老歌(未按).png")); nostalgicSongsNormalBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\7.類別查詢_懷舊老歌(未按).png"));
chinaNormalBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\7.類別查詢_中國大陸(未按).png")); chinaNormalBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\7.類別查詢_中國大陸(未按).png"));
vietnameseNormalBackground= new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\7.類別查詢_越南歌曲(未按).png")); vietnameseNormalBackground= new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\7.類別查詢_越南歌曲(未按).png"));
loveDuetActiveBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\7.類別查詢_男女情歌(已按).png")); loveDuetActiveBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\7.類別查詢_男女情歌(已按).png"));
talentShowActiveBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\7.類別查詢_選秀節目(已按).png")); talentShowActiveBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\7.類別查詢_選秀節目(已按).png"));
medleyDanceActiveBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\7.類別查詢_串燒舞曲(已按).png")); medleyDanceActiveBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\7.類別查詢_串燒舞曲(已按).png"));
ninetiesActiveBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\7.類別查詢_90年代(已按).png")); ninetiesActiveBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\7.類別查詢_90年代(已按).png"));
nostalgicSongsActiveBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\7.類別查詢_懷舊老歌(已按).png")); nostalgicSongsActiveBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\7.類別查詢_懷舊老歌(已按).png"));
chinaActiveBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\7.類別查詢_中國大陸(已按).png")); chinaActiveBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\7.類別查詢_中國大陸(已按).png"));
vietnameseActiveBackground= new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\7.類別查詢_越南歌曲(已按).png")); vietnameseActiveBackground= new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\7.類別查詢_越南歌曲(已按).png"));
loveDuetButton = new Button { Text = "", Visible = false }; loveDuetButton = new Button { Text = "", Visible = false };
ConfigureButton(loveDuetButton, 1197, 225, 225, 50, ConfigureButton(loveDuetButton, 1197, 225, 225, 50,
@ -161,7 +159,7 @@ namespace DualScreenDemo
songSearchButton.BackgroundImage = songSearchNormalBackground; songSearchButton.BackgroundImage = songSearchNormalBackground;
languageSearchButton.BackgroundImage = languageSearchNormalBackground; languageSearchButton.BackgroundImage = languageSearchNormalBackground;
groupSearchButton.BackgroundImage = groupSearchNormalBackground; groupSearchButton.BackgroundImage = groupSearchNormalBackground;
categorySearchButton.BackgroundImage = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別上方_類別查詢(已按).png")); categorySearchButton.BackgroundImage = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別上方_類別查詢(已按).png"));
orderedSongsButton.BackgroundImage = orderedSongsNormalBackground; orderedSongsButton.BackgroundImage = orderedSongsNormalBackground;
myFavoritesButton.BackgroundImage = myFavoritesNormalBackground; myFavoritesButton.BackgroundImage = myFavoritesNormalBackground;
promotionsButton.BackgroundImage = promotionsNormalBackground; promotionsButton.BackgroundImage = promotionsNormalBackground;

View File

@ -33,8 +33,8 @@ namespace DualScreenDemo
groupGuoYuButton = new Button { Text = "", Visible = false }; groupGuoYuButton = new Button { Text = "", Visible = false };
ResizeAndPositionButton(groupGuoYuButton, 1197, 225, 225, 50); ResizeAndPositionButton(groupGuoYuButton, 1197, 225, 225, 50);
Rectangle groupGuoYuButtonCropArea = new Rectangle(1197, 225, 225, 50); Rectangle groupGuoYuButtonCropArea = new Rectangle(1197, 225, 225, 50);
groupGuoYuNormalBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\6.團體查詢_國語(未按).png")); groupGuoYuNormalBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\6.團體查詢_國語(未按).png"));
groupGuoYuActiveBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\6.團體查詢_國語(已按).png")); groupGuoYuActiveBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\6.團體查詢_國語(已按).png"));
groupGuoYuButton.BackgroundImage = groupGuoYuNormalBackground; groupGuoYuButton.BackgroundImage = groupGuoYuNormalBackground;
groupGuoYuButton.BackgroundImageLayout = ImageLayout.Stretch; groupGuoYuButton.BackgroundImageLayout = ImageLayout.Stretch;
groupGuoYuButton.FlatStyle = FlatStyle.Flat; groupGuoYuButton.FlatStyle = FlatStyle.Flat;
@ -46,8 +46,8 @@ namespace DualScreenDemo
groupTaiYuButton = new Button { Text = "", Visible = false }; groupTaiYuButton = new Button { Text = "", Visible = false };
ResizeAndPositionButton(groupTaiYuButton, 1197, 280, 225, 50); ResizeAndPositionButton(groupTaiYuButton, 1197, 280, 225, 50);
Rectangle groupTaiYuButtonCropArea = new Rectangle(1197, 280, 225, 50); Rectangle groupTaiYuButtonCropArea = new Rectangle(1197, 280, 225, 50);
groupTaiYuNormalBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\6.團體查詢_台語(未按).png")); groupTaiYuNormalBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\6.團體查詢_台語(未按).png"));
groupTaiYuActiveBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\6.團體查詢_台語(已按).png")); groupTaiYuActiveBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\6.團體查詢_台語(已按).png"));
groupTaiYuButton.BackgroundImage = groupTaiYuNormalBackground; groupTaiYuButton.BackgroundImage = groupTaiYuNormalBackground;
groupTaiYuButton.BackgroundImageLayout = ImageLayout.Stretch; groupTaiYuButton.BackgroundImageLayout = ImageLayout.Stretch;
groupTaiYuButton.FlatStyle = FlatStyle.Flat; groupTaiYuButton.FlatStyle = FlatStyle.Flat;
@ -59,8 +59,8 @@ namespace DualScreenDemo
groupYueYuButton = new Button { Text = "", Visible = false }; groupYueYuButton = new Button { Text = "", Visible = false };
ResizeAndPositionButton(groupYueYuButton, 1197, 335, 225, 50); ResizeAndPositionButton(groupYueYuButton, 1197, 335, 225, 50);
Rectangle groupYueYuButtonCropArea = new Rectangle(1197, 335, 225, 50); Rectangle groupYueYuButtonCropArea = new Rectangle(1197, 335, 225, 50);
groupYueYuNormalBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\6.團體查詢_粵語(未按).png")); groupYueYuNormalBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\6.團體查詢_粵語(未按).png"));
groupYueYuActiveBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\6.團體查詢_粵語(已按).png")); groupYueYuActiveBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\6.團體查詢_粵語(已按).png"));
groupYueYuButton.BackgroundImage = groupYueYuNormalBackground; groupYueYuButton.BackgroundImage = groupYueYuNormalBackground;
groupYueYuButton.BackgroundImageLayout = ImageLayout.Stretch; groupYueYuButton.BackgroundImageLayout = ImageLayout.Stretch;
groupYueYuButton.FlatStyle = FlatStyle.Flat; groupYueYuButton.FlatStyle = FlatStyle.Flat;
@ -72,8 +72,8 @@ namespace DualScreenDemo
groupYingWenButton = new Button { Text = "", Visible = false }; groupYingWenButton = new Button { Text = "", Visible = false };
ResizeAndPositionButton(groupYingWenButton, 1197, 390, 225, 50); ResizeAndPositionButton(groupYingWenButton, 1197, 390, 225, 50);
Rectangle groupYingWenButtonCropArea = new Rectangle(1197, 390, 225, 50); Rectangle groupYingWenButtonCropArea = new Rectangle(1197, 390, 225, 50);
groupYingWenNormalBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\6.團體查詢_英語(未按).png")); groupYingWenNormalBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\6.團體查詢_英語(未按).png"));
groupYingWenActiveBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\6.團體查詢_英語(已按).png")); groupYingWenActiveBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\6.團體查詢_英語(已按).png"));
groupYingWenButton.BackgroundImage = groupYingWenNormalBackground; groupYingWenButton.BackgroundImage = groupYingWenNormalBackground;
groupYingWenButton.BackgroundImageLayout = ImageLayout.Stretch; groupYingWenButton.BackgroundImageLayout = ImageLayout.Stretch;
groupYingWenButton.FlatStyle = FlatStyle.Flat; groupYingWenButton.FlatStyle = FlatStyle.Flat;
@ -85,8 +85,8 @@ namespace DualScreenDemo
groupRiYuButton = new Button { Text = "", Visible = false }; groupRiYuButton = new Button { Text = "", Visible = false };
ResizeAndPositionButton(groupRiYuButton, 1197, 445, 225, 50); ResizeAndPositionButton(groupRiYuButton, 1197, 445, 225, 50);
Rectangle groupRiYuButtonCropArea = new Rectangle(1197, 445, 225, 50); Rectangle groupRiYuButtonCropArea = new Rectangle(1197, 445, 225, 50);
groupRiYuNormalBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\6.團體查詢_日語(未按).png")); groupRiYuNormalBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\6.團體查詢_日語(未按).png"));
groupRiYuActiveBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\6.團體查詢_日語(已按).png")); groupRiYuActiveBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\6.團體查詢_日語(已按).png"));
groupRiYuButton.BackgroundImage = groupRiYuNormalBackground; groupRiYuButton.BackgroundImage = groupRiYuNormalBackground;
groupRiYuButton.BackgroundImageLayout = ImageLayout.Stretch; groupRiYuButton.BackgroundImageLayout = ImageLayout.Stretch;
groupRiYuButton.FlatStyle = FlatStyle.Flat; groupRiYuButton.FlatStyle = FlatStyle.Flat;
@ -98,8 +98,8 @@ namespace DualScreenDemo
groupHanYuButton = new Button { Text = "", Visible = false }; groupHanYuButton = new Button { Text = "", Visible = false };
ResizeAndPositionButton(groupHanYuButton, 1197, 500, 225, 50); ResizeAndPositionButton(groupHanYuButton, 1197, 500, 225, 50);
Rectangle groupHanYuButtonCropArea = new Rectangle(1197, 500, 225, 50); Rectangle groupHanYuButtonCropArea = new Rectangle(1197, 500, 225, 50);
groupHanYuNormalBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\6.團體查詢_韓語(未按).png")); groupHanYuNormalBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\6.團體查詢_韓語(未按).png"));
groupHanYuActiveBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\6.團體查詢_韓語(已按).png")); groupHanYuActiveBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\6.團體查詢_韓語(已按).png"));
groupHanYuButton.BackgroundImage = groupHanYuNormalBackground; groupHanYuButton.BackgroundImage = groupHanYuNormalBackground;
groupHanYuButton.BackgroundImageLayout = ImageLayout.Stretch; groupHanYuButton.BackgroundImageLayout = ImageLayout.Stretch;
groupHanYuButton.FlatStyle = FlatStyle.Flat; groupHanYuButton.FlatStyle = FlatStyle.Flat;
@ -115,7 +115,7 @@ namespace DualScreenDemo
singerSearchButton.BackgroundImage = singerSearchNormalBackground; singerSearchButton.BackgroundImage = singerSearchNormalBackground;
songSearchButton.BackgroundImage = songSearchNormalBackground; songSearchButton.BackgroundImage = songSearchNormalBackground;
languageSearchButton.BackgroundImage = languageSearchNormalBackground; languageSearchButton.BackgroundImage = languageSearchNormalBackground;
groupSearchButton.BackgroundImage = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別上方_合唱查詢(已按).png")); groupSearchButton.BackgroundImage = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別上方_合唱查詢(已按).png"));
categorySearchButton.BackgroundImage = categorySearchNormalBackground; categorySearchButton.BackgroundImage = categorySearchNormalBackground;
orderedSongsButton.BackgroundImage = orderedSongsNormalBackground; orderedSongsButton.BackgroundImage = orderedSongsNormalBackground;
myFavoritesButton.BackgroundImage = myFavoritesNormalBackground; myFavoritesButton.BackgroundImage = myFavoritesNormalBackground;

View File

@ -57,7 +57,7 @@ namespace DualScreenDemo
public void HotPlayButton_Click(object sender, EventArgs e) public void HotPlayButton_Click(object sender, EventArgs e)
{ {
UpdateButtonBackgrounds(hotPlayButton, new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別上方_熱門排行(已按).png"))); UpdateButtonBackgrounds(hotPlayButton, new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別上方_熱門排行(已按).png")));
UpdateHotSongButtons(guoYuButtonHotSong, guoYuHotSongActiveBackground); UpdateHotSongButtons(guoYuButtonHotSong, guoYuHotSongActiveBackground);
isOnOrderedSongsPage = false; isOnOrderedSongsPage = false;
/* 清空搜尋欄 */ /* 清空搜尋欄 */
@ -148,24 +148,24 @@ namespace DualScreenDemo
{ {
InitializeHotSongButton(ref guoYuNewSongButtonHotSong, "國語新歌", 1197, 225, 225, 50, InitializeHotSongButton(ref guoYuNewSongButtonHotSong, "國語新歌", 1197, 225, 225, 50,
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\2.熱門排行_國語新歌排行(未按).png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\2.熱門排行_國語新歌排行(未按).png")),
out guoYuNewSongHotSongNormalBackground, out guoYuNewSongHotSongNormalBackground,
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\2.熱門排行_國語新歌排行(已按).png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\2.熱門排行_國語新歌排行(已按).png")),
out guoYuNewSongHotSongActiveBackground, out guoYuNewSongHotSongActiveBackground,
GuoYuNewSongButtonHotSong_Click); GuoYuNewSongButtonHotSong_Click);
InitializeHotSongButton(ref taiYuNewSongButtonHotSong, "台語新歌", 1197, 280, 225, 50, InitializeHotSongButton(ref taiYuNewSongButtonHotSong, "台語新歌", 1197, 280, 225, 50,
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\2.熱門排行_台語新歌排行(未按).png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\2.熱門排行_台語新歌排行(未按).png")),
out taiYuNewSongHotSongNormalBackground, out taiYuNewSongHotSongNormalBackground,
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\2.熱門排行_台語新歌排行(已按).png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\2.熱門排行_台語新歌排行(已按).png")),
out taiYuNewSongHotSongActiveBackground, out taiYuNewSongHotSongActiveBackground,
TaiYuNewSongButtonHotSong_Click); TaiYuNewSongButtonHotSong_Click);
InitializeHotSongButton(ref taiYuButtonHotSong, "台語", 1197, 335, 225, 50, InitializeHotSongButton(ref taiYuButtonHotSong, "台語", 1197, 335, 225, 50,
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\2.熱門排行_台語人氣排行(未按).png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\2.熱門排行_台語人氣排行(未按).png")),
out taiYuHotSongNormalBackground, out taiYuHotSongNormalBackground,
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\2.熱門排行_台語人氣排行(已按).png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\2.熱門排行_台語人氣排行(已按).png")),
out taiYuHotSongActiveBackground, out taiYuHotSongActiveBackground,
TaiYuButtonHotSong_Click); TaiYuButtonHotSong_Click);
@ -178,30 +178,30 @@ namespace DualScreenDemo
// YueYuButtonHotSong_Click); // YueYuButtonHotSong_Click);
InitializeHotSongButton(ref guoYuButtonHotSong, "國語", 1197, 390, 225, 50, InitializeHotSongButton(ref guoYuButtonHotSong, "國語", 1197, 390, 225, 50,
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\2.熱門排行_國語人氣排行(未按).png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\2.熱門排行_國語人氣排行(未按).png")),
out guoYuHotSongNormalBackground, out guoYuHotSongNormalBackground,
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\2.熱門排行_國語人氣排行(已按).png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\2.熱門排行_國語人氣排行(已按).png")),
out guoYuHotSongActiveBackground, out guoYuHotSongActiveBackground,
GuoYuButtonHotSong_Click); GuoYuButtonHotSong_Click);
InitializeHotSongButton(ref yingWenButtonHotSong, "英文", 1197, 445, 225, 50, InitializeHotSongButton(ref yingWenButtonHotSong, "英文", 1197, 445, 225, 50,
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\2.熱門排行_英語人氣排行(未按).png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\2.熱門排行_英語人氣排行(未按).png")),
out yingWenHotSongNormalBackground, out yingWenHotSongNormalBackground,
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\2.熱門排行_英語人氣排行(已按).png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\2.熱門排行_英語人氣排行(已按).png")),
out yingWenHotSongActiveBackground, out yingWenHotSongActiveBackground,
YingWenButtonHotSong_Click); YingWenButtonHotSong_Click);
InitializeHotSongButton(ref riYuButtonHotSong, "日語", 1197, 500, 225, 50, InitializeHotSongButton(ref riYuButtonHotSong, "日語", 1197, 500, 225, 50,
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\2.熱門排行_日語人氣排行(未按).png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\2.熱門排行_日語人氣排行(未按).png")),
out riYuHotSongNormalBackground, out riYuHotSongNormalBackground,
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\2.熱門排行_日語人氣排行(已按).png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\2.熱門排行_日語人氣排行(已按).png")),
out riYuHotSongActiveBackground, out riYuHotSongActiveBackground,
RiYuButtonHotSong_Click); RiYuButtonHotSong_Click);
InitializeHotSongButton(ref hanYuButtonHotSong, "韓語", 1197, 555, 225, 50, InitializeHotSongButton(ref hanYuButtonHotSong, "韓語", 1197, 555, 225, 50,
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\2.熱門排行_韓語人氣排行(未按).png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\2.熱門排行_韓語人氣排行(未按).png")),
out hanYuHotSongNormalBackground, out hanYuHotSongNormalBackground,
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\2.熱門排行_韓語人氣排行(已按).png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\2.熱門排行_韓語人氣排行(已按).png")),
out hanYuHotSongActiveBackground, out hanYuHotSongActiveBackground,
HanYuButtonHotSong_Click); HanYuButtonHotSong_Click);

View File

@ -7,7 +7,7 @@ namespace DualScreenDemo
private void InitializeGuoYuButton() private void InitializeGuoYuButton()
{ {
Rectangle guoYuButtonCropArea = new Rectangle(1197, 225, 225, 20); Rectangle guoYuButtonCropArea = new Rectangle(1197, 225, 225, 20);
InitializeButton(ref guoYuButton, "國語", 1197, 225, 225, 50, guoYuButtonCropArea, new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\5.語別查詢_國語(未按).png")), out guoYuNormalBackground, new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\5.語別查詢_國語(已按).png")), out guoYuActiveBackground, GuoYuButton_Click); InitializeButton(ref guoYuButton, "國語", 1197, 225, 225, 50, guoYuButtonCropArea, new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\5.語別查詢_國語(未按).png")), out guoYuNormalBackground, new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\5.語別查詢_國語(已按).png")), out guoYuActiveBackground, GuoYuButton_Click);
} }
private void GuoYuButton_Click(object sender, EventArgs e) private void GuoYuButton_Click(object sender, EventArgs e)

View File

@ -7,7 +7,7 @@ namespace DualScreenDemo
private void InitializeHanYuButton() private void InitializeHanYuButton()
{ {
Rectangle hanYuButtonCropArea = new Rectangle(1197, 500, 225, 50); Rectangle hanYuButtonCropArea = new Rectangle(1197, 500, 225, 50);
InitializeButton(ref hanYuButton, "韓語", 1197, 500, 225, 50, hanYuButtonCropArea, new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\5.語別查詢_韓語(未按).png")), out hanYuNormalBackground, new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\5.語別查詢_韓語(已按).png")), out hanYuActiveBackground, HanYuButton_Click); InitializeButton(ref hanYuButton, "韓語", 1197, 500, 225, 50, hanYuButtonCropArea, new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\5.語別查詢_韓語(未按).png")), out hanYuNormalBackground, new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\5.語別查詢_韓語(已按).png")), out hanYuActiveBackground, HanYuButton_Click);
} }
private void HanYuButton_Click(object sender, EventArgs e) private void HanYuButton_Click(object sender, EventArgs e)

View File

@ -7,7 +7,7 @@ namespace DualScreenDemo
private void InitializeKeYuButton() private void InitializeKeYuButton()
{ {
Rectangle keYuButtonCropArea = new Rectangle(1197, 555, 225, 50); Rectangle keYuButtonCropArea = new Rectangle(1197, 555, 225, 50);
InitializeButton(ref keYuButton, "客語", 1197, 555, 225, 50, keYuButtonCropArea, new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\5.語別查詢_客語(未按).png")), out keYuNormalBackground, new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\5.語別查詢_客語(已按).png")), out keYuActiveBackground, KeYuButton_Click); InitializeButton(ref keYuButton, "客語", 1197, 555, 225, 50, keYuButtonCropArea, new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\5.語別查詢_客語(未按).png")), out keYuNormalBackground, new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\5.語別查詢_客語(已按).png")), out keYuActiveBackground, KeYuButton_Click);
} }
private void KeYuButton_Click(object sender, EventArgs e) private void KeYuButton_Click(object sender, EventArgs e)

View File

@ -7,7 +7,7 @@ namespace DualScreenDemo
private void InitializeRiYuButton() private void InitializeRiYuButton()
{ {
Rectangle riYuButtonCropArea = new Rectangle(1197, 445, 225, 50); Rectangle riYuButtonCropArea = new Rectangle(1197, 445, 225, 50);
InitializeButton(ref riYuButton, "日語", 1197, 445, 225, 50, riYuButtonCropArea, new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\5.語別查詢_日語(未按).png")), out riYuNormalBackground, new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\5.語別查詢_日語(已按).png")), out riYuActiveBackground, RiYuButton_Click); InitializeButton(ref riYuButton, "日語", 1197, 445, 225, 50, riYuButtonCropArea, new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\5.語別查詢_日語(未按).png")), out riYuNormalBackground, new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\5.語別查詢_日語(已按).png")), out riYuActiveBackground, RiYuButton_Click);
} }
private void RiYuButton_Click(object sender, EventArgs e) private void RiYuButton_Click(object sender, EventArgs e)

View File

@ -7,7 +7,7 @@ namespace DualScreenDemo
private void InitializeTaiYuButton() private void InitializeTaiYuButton()
{ {
Rectangle taiYuButtonCropArea = new Rectangle(1197, 280, 225, 50); Rectangle taiYuButtonCropArea = new Rectangle(1197, 280, 225, 50);
InitializeButton(ref taiYuButton, "台語", 1197, 280, 225, 50, taiYuButtonCropArea, new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\5.語別查詢_台語(未按).png")), out taiYuNormalBackground, new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\5.語別查詢_台語(已按).png")), out taiYuActiveBackground, TaiYuButton_Click); InitializeButton(ref taiYuButton, "台語", 1197, 280, 225, 50, taiYuButtonCropArea, new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\5.語別查詢_台語(未按).png")), out taiYuNormalBackground, new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\5.語別查詢_台語(已按).png")), out taiYuActiveBackground, TaiYuButton_Click);
} }
private void TaiYuButton_Click(object sender, EventArgs e) private void TaiYuButton_Click(object sender, EventArgs e)

View File

@ -7,7 +7,7 @@ namespace DualScreenDemo
private void InitializeYingWenButton() private void InitializeYingWenButton()
{ {
Rectangle yingWenButtonCropArea = new Rectangle(1197, 390, 225, 50); Rectangle yingWenButtonCropArea = new Rectangle(1197, 390, 225, 50);
InitializeButton(ref yingWenButton, "英文", 1197, 390, 225, 50, yingWenButtonCropArea, new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\5.語別查詢_英語(未按).png")), out yingWenNormalBackground, new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\5.語別查詢_英語(已按).png")), out yingWenActiveBackground, YingWenButton_Click); InitializeButton(ref yingWenButton, "英文", 1197, 390, 225, 50, yingWenButtonCropArea, new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\5.語別查詢_英語(未按).png")), out yingWenNormalBackground, new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\5.語別查詢_英語(已按).png")), out yingWenActiveBackground, YingWenButton_Click);
} }
private void YingWenButton_Click(object sender, EventArgs e) private void YingWenButton_Click(object sender, EventArgs e)

View File

@ -7,7 +7,7 @@ namespace DualScreenDemo
private void InitializeYueYuButton() private void InitializeYueYuButton()
{ {
Rectangle yueYuButtonCropArea = new Rectangle(1197, 335, 225, 50); Rectangle yueYuButtonCropArea = new Rectangle(1197, 335, 225, 50);
InitializeButton(ref yueYuButton, "粵語", 1197, 335, 225, 50, yueYuButtonCropArea, new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\5.語別查詢_粵語(未按).png")), out yueYuNormalBackground, new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\5.語別查詢_粵語(已按).png")), out yueYuActiveBackground, YueYuButton_Click); InitializeButton(ref yueYuButton, "粵語", 1197, 335, 225, 50, yueYuButtonCropArea, new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\5.語別查詢_粵語(未按).png")), out yueYuNormalBackground, new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\5.語別查詢_粵語(已按).png")), out yueYuActiveBackground, YueYuButton_Click);
} }
private void YueYuButton_Click(object sender, EventArgs e) private void YueYuButton_Click(object sender, EventArgs e)

View File

@ -58,7 +58,7 @@ namespace DualScreenDemo
hotPlayButton.BackgroundImage = hotPlayNormalBackground; hotPlayButton.BackgroundImage = hotPlayNormalBackground;
singerSearchButton.BackgroundImage = singerSearchNormalBackground; singerSearchButton.BackgroundImage = singerSearchNormalBackground;
songSearchButton.BackgroundImage = songSearchNormalBackground; songSearchButton.BackgroundImage = songSearchNormalBackground;
languageSearchButton.BackgroundImage = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別上方_語別查詢(已按).png")); languageSearchButton.BackgroundImage = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別上方_語別查詢(已按).png"));
groupSearchButton.BackgroundImage = groupSearchNormalBackground; groupSearchButton.BackgroundImage = groupSearchNormalBackground;
categorySearchButton.BackgroundImage = categorySearchNormalBackground; categorySearchButton.BackgroundImage = categorySearchNormalBackground;
orderedSongsButton.BackgroundImage = orderedSongsNormalBackground; orderedSongsButton.BackgroundImage = orderedSongsNormalBackground;

View File

@ -61,7 +61,7 @@ namespace DualScreenDemo
{ {
//newSongAlertButton.BackgroundImage = newSongAlertActiveBackground; //newSongAlertButton.BackgroundImage = newSongAlertActiveBackground;
newSongAlertButton.BackgroundImage= new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別上方_新歌快報(已按).png")); newSongAlertButton.BackgroundImage= new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別上方_新歌快報(已按).png"));
hotPlayButton.BackgroundImage = hotPlayNormalBackground; hotPlayButton.BackgroundImage = hotPlayNormalBackground;
singerSearchButton.BackgroundImage = singerSearchNormalBackground; singerSearchButton.BackgroundImage = singerSearchNormalBackground;
songSearchButton.BackgroundImage = songSearchNormalBackground; songSearchButton.BackgroundImage = songSearchNormalBackground;
@ -123,8 +123,8 @@ namespace DualScreenDemo
ResizeAndPositionButton(guoYuButtonNewSong, 1197, 225, 225, 50); ResizeAndPositionButton(guoYuButtonNewSong, 1197, 225, 225, 50);
Rectangle guoYuNewSongButtonCropArea = new Rectangle(1197, 225, 225, 50); Rectangle guoYuNewSongButtonCropArea = new Rectangle(1197, 225, 225, 50);
guoYuNewSongNormalBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\1.新歌快報_國語(未按).png")); guoYuNewSongNormalBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\1.新歌快報_國語(未按).png"));
guoYuNewSongActiveBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\1.新歌快報_國語(已按).png")); guoYuNewSongActiveBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\1.新歌快報_國語(已按).png"));
guoYuButtonNewSong.BackgroundImage = guoYuNewSongNormalBackground; guoYuButtonNewSong.BackgroundImage = guoYuNewSongNormalBackground;
guoYuButtonNewSong.BackgroundImageLayout = ImageLayout.Stretch; guoYuButtonNewSong.BackgroundImageLayout = ImageLayout.Stretch;
guoYuButtonNewSong.FlatStyle = FlatStyle.Flat; guoYuButtonNewSong.FlatStyle = FlatStyle.Flat;
@ -139,8 +139,8 @@ namespace DualScreenDemo
ResizeAndPositionButton(taiYuButtonNewSong, 1197, 280, 225, 50); ResizeAndPositionButton(taiYuButtonNewSong, 1197, 280, 225, 50);
Rectangle taiYuNewSongButtonCropArea = new Rectangle(1197, 280, 225, 50); Rectangle taiYuNewSongButtonCropArea = new Rectangle(1197, 280, 225, 50);
taiYuNewSongNormalBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\1.新歌快報_台語(未按).png")); taiYuNewSongNormalBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\1.新歌快報_台語(未按).png"));
taiYuNewSongActiveBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\1.新歌快報_台語(已按).png")); taiYuNewSongActiveBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\1.新歌快報_台語(已按).png"));
taiYuButtonNewSong.BackgroundImage = taiYuNewSongNormalBackground; taiYuButtonNewSong.BackgroundImage = taiYuNewSongNormalBackground;
taiYuButtonNewSong.BackgroundImageLayout = ImageLayout.Stretch; taiYuButtonNewSong.BackgroundImageLayout = ImageLayout.Stretch;
taiYuButtonNewSong.FlatStyle = FlatStyle.Flat; taiYuButtonNewSong.FlatStyle = FlatStyle.Flat;
@ -155,8 +155,8 @@ namespace DualScreenDemo
ResizeAndPositionButton(yueYuButtonNewSong, 1197, 335, 225, 50); ResizeAndPositionButton(yueYuButtonNewSong, 1197, 335, 225, 50);
Rectangle yueYuNewSongButtonCropArea = new Rectangle(1197, 335, 225, 50); Rectangle yueYuNewSongButtonCropArea = new Rectangle(1197, 335, 225, 50);
yueYuNewSongNormalBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\1.新歌快報_粵語(未按).png")); yueYuNewSongNormalBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\1.新歌快報_粵語(未按).png"));
yueYuNewSongActiveBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\1.新歌快報_粵語(已按).png")); yueYuNewSongActiveBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\1.新歌快報_粵語(已按).png"));
yueYuButtonNewSong.BackgroundImage = yueYuNewSongNormalBackground; yueYuButtonNewSong.BackgroundImage = yueYuNewSongNormalBackground;
yueYuButtonNewSong.BackgroundImageLayout = ImageLayout.Stretch; yueYuButtonNewSong.BackgroundImageLayout = ImageLayout.Stretch;
yueYuButtonNewSong.FlatStyle = FlatStyle.Flat; yueYuButtonNewSong.FlatStyle = FlatStyle.Flat;
@ -171,8 +171,8 @@ namespace DualScreenDemo
ResizeAndPositionButton(yingWenButtonNewSong, 1197, 390, 225, 50); ResizeAndPositionButton(yingWenButtonNewSong, 1197, 390, 225, 50);
Rectangle yingWenNewSongButtonCropArea = new Rectangle(1197, 390, 225, 50); Rectangle yingWenNewSongButtonCropArea = new Rectangle(1197, 390, 225, 50);
yingWenNewSongNormalBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\1.新歌快報_英語(未按).png")); yingWenNewSongNormalBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\1.新歌快報_英語(未按).png"));
yingWenNewSongActiveBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\1.新歌快報_英語(已按).png")); yingWenNewSongActiveBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\1.新歌快報_英語(已按).png"));
yingWenButtonNewSong.BackgroundImage = yingWenNewSongNormalBackground; yingWenButtonNewSong.BackgroundImage = yingWenNewSongNormalBackground;
yingWenButtonNewSong.BackgroundImageLayout = ImageLayout.Stretch; yingWenButtonNewSong.BackgroundImageLayout = ImageLayout.Stretch;
yingWenButtonNewSong.FlatStyle = FlatStyle.Flat; yingWenButtonNewSong.FlatStyle = FlatStyle.Flat;
@ -187,8 +187,8 @@ namespace DualScreenDemo
ResizeAndPositionButton(riYuButtonNewSong, 1197, 445, 225, 50); ResizeAndPositionButton(riYuButtonNewSong, 1197, 445, 225, 50);
Rectangle riYuNewSongButtonCropArea = new Rectangle(1197, 445, 225, 50); Rectangle riYuNewSongButtonCropArea = new Rectangle(1197, 445, 225, 50);
riYuNewSongNormalBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\1.新歌快報_日語(未按).png")); riYuNewSongNormalBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\1.新歌快報_日語(未按).png"));
riYuNewSongActiveBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\1.新歌快報_日語(已按).png")); riYuNewSongActiveBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\1.新歌快報_日語(已按).png"));
riYuButtonNewSong.BackgroundImage = riYuNewSongNormalBackground; riYuButtonNewSong.BackgroundImage = riYuNewSongNormalBackground;
riYuButtonNewSong.BackgroundImageLayout = ImageLayout.Stretch; riYuButtonNewSong.BackgroundImageLayout = ImageLayout.Stretch;
riYuButtonNewSong.FlatStyle = FlatStyle.Flat; riYuButtonNewSong.FlatStyle = FlatStyle.Flat;
@ -203,8 +203,8 @@ namespace DualScreenDemo
ResizeAndPositionButton(hanYuButtonNewSong, 1197, 500, 225, 50); ResizeAndPositionButton(hanYuButtonNewSong, 1197, 500, 225, 50);
Rectangle hanYuNewSongButtonCropArea = new Rectangle(1197, 500, 490, 50); Rectangle hanYuNewSongButtonCropArea = new Rectangle(1197, 500, 490, 50);
hanYuNewSongNormalBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\1.新歌快報_韓語(未按).png")); hanYuNewSongNormalBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\1.新歌快報_韓語(未按).png"));
hanYuNewSongActiveBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\1.新歌快報_韓語(已按).png")); hanYuNewSongActiveBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\1.新歌快報_韓語(已按).png"));
hanYuButtonNewSong.BackgroundImage = hanYuNewSongNormalBackground; hanYuButtonNewSong.BackgroundImage = hanYuNewSongNormalBackground;
hanYuButtonNewSong.BackgroundImageLayout = ImageLayout.Stretch; hanYuButtonNewSong.BackgroundImageLayout = ImageLayout.Stretch;
hanYuButtonNewSong.FlatStyle = FlatStyle.Flat; hanYuButtonNewSong.FlatStyle = FlatStyle.Flat;

View File

@ -55,7 +55,7 @@ namespace DualScreenDemo
string fileName = (i+1).ToString(); string fileName = (i+1).ToString();
string filePath = Path.Combine(Application.StartupPath, @"themes\superstar\button\3.介面\我的最愛_" + fileName + ".png"); string filePath = Path.Combine(serverPath, @"themes\superstar\button\3.介面\我的最愛_" + fileName + ".png");
favoriteNumberButton[i].BackgroundImage = Image.FromFile(filePath); favoriteNumberButton[i].BackgroundImage = Image.FromFile(filePath);
favoriteNumberButton[i].BackgroundImageLayout = ImageLayout.Stretch; favoriteNumberButton[i].BackgroundImageLayout = ImageLayout.Stretch;
favoriteNumberButton[i].FlatStyle = FlatStyle.Flat; favoriteNumberButton[i].FlatStyle = FlatStyle.Flat;
@ -87,7 +87,7 @@ namespace DualScreenDemo
Name = "enterFavoriteButton" Name = "enterFavoriteButton"
}; };
ResizeAndPositionButton(enterFavoriteButton, 832, 657, 70, 65); ResizeAndPositionButton(enterFavoriteButton, 832, 657, 70, 65);
enterFavoriteButton.BackgroundImage = Image.FromFile(Path.Combine(Application.StartupPath, @"themes\superstar\button\3.介面\我的最愛_確認.png")); enterFavoriteButton.BackgroundImage = Image.FromFile(Path.Combine(serverPath, @"themes\superstar\button\3.介面\我的最愛_確認.png"));
enterFavoriteButton.BackgroundImageLayout = ImageLayout.Stretch; enterFavoriteButton.BackgroundImageLayout = ImageLayout.Stretch;
enterFavoriteButton.FlatStyle = FlatStyle.Flat; enterFavoriteButton.FlatStyle = FlatStyle.Flat;
enterFavoriteButton.FlatAppearance.BorderSize = 0; enterFavoriteButton.FlatAppearance.BorderSize = 0;
@ -102,7 +102,7 @@ namespace DualScreenDemo
Name = "newFavoriteButton" Name = "newFavoriteButton"
}; };
ResizeAndPositionButton(newFavoriteButton, 916, 657, 70, 65); ResizeAndPositionButton(newFavoriteButton, 916, 657, 70, 65);
newFavoriteButton.BackgroundImage = Image.FromFile(Path.Combine(Application.StartupPath, @"themes\superstar\button\3.介面\我的最愛_新建.png")); newFavoriteButton.BackgroundImage = Image.FromFile(Path.Combine(serverPath, @"themes\superstar\button\3.介面\我的最愛_新建.png"));
newFavoriteButton.BackgroundImageLayout = ImageLayout.Stretch; newFavoriteButton.BackgroundImageLayout = ImageLayout.Stretch;
newFavoriteButton.FlatStyle = FlatStyle.Flat; newFavoriteButton.FlatStyle = FlatStyle.Flat;
newFavoriteButton.FlatAppearance.BorderSize = 0; newFavoriteButton.FlatAppearance.BorderSize = 0;
@ -117,7 +117,7 @@ namespace DualScreenDemo
Name = "refillFavoriteButton" Name = "refillFavoriteButton"
}; };
ResizeAndPositionButton(refillFavoriteButton, 999, 657, 70, 65); ResizeAndPositionButton(refillFavoriteButton, 999, 657, 70, 65);
refillFavoriteButton.BackgroundImage = Image.FromFile(Path.Combine(Application.StartupPath, @"themes\superstar\button\3.介面\我的最愛_重填.png")); refillFavoriteButton.BackgroundImage = Image.FromFile(Path.Combine(serverPath, @"themes\superstar\button\3.介面\我的最愛_重填.png"));
refillFavoriteButton.BackgroundImageLayout = ImageLayout.Stretch; refillFavoriteButton.BackgroundImageLayout = ImageLayout.Stretch;
refillFavoriteButton.FlatStyle = FlatStyle.Flat; refillFavoriteButton.FlatStyle = FlatStyle.Flat;
refillFavoriteButton.FlatAppearance.BorderSize = 0; refillFavoriteButton.FlatAppearance.BorderSize = 0;
@ -132,7 +132,7 @@ namespace DualScreenDemo
Name = "closeFavoriteButton" Name = "closeFavoriteButton"
}; };
ResizeAndPositionButton(closeFavoriteButton, 1083, 657, 70, 65); ResizeAndPositionButton(closeFavoriteButton, 1083, 657, 70, 65);
closeFavoriteButton.BackgroundImage = Image.FromFile(Path.Combine(Application.StartupPath, @"themes\superstar\button\3.介面\我的最愛_關閉.png")); closeFavoriteButton.BackgroundImage = Image.FromFile(Path.Combine(serverPath, @"themes\superstar\button\3.介面\我的最愛_關閉.png"));
closeFavoriteButton.BackgroundImageLayout = ImageLayout.Stretch; closeFavoriteButton.BackgroundImageLayout = ImageLayout.Stretch;
closeFavoriteButton.FlatStyle = FlatStyle.Flat; closeFavoriteButton.FlatStyle = FlatStyle.Flat;
closeFavoriteButton.FlatAppearance.BorderSize = 0; closeFavoriteButton.FlatAppearance.BorderSize = 0;
@ -341,7 +341,7 @@ namespace DualScreenDemo
groupSearchButton.BackgroundImage = groupSearchNormalBackground; groupSearchButton.BackgroundImage = groupSearchNormalBackground;
categorySearchButton.BackgroundImage = categorySearchNormalBackground; categorySearchButton.BackgroundImage = categorySearchNormalBackground;
orderedSongsButton.BackgroundImage = orderedSongsNormalBackground; orderedSongsButton.BackgroundImage = orderedSongsNormalBackground;
myFavoritesButton.BackgroundImage = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別上方_我的最愛(已按).png")); myFavoritesButton.BackgroundImage = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別上方_我的最愛(已按).png"));
promotionsButton.BackgroundImage = promotionsNormalBackground; promotionsButton.BackgroundImage = promotionsNormalBackground;
deliciousFoodButton.BackgroundImage = deliciousFoodNormalBackground; deliciousFoodButton.BackgroundImage = deliciousFoodNormalBackground;
isOnOrderedSongsPage = false; isOnOrderedSongsPage = false;
@ -350,7 +350,7 @@ namespace DualScreenDemo
if (!FavoritePictureBox.Visible) if (!FavoritePictureBox.Visible)
{ {
ShowImageOnFavoritePictureBox(Path.Combine(Application.StartupPath, @"themes\superstar\我的最愛\我的最愛_工作區域.jpg")); ShowImageOnFavoritePictureBox(Path.Combine(serverPath, @"themes\superstar\我的最愛\我的最愛_工作區域.jpg"));
SetFavoritePictureBoxAndButtonsVisibility(true); SetFavoritePictureBoxAndButtonsVisibility(true);
} }
else else

View File

@ -431,7 +431,7 @@ namespace DualScreenDemo
{ {
PictureBox icon = new PictureBox() PictureBox icon = new PictureBox()
{ {
Image = Image.FromFile(Path.Combine(Application.StartupPath, @"themes\superstar\button\3.介面\其他符號_人聲.png")), Image = Image.FromFile(Path.Combine(serverPath, @"themes\superstar\button\3.介面\其他符號_人聲.png")),
SizeMode = PictureBoxSizeMode.Zoom, SizeMode = PictureBoxSizeMode.Zoom,
Size = new Size(30, 30), Size = new Size(30, 30),
Location = new Point(songX + 5, y + 8) Location = new Point(songX + 5, y + 8)
@ -530,6 +530,8 @@ namespace DualScreenDemo
return parser.ReadData(reader); return parser.ReadData(reader);
} }
} }
string serverPath = Utils.Env.GetPath("", "");
} }
} }
} }

View File

@ -32,7 +32,7 @@ namespace DualScreenDemo
button.FlatAppearance.MouseDownBackColor = Color.Transparent; button.FlatAppearance.MouseDownBackColor = Color.Transparent;
button.Location = location; button.Location = location;
using (var stream = new MemoryStream(File.ReadAllBytes(Path.Combine(Application.StartupPath, imagePath)))) using (var stream = new MemoryStream(File.ReadAllBytes(Path.Combine(serverPath, imagePath))))
{ {
var image = Image.FromStream(stream); var image = Image.FromStream(stream);
if (image.PixelFormat != System.Drawing.Imaging.PixelFormat.Format32bppArgb) if (image.PixelFormat != System.Drawing.Imaging.PixelFormat.Format32bppArgb)
@ -92,7 +92,7 @@ namespace DualScreenDemo
categorySearchButton.BackgroundImage = categorySearchNormalBackground; categorySearchButton.BackgroundImage = categorySearchNormalBackground;
orderedSongsButton.BackgroundImage = orderedSongsNormalBackground; orderedSongsButton.BackgroundImage = orderedSongsNormalBackground;
myFavoritesButton.BackgroundImage = myFavoritesNormalBackground; myFavoritesButton.BackgroundImage = myFavoritesNormalBackground;
promotionsButton.BackgroundImage = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別上方_優惠活動(已按).png")); promotionsButton.BackgroundImage = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別上方_優惠活動(已按).png"));
deliciousFoodButton.BackgroundImage = deliciousFoodNormalBackground; deliciousFoodButton.BackgroundImage = deliciousFoodNormalBackground;
isOnOrderedSongsPage = false; isOnOrderedSongsPage = false;

View File

@ -14,7 +14,7 @@ namespace DualScreenDemo
try try
{ {
string imagePath = Path.Combine(Application.StartupPath, "themes/superstar/button/3.介面/手機點歌QR碼_完整介面.png"); string imagePath = Path.Combine(serverPath, "themes/superstar/button/3.介面/手機點歌QR碼_完整介面.png");
if (!File.Exists(imagePath)) if (!File.Exists(imagePath))
{ {
Console.WriteLine("Base image not found: " + imagePath); Console.WriteLine("Base image not found: " + imagePath);
@ -82,7 +82,7 @@ namespace DualScreenDemo
ResizeAndPositionControl(pictureBoxQRCode, 975, 442, 226, 274); ResizeAndPositionControl(pictureBoxQRCode, 975, 442, 226, 274);
Bitmap originalImage = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\手機點歌QR碼_完整介面.png")); Bitmap originalImage = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\手機點歌QR碼_完整介面.png"));
//Rectangle closeQRCodeCropArea = new Rectangle(198, 6, 22, 22); //Rectangle closeQRCodeCropArea = new Rectangle(198, 6, 22, 22);

View File

@ -31,9 +31,9 @@ namespace DualScreenDemo
Name = "constructionButton", Name = "constructionButton",
}; };
ConfigureButton(constructionButton, 876, 494, 148, 64, ConfigureButton(constructionButton, 876, 494, 148, 64,
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\場景音效_工地.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\場景音效_工地.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\場景音效_工地.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\場景音效_工地.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\場景音效_工地.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\場景音效_工地.png")),
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(Application.StartupPath, "themes\\superstar\\button\\3.介面\\場景音效_市場.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\場景音效_市場.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\場景音效_市場.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\場景音效_市場.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\場景音效_市場.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\場景音效_市場.png")),
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(Application.StartupPath, "themes\\superstar\\button\\3.介面\\場景音效_開車.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\場景音效_開車.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\場景音效_開車.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\場景音效_開車.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\場景音效_開車.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\場景音效_開車.png")),
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(Application.StartupPath, "themes\\superstar\\button\\3.介面\\場景音效_機場.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\場景音效_機場.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\場景音效_機場.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\場景音效_機場.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\場景音效_機場.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\場景音效_機場.png")),
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(Application.StartupPath, "themes\\superstar\\button\\3.介面\\場景音效_辦公室.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\場景音效_辦公室.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\場景音效_辦公室.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\場景音效_辦公室.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\場景音效_辦公室.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\場景音效_辦公室.png")),
OfficeButton_Click); OfficeButton_Click);
this.Controls.Add(officeButton); this.Controls.Add(officeButton);
@ -92,9 +92,9 @@ namespace DualScreenDemo
}; };
ConfigureButton(closeButton, 1036, 646, 150, 63, ConfigureButton(closeButton, 1036, 646, 150, 63,
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\場景音效_關閉.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\場景音效_關閉.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\場景音效_關閉.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\場景音效_關閉.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\場景音效_關閉.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\場景音效_關閉.png")),
CloseButton_Click); CloseButton_Click);
this.Controls.Add(closeButton); this.Controls.Add(closeButton);
} }
@ -110,7 +110,7 @@ namespace DualScreenDemo
if (!pictureBoxSceneSoundEffects.Visible) if (!pictureBoxSceneSoundEffects.Visible)
{ {
ShowImageOnPictureBoxSceneSoundEffects(Path.Combine(Application.StartupPath, @"themes\superstar\button\3.介面\場景音效_空白介面.png")); ShowImageOnPictureBoxSceneSoundEffects(Path.Combine(serverPath, @"themes\superstar\button\3.介面\場景音效_空白介面.png"));
SetPictureBoxSceneSoundEffectsAndButtonsVisibility(true); SetPictureBoxSceneSoundEffectsAndButtonsVisibility(true);
} }
else else

View File

@ -44,70 +44,70 @@ namespace DualScreenDemo
// 同步畫面 服務鈴 // 同步畫面 服務鈴
ConfigureButton(this.syncServiceBellButton, 1240, 17, 161, 161, ConfigureButton(this.syncServiceBellButton, 1240, 17, 161, 161,
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\同步畫面_服務鈴.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_服務鈴.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\同步畫面_服務鈴.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_服務鈴.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\同步畫面_服務鈴.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_服務鈴.png")),
//(sender, e) => SendCommandThroughSerialPort("a2 53 a4")); //(sender, e) => SendCommandThroughSerialPort("a2 53 a4"));
(sender,e)=>OnServiceBellButtonClick(sender,e)); (sender,e)=>OnServiceBellButtonClick(sender,e));
ConfigureButton(this.syncCutSongButton, 1218, 195, 205, 56, ConfigureButton(this.syncCutSongButton, 1218, 195, 205, 56,
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\同步畫面_切歌.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_切歌.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\同步畫面_切歌.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_切歌.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\同步畫面_切歌.png")), (sender, e) => videoPlayerForm.PlayNextSong()); new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_切歌.png")), (sender, e) => videoPlayerForm.PlayNextSong());
ConfigureButton(this.syncReplayButton, 1218, 265, 205, 56, ConfigureButton(this.syncReplayButton, 1218, 265, 205, 56,
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\同步畫面_重唱.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_重唱.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\同步畫面_重唱.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_重唱.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\同步畫面_重唱.png")), ReplayButton_Click); new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_重唱.png")), ReplayButton_Click);
// 有人聲入口位置 // 有人聲入口位置
ConfigureButton(this.syncOriginalSongButton, 1218, 335, 205, 56, ConfigureButton(this.syncOriginalSongButton, 1218, 335, 205, 56,
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\同步畫面_原唱.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_原唱.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\同步畫面_原唱.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_原唱.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\同步畫面_原唱.png")), (sender,e) => videoPlayerForm.ToggleVocalRemoval()); new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_原唱.png")), (sender,e) => videoPlayerForm.ToggleVocalRemoval());
ConfigureButton(this.syncMuteButton, 1218, 406, 205, 55, ConfigureButton(this.syncMuteButton, 1218, 406, 205, 55,
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\同步畫面_靜音.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_靜音.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\同步畫面_靜音.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_靜音.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\同步畫面_靜音.png")), MuteUnmuteButton_Click); new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_靜音.png")), MuteUnmuteButton_Click);
ConfigureButton(this.syncPauseButton, 1218, 475, 205, 56, ConfigureButton(this.syncPauseButton, 1218, 475, 205, 56,
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\同步畫面_暫停.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_暫停.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\同步畫面_暫停.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_暫停.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\同步畫面_暫停.png")), SyncPauseButton_Click); new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_暫停.png")), SyncPauseButton_Click);
ConfigureButton(this.syncPlayButton, 1218, 475, 205, 56, ConfigureButton(this.syncPlayButton, 1218, 475, 205, 56,
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\同步畫面_暫停.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_暫停.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\同步畫面_暫停.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_暫停.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\同步畫面_暫停.png")), SyncPlayButton_Click); new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_暫停.png")), SyncPlayButton_Click);
ConfigureButton(this.syncVolumeUpButton, 1218, 546, 205, 55, ConfigureButton(this.syncVolumeUpButton, 1218, 546, 205, 55,
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\同步畫面_音樂+.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_音樂+.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\同步畫面_音樂+.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_音樂+.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\同步畫面_音樂+.png")), null); new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_音樂+.png")), null);
this.syncVolumeUpButton.MouseDown += (sender, e) => { OverlayForm.MainForm.ShowTopRightLabel("音量 ↑ ","a2 b3 a4"); }; this.syncVolumeUpButton.MouseDown += (sender, e) => { OverlayForm.MainForm.ShowTopRightLabel("音量 ↑ ","a2 b3 a4"); };
this.syncVolumeUpButton.MouseUp += (sender, e) => { OverlayForm.MainForm.RedisplayTopRigthLabel(); }; this.syncVolumeUpButton.MouseUp += (sender, e) => { OverlayForm.MainForm.RedisplayTopRigthLabel(); };
ConfigureButton(this.syncVolumeDownButton, 1218, 616, 205, 55, ConfigureButton(this.syncVolumeDownButton, 1218, 616, 205, 55,
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\同步畫面_音樂-.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_音樂-.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\同步畫面_音樂-.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_音樂-.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\同步畫面_音樂-.png")), null); new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_音樂-.png")), null);
this.syncVolumeDownButton.MouseDown += (sender, e) => { OverlayForm.MainForm.ShowTopRightLabel("音量 ↓ ","a2 b4 a4");}; this.syncVolumeDownButton.MouseDown += (sender, e) => { OverlayForm.MainForm.ShowTopRightLabel("音量 ↓ ","a2 b4 a4");};
this.syncVolumeDownButton.MouseUp += (sender, e) => { OverlayForm.MainForm.RedisplayTopRigthLabel();}; this.syncVolumeDownButton.MouseUp += (sender, e) => { OverlayForm.MainForm.RedisplayTopRigthLabel();};
ConfigureButton(this.syncMicUpButton, 1218, 686, 205, 56, ConfigureButton(this.syncMicUpButton, 1218, 686, 205, 56,
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\同步畫面_麥克風+.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_麥克風+.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\同步畫面_麥克風+.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_麥克風+.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\同步畫面_麥克風+.png")), null); new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_麥克風+.png")), null);
this.syncMicUpButton.MouseDown += (sender, e) => { OverlayForm.MainForm.ShowTopRightLabel("麥克風 ↑ ","a2 b5 a4");}; this.syncMicUpButton.MouseDown += (sender, e) => { OverlayForm.MainForm.ShowTopRightLabel("麥克風 ↑ ","a2 b5 a4");};
this.syncMicUpButton.MouseUp += (sender, e) => { OverlayForm.MainForm.RedisplayTopRigthLabel(); }; this.syncMicUpButton.MouseUp += (sender, e) => { OverlayForm.MainForm.RedisplayTopRigthLabel(); };
ConfigureButton(this.syncMicDownButton, 1218, 756, 205, 56, ConfigureButton(this.syncMicDownButton, 1218, 756, 205, 56,
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\同步畫面_麥克風-.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_麥克風-.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\同步畫面_麥克風-.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_麥克風-.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\同步畫面_麥克風-.png")), null); new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_麥克風-.png")), null);
this.syncMicDownButton.MouseDown += (sender, e) => { OverlayForm.MainForm.ShowTopRightLabel("麥克風 ↓ ","a2 b6 a4");}; this.syncMicDownButton.MouseDown += (sender, e) => { OverlayForm.MainForm.ShowTopRightLabel("麥克風 ↓ ","a2 b6 a4");};
this.syncMicDownButton.MouseUp += (sender, e) => { OverlayForm.MainForm.RedisplayTopRigthLabel(); }; this.syncMicDownButton.MouseUp += (sender, e) => { OverlayForm.MainForm.RedisplayTopRigthLabel(); };
@ -116,9 +116,9 @@ namespace DualScreenDemo
ConfigureButton(this.syncCloseButton, 1218, 826, 205, 56, ConfigureButton(this.syncCloseButton, 1218, 826, 205, 56,
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\同步畫面_關閉.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_關閉.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\同步畫面_關閉.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_關閉.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\同步畫面_關閉.png")), SyncCloseButton_Click); new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\同步畫面_關閉.png")), SyncCloseButton_Click);

View File

@ -34,9 +34,9 @@ namespace DualScreenDemo
btnTurnOn = new Button { Text = "" }; btnTurnOn = new Button { Text = "" };
ConfigureButton(btnTurnOn, 29, 45, 250, 67, ConfigureButton(btnTurnOn, 29, 45, 250, 67,
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\燈光控制_ON-OFF.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_ON-OFF.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\燈光控制_ON-OFF.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_ON-OFF.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\燈光控制_ON-OFF.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_ON-OFF.png")),
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(Application.StartupPath, "themes\\superstar\\button\\3.介面\\燈光控制_明亮.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_明亮.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\燈光控制_明亮.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_明亮.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\燈光控制_明亮.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_明亮.png")),
null); null);
btnBright.Click += (sender, e) => btnBright.Click += (sender, e) =>
{ {
@ -96,79 +96,79 @@ namespace DualScreenDemo
btnRomantic = new Button{ Text = "" }; btnRomantic = new Button{ Text = "" };
ConfigureButton(btnRomantic, 430, 45, 118, 65, ConfigureButton(btnRomantic, 430, 45, 118, 65,
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\燈光控制_浪漫.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_浪漫.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\燈光控制_浪漫.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_浪漫.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\燈光控制_浪漫.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_浪漫.png")),
(sender, e) => SendCommandThroughSerialPort("a2 d7 a4")); (sender, e) => SendCommandThroughSerialPort("a2 d7 a4"));
btnAuto = new Button{ Text = "" }; btnAuto = new Button{ Text = "" };
ConfigureButton(btnAuto, 430, 125, 118, 65, ConfigureButton(btnAuto, 430, 125, 118, 65,
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\燈光控制_自動.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_自動.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\燈光控制_自動.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_自動.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\燈光控制_自動.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_自動.png")),
null); null);
btnColorTuning = new Button{ Text = "" }; btnColorTuning = new Button{ Text = "" };
ConfigureButton(btnColorTuning, 430, 203, 118, 65, ConfigureButton(btnColorTuning, 430, 203, 118, 65,
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\燈光控制_調色.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_調色.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\燈光控制_調色.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_調色.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\燈光控制_調色.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_調色.png")),
(sender, e) => SendCommandThroughSerialPort("a2 75 a4")); (sender, e) => SendCommandThroughSerialPort("a2 75 a4"));
btnSoft = new Button{ Text = "" }; btnSoft = new Button{ Text = "" };
ConfigureButton(btnSoft, 295, 125, 118, 65, ConfigureButton(btnSoft, 295, 125, 118, 65,
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\燈光控制_柔和.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_柔和.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\燈光控制_柔和.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_柔和.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\燈光控制_柔和.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_柔和.png")),
(sender, e) => SendCommandThroughSerialPort("a2 d6 a4")); (sender, e) => SendCommandThroughSerialPort("a2 d6 a4"));
btnDynamic = new Button{ Text = "" }; btnDynamic = new Button{ Text = "" };
ConfigureButton(btnDynamic, 295, 203, 118, 65, ConfigureButton(btnDynamic, 295, 203, 118, 65,
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\燈光控制_動感.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_動感.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\燈光控制_動感.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_動感.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\燈光控制_動感.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_動感.png")),
(sender, e) => SendCommandThroughSerialPort("a2 d8 a4")); (sender, e) => SendCommandThroughSerialPort("a2 d8 a4"));
btnDeskLamp = new Button{ Text = "" }; btnDeskLamp = new Button{ Text = "" };
ConfigureButton(btnDeskLamp, 430, 283, 118, 65, ConfigureButton(btnDeskLamp, 430, 283, 118, 65,
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\燈光控制_桌燈.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_桌燈.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\燈光控制_桌燈.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_桌燈.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\燈光控制_桌燈.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_桌燈.png")),
(sender, e) => SendCommandThroughSerialPort("a2 fb a4")); (sender, e) => SendCommandThroughSerialPort("a2 fb a4"));
btnStageLight = new Button{ Text = "" }; btnStageLight = new Button{ Text = "" };
ConfigureButton(btnStageLight, 295, 283, 118, 65, ConfigureButton(btnStageLight, 295, 283, 118, 65,
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\燈光控制_舞台燈.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_舞台燈.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\燈光控制_舞台燈.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_舞台燈.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\燈光控制_舞台燈.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_舞台燈.png")),
(sender, e) => SendCommandThroughSerialPort("a2 fa a4")); (sender, e) => SendCommandThroughSerialPort("a2 fa a4"));
btnShelfLight = new Button{ Text = "" }; btnShelfLight = new Button{ Text = "" };
ConfigureButton(btnShelfLight, 163, 283, 118, 65, ConfigureButton(btnShelfLight, 163, 283, 118, 65,
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\燈光控制_層板燈.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_層板燈.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\燈光控制_層板燈.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_層板燈.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\燈光控制_層板燈.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_層板燈.png")),
(sender, e) => SendCommandThroughSerialPort("a2 f9 a4")); (sender, e) => SendCommandThroughSerialPort("a2 f9 a4"));
btnWallLight = new Button{ Text = "" }; btnWallLight = new Button{ Text = "" };
ConfigureButton(btnWallLight, 29, 283, 118, 65, ConfigureButton(btnWallLight, 29, 283, 118, 65,
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\燈光控制_壁燈.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_壁燈.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\燈光控制_壁燈.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_壁燈.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\燈光控制_壁燈.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_壁燈.png")),
(sender, e) => SendCommandThroughSerialPort("a2 f8 a4")); (sender, e) => SendCommandThroughSerialPort("a2 f8 a4"));
Brightness1 = new PictureBox { }; Brightness1 = new PictureBox { };
Brightness1.BackgroundImage = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\燈光控制_桌燈調光.png")); Brightness1.BackgroundImage = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_桌燈調光.png"));
Brightness1.BackgroundImageLayout = ImageLayout.Stretch; Brightness1.BackgroundImageLayout = ImageLayout.Stretch;
Brightness1.Size = new Size(155, 172); Brightness1.Size = new Size(155, 172);
Brightness1.Location = new Point(38, 151); Brightness1.Location = new Point(38, 151);
@ -194,7 +194,7 @@ namespace DualScreenDemo
Brightness2 = new PictureBox { }; Brightness2 = new PictureBox { };
Brightness2.BackgroundImage = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\燈光控制_層板調光.png")); Brightness2.BackgroundImage = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_層板調光.png"));
Brightness2.BackgroundImageLayout = ImageLayout.Stretch; Brightness2.BackgroundImageLayout = ImageLayout.Stretch;
Brightness2.Size = new Size(155, 172); Brightness2.Size = new Size(155, 172);
Brightness2.Location = new Point(216, 151); Brightness2.Location = new Point(216, 151);
@ -246,7 +246,7 @@ namespace DualScreenDemo
pictureBoxToggleLight.Size = new Size(630, 379); pictureBoxToggleLight.Size = new Size(630, 379);
pictureBoxToggleLight.Location = new Point(570, 359); pictureBoxToggleLight.Location = new Point(570, 359);
ResizeAndPositionPictureBox(pictureBoxToggleLight, 570, 359, 570, 359); ResizeAndPositionPictureBox(pictureBoxToggleLight, 570, 359, 570, 359);
pictureBoxToggleLight.BackgroundImage = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\燈光控制_完整介面.png")); pictureBoxToggleLight.BackgroundImage = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\燈光控制_完整介面.png"));
pictureBoxToggleLight.BackgroundImageLayout = ImageLayout.Stretch; pictureBoxToggleLight.BackgroundImageLayout = ImageLayout.Stretch;
pictureBoxToggleLight.BringToFront(); pictureBoxToggleLight.BringToFront();
SetUIVisible(pictureBoxToggleLight); SetUIVisible(pictureBoxToggleLight);

View File

@ -27,9 +27,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(Application.StartupPath, "themes\\superstar\\button\\3.介面\\歌曲點播_點播.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\歌曲點播_點播.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\歌曲點播_點播.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\歌曲點播_點播.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\歌曲點播_點播.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\歌曲點播_點播.png")),
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(Application.StartupPath, "themes\\superstar\\button\\3.介面\\歌曲點播_插播.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\歌曲點播_插播.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\歌曲點播_插播.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\歌曲點播_插播.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\歌曲點播_插播.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\歌曲點播_插播.png")),
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(Application.StartupPath, "themes\\superstar\\button\\3.介面\\歌曲點播_歷年專輯.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\歌曲點播_歷年專輯.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\歌曲點播_歷年專輯.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\歌曲點播_歷年專輯.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\歌曲點播_歷年專輯.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\歌曲點播_歷年專輯.png")),
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(Application.StartupPath, "themes\\superstar\\button\\3.介面\\歌曲點播_我的最愛.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\歌曲點播_我的最愛.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\歌曲點播_我的最愛.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\歌曲點播_我的最愛.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\歌曲點播_我的最愛.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\歌曲點播_我的最愛.png")),
FavoriteButton_Click); FavoriteButton_Click);
@ -86,9 +86,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(Application.StartupPath, "themes\\superstar\\button\\3.介面\\歌曲點播_關閉.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\歌曲點播_關閉.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\歌曲點播_關閉.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\歌曲點播_關閉.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\3.介面\\歌曲點播_關閉.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\3.介面\\歌曲點播_關閉.png")),
VodScreenCloseButton_Click); VodScreenCloseButton_Click);

View File

@ -127,6 +127,8 @@ namespace DualScreenDemo
private int _currentPage { get; set; } = 0; private int _currentPage { get; set; } = 0;
private int _totalPages { get; set; } private int _totalPages { get; set; }
string serverPath = Utils.Env.GetPath("", "");
public int currentPage public int currentPage
{ {
get { return _currentPage; } get { return _currentPage; }
@ -470,7 +472,7 @@ namespace DualScreenDemo
{ {
var data = LoadConfigData(); var data = LoadConfigData();
string backgroundImagePath = Path.Combine(Application.StartupPath, "themes\\superstar\\主畫面\\0.下方選單_主畫面.jpg"); string backgroundImagePath = Path.Combine(serverPath, "themes\\superstar\\主畫面\\0.下方選單_主畫面.jpg");
try try
{ {
using (Image originalImage = Image.FromFile(backgroundImagePath)) using (Image originalImage = Image.FromFile(backgroundImagePath))
@ -1020,9 +1022,9 @@ namespace DualScreenDemo
serviceBellButton = new Button { Text = "" }; serviceBellButton = new Button { Text = "" };
ConfigureButton(serviceBellButton, 843, 98, 107, 120, ConfigureButton(serviceBellButton, 843, 98, 107, 120,
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別上方_服務鈴(未按).png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別上方_服務鈴(未按).png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別上方_服務鈴(未按).png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別上方_服務鈴(未按).png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別上方_服務鈴(已按).png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別上方_服務鈴(已按).png")),
(sender, e) => OnServiceBellButtonClick(sender, e)); (sender, e) => OnServiceBellButtonClick(sender, e));
@ -1038,72 +1040,72 @@ namespace DualScreenDemo
mobileSongRequestButton = new Button { Text = "" }; mobileSongRequestButton = new Button { Text = "" };
mobileSongRequestButton.Name = "mobileSongRequestButton"; mobileSongRequestButton.Name = "mobileSongRequestButton";
ConfigureButton(mobileSongRequestButton, 1198, 629, 223, 88, ConfigureButton(mobileSongRequestButton, 1198, 629, 223, 88,
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別上方_手機點歌.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別上方_手機點歌.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別上方_手機點歌.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別上方_手機點歌.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別上方_手機點歌.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別上方_手機點歌.png")),
MobileSongRequestButton_Click); MobileSongRequestButton_Click);
qieGeButton = new Button { Text = "" }; qieGeButton = new Button { Text = "" };
qieGeButton.Name = "qieGeButton"; qieGeButton.Name = "qieGeButton";
ConfigureButton(qieGeButton, 20, 738, 92, 147, ConfigureButton(qieGeButton, 20, 738, 92, 147,
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_切歌.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_切歌.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_切歌.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_切歌.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_切歌.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_切歌.png")),
(sender, e) => videoPlayerForm.PlayNextSong()); (sender, e) => videoPlayerForm.PlayNextSong());
musicUpButton = new Button { Text = "" }; musicUpButton = new Button { Text = "" };
musicUpButton.Name = "musicUpButton"; musicUpButton.Name = "musicUpButton";
ConfigureButton(musicUpButton, 128, 738, 93, 62, ConfigureButton(musicUpButton, 128, 738, 93, 62,
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_音樂+.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_音樂+.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_音樂+.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_音樂+.png")),
new Bitmap(Path.Combine(Application.StartupPath , "themes\\superstar\\button\\1.主類別\\音樂及麥克風icon_音樂++.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\音樂及麥克風icon_音樂++.png")),
(sender, e) => { OverlayForm.MainForm.ShowTopRightLabel("音量 ↑", "a2 b3 a4"); }); (sender, e) => { OverlayForm.MainForm.ShowTopRightLabel("音量 ↑", "a2 b3 a4"); });
musicDownButton = new Button { Text = "" }; musicDownButton = new Button { Text = "" };
musicDownButton.Name = "musicDownButton"; musicDownButton.Name = "musicDownButton";
ConfigureButton(musicDownButton, 128, 823, 93, 62, ConfigureButton(musicDownButton, 128, 823, 93, 62,
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_音樂-.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_音樂-.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_音樂-.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_音樂-.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\音樂及麥克風icon_音樂--.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\音樂及麥克風icon_音樂--.png")),
(sender, e) => { OverlayForm.MainForm.ShowTopRightLabel("音量 ↓", "a2 b4 a4"); }); (sender, e) => { OverlayForm.MainForm.ShowTopRightLabel("音量 ↓", "a2 b4 a4"); });
micUpButton = new Button { Text = "" }; micUpButton = new Button { Text = "" };
micUpButton.Name = "micUpButton"; micUpButton.Name = "micUpButton";
ConfigureButton(micUpButton, 238, 738, 93, 62, ConfigureButton(micUpButton, 238, 738, 93, 62,
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_麥克風+.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_麥克風+.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_麥克風+.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_麥克風+.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\音樂及麥克風icon_麥克風++.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\音樂及麥克風icon_麥克風++.png")),
(sender, e) => { OverlayForm.MainForm.ShowTopRightLabel("麥克風 ↑", "a2 b5 a4"); }); (sender, e) => { OverlayForm.MainForm.ShowTopRightLabel("麥克風 ↑", "a2 b5 a4"); });
micDownButton = new Button { Text = "" }; micDownButton = new Button { Text = "" };
micDownButton.Name = "micDownButton"; micDownButton.Name = "micDownButton";
ConfigureButton(micDownButton, 238, 823, 93, 62, ConfigureButton(micDownButton, 238, 823, 93, 62,
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_麥克風-.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_麥克風-.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_麥克風-.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_麥克風-.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\音樂及麥克風icon_麥克風--.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\音樂及麥克風icon_麥克風--.png")),
(sender, e) => { OverlayForm.MainForm.ShowTopRightLabel("麥克風 ↓", "a2 b6 a4"); }); (sender, e) => { OverlayForm.MainForm.ShowTopRightLabel("麥克風 ↓", "a2 b6 a4"); });
originalSongButton = new Button { Text = "" }; originalSongButton = new Button { Text = "" };
originalSongButton.Name = "originalSongButton"; originalSongButton.Name = "originalSongButton";
ConfigureButton(originalSongButton, 347, 738, 93, 62, ConfigureButton(originalSongButton, 347, 738, 93, 62,
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_原唱.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_原唱.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_原唱.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_原唱.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_原唱.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_原唱.png")),
OriginalSongButton_Click); OriginalSongButton_Click);
replayButton = new Button { Text = "" }; replayButton = new Button { Text = "" };
replayButton.Name = "replayButton"; replayButton.Name = "replayButton";
ConfigureButton(replayButton, 347, 823, 93, 62, ConfigureButton(replayButton, 347, 823, 93, 62,
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_重唱.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_重唱.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_重唱.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_重唱.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_重唱.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_重唱.png")),
ReplayButton_Click); ReplayButton_Click);
@ -1111,9 +1113,9 @@ namespace DualScreenDemo
Text = "", Text = "",
Name = "pauseButton" }; Name = "pauseButton" };
ConfigureButton(pauseButton, 456, 738, 93, 62, ConfigureButton(pauseButton, 456, 738, 93, 62,
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_暫停.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_暫停.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_暫停.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_暫停.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_暫停.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_暫停.png")),
PauseButton_Click); PauseButton_Click);
@ -1124,144 +1126,144 @@ namespace DualScreenDemo
Visible = false Visible = false
}; };
ConfigureButton(playButton, 456, 738, 93, 62, ConfigureButton(playButton, 456, 738, 93, 62,
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_暫停.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_暫停.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_暫停.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_暫停.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_暫停.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_暫停.png")),
PlayButton_Click); PlayButton_Click);
muteButton = new Button { Text = "" }; muteButton = new Button { Text = "" };
muteButton.Name = "muteButton"; muteButton.Name = "muteButton";
ConfigureButton(muteButton, 456, 823, 93, 62, ConfigureButton(muteButton, 456, 823, 93, 62,
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_靜音.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_靜音.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_靜音.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_靜音.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_靜音.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_靜音.png")),
MuteUnmuteButton_Click); MuteUnmuteButton_Click);
maleKeyButton = new Button { Text = "" }; maleKeyButton = new Button { Text = "" };
maleKeyButton.Name = "maleKeyButton"; maleKeyButton.Name = "maleKeyButton";
ConfigureButton(maleKeyButton, 564, 738, 93, 62, ConfigureButton(maleKeyButton, 564, 738, 93, 62,
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_男調.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_男調.png")),
new Bitmap(Path.Combine(Application.StartupPath , "themes\\superstar\\button\\1.主類別\\主類別下方_男調.png")), new Bitmap(Path.Combine(serverPath , "themes\\superstar\\button\\1.主類別\\主類別下方_男調.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_男調.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_男調.png")),
MaleKeyButton_Click); MaleKeyButton_Click);
femaleKeyButton = new Button { Text = "" }; femaleKeyButton = new Button { Text = "" };
femaleKeyButton.Name = "femaleKeyButton"; femaleKeyButton.Name = "femaleKeyButton";
ConfigureButton(femaleKeyButton, 565, 823, 93, 62, ConfigureButton(femaleKeyButton, 565, 823, 93, 62,
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_女調.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_女調.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_女調.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_女調.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_女調.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_女調.png")),
FemaleKeyButton_Click); FemaleKeyButton_Click);
standardKeyButton = new Button { Text = "" }; standardKeyButton = new Button { Text = "" };
standardKeyButton.Name = "standardKeyButton"; standardKeyButton.Name = "standardKeyButton";
ConfigureButton(standardKeyButton, 674, 738, 93, 62, ConfigureButton(standardKeyButton, 674, 738, 93, 62,
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_標準調.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_標準調.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_標準調.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_標準調.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_標準調.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_標準調.png")),
StandardKeyButton_Click); StandardKeyButton_Click);
soundEffectButton = new Button { Text = "" }; soundEffectButton = new Button { Text = "" };
soundEffectButton.Name = "soundEffectButton"; soundEffectButton.Name = "soundEffectButton";
ConfigureButton(soundEffectButton, 674, 823, 93, 62, ConfigureButton(soundEffectButton, 674, 823, 93, 62,
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_音效.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_音效.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_音效.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_音效.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_音效.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_音效.png")),
SoundEffectButton_Click); SoundEffectButton_Click);
pitchUpButton = new Button { Text = "" }; pitchUpButton = new Button { Text = "" };
pitchUpButton.Name = "pitchUpButton"; pitchUpButton.Name = "pitchUpButton";
ConfigureButton(pitchUpButton, 784, 738, 93, 62, ConfigureButton(pitchUpButton, 784, 738, 93, 62,
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_升調.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_升調.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_升調.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_升調.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_升調.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_升調.png")),
PitchUpButton_Click); PitchUpButton_Click);
pitchDownButton = new Button { Text = "" }; pitchDownButton = new Button { Text = "" };
pitchDownButton.Name = "pitchDownButton"; pitchDownButton.Name = "pitchDownButton";
ConfigureButton(pitchDownButton, 784, 823, 93, 62, ConfigureButton(pitchDownButton, 784, 823, 93, 62,
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_降調.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_降調.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_降調.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_降調.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_降調.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_降調.png")),
PitchDownButton_Click); PitchDownButton_Click);
syncScreenButton = new Button { Text = "" }; syncScreenButton = new Button { Text = "" };
syncScreenButton.Name = "syncScreenButton"; syncScreenButton.Name = "syncScreenButton";
ConfigureButton(syncScreenButton, 893, 736, 92, 149, ConfigureButton(syncScreenButton, 893, 736, 92, 149,
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_同步畫面.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_同步畫面.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_同步畫面.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_同步畫面.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_同步畫面.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_同步畫面.png")),
SyncScreenButton_Click); SyncScreenButton_Click);
toggleLightButton = new Button { Text = "" }; toggleLightButton = new Button { Text = "" };
toggleLightButton.Name = "toggleLightButton"; toggleLightButton.Name = "toggleLightButton";
ConfigureButton(toggleLightButton, 1002, 736, 92, 149, ConfigureButton(toggleLightButton, 1002, 736, 92, 149,
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_燈光控制.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_燈光控制.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_燈光控制.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_燈光控制.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_燈光控制.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_燈光控制.png")),
ToggleLightButton_Click); ToggleLightButton_Click);
btnPreviousPage = new Button { Text = "" }; btnPreviousPage = new Button { Text = "" };
btnPreviousPage.Name = "btnPreviousPageButton"; btnPreviousPage.Name = "btnPreviousPageButton";
ConfigureButton(btnPreviousPage, 1110, 738, 93, 62, ConfigureButton(btnPreviousPage, 1110, 738, 93, 62,
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_上一頁.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_上一頁.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_上一頁.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_上一頁.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_上一頁.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_上一頁.png")),
PreviousPageButton_Click); PreviousPageButton_Click);
btnReturn = new Button { Text = "" }; btnReturn = new Button { Text = "" };
btnReturn.Name = "btnReturn"; btnReturn.Name = "btnReturn";
ConfigureButton(btnReturn, 1220, 738, 93, 62, ConfigureButton(btnReturn, 1220, 738, 93, 62,
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_退出.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_退出.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_退出.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_退出.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_退出.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_退出.png")),
ShouYeButton_Click); ShouYeButton_Click);
btnNextPage = new Button { Text = "" }; btnNextPage = new Button { Text = "" };
btnNextPage.Name = "btnNextPage"; btnNextPage.Name = "btnNextPage";
ConfigureButton(btnNextPage, 1330, 738, 93, 62, ConfigureButton(btnNextPage, 1330, 738, 93, 62,
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_下一頁.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_下一頁.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_下一頁.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_下一頁.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_下一頁.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_下一頁.png")),
NextPageButton_Click); NextPageButton_Click);
btnApplause = new Button { Text = "" }; btnApplause = new Button { Text = "" };
btnApplause.Name = "btnApplause"; btnApplause.Name = "btnApplause";
ConfigureButton(btnApplause, 1110, 823, 93, 62, ConfigureButton(btnApplause, 1110, 823, 93, 62,
new Bitmap(Path.Combine(Application.StartupPath , "themes\\superstar\\button\\1.主類別\\主類別下方_掌聲.png")), new Bitmap(Path.Combine(serverPath , "themes\\superstar\\button\\1.主類別\\主類別下方_掌聲.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_掌聲.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_掌聲.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_掌聲.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_掌聲.png")),
ApplauseButton_Click); ApplauseButton_Click);
btnSimplifiedChinese = new Button { Text = "" }; btnSimplifiedChinese = new Button { Text = "" };
btnSimplifiedChinese.Name = "btnSimplifiedChinese"; btnSimplifiedChinese.Name = "btnSimplifiedChinese";
ConfigureButton(btnSimplifiedChinese, 1330, 823, 93, 62, ConfigureButton(btnSimplifiedChinese, 1330, 823, 93, 62,
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_簡體.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_簡體.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_簡體.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_簡體.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_簡體.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_簡體.png")),
SimplifiedChineseButton_Click); SimplifiedChineseButton_Click);
btnTraditionalChinese = new Button { Text = "" }; btnTraditionalChinese = new Button { Text = "" };
btnTraditionalChinese.Name = "btnTraditionalChinese"; btnTraditionalChinese.Name = "btnTraditionalChinese";
ConfigureButton(btnTraditionalChinese, 1220, 823, 93, 62, ConfigureButton(btnTraditionalChinese, 1220, 823, 93, 62,
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_繁體.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_繁體.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_繁體.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_繁體.png")),
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_繁體.png")), new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別下方_繁體.png")),
TraditionalChineseButton_Click); TraditionalChineseButton_Click);
/* 關閉應用程式按鈕*/ /* 關閉應用程式按鈕*/
@ -1281,7 +1283,7 @@ namespace DualScreenDemo
button = new Button { Text = "", Name = buttonName }; button = new Button { Text = "", Name = buttonName };
ResizeAndPositionButton(button, x, y, width, height); ResizeAndPositionButton(button, x, y, width, height);
Rectangle buttonCropArea = new Rectangle(x, y, width, height); Rectangle buttonCropArea = new Rectangle(x, y, width, height);
normalBackground = new Bitmap(Path.Combine(Application.StartupPath, imagePath)); normalBackground = new Bitmap(Path.Combine(serverPath, imagePath));
activeBackground = mouseDownImage.Clone(buttonCropArea, mouseDownImage.PixelFormat); activeBackground = mouseDownImage.Clone(buttonCropArea, mouseDownImage.PixelFormat);
button.BackgroundImage = normalBackground; button.BackgroundImage = normalBackground;
button.BackgroundImageLayout = ImageLayout.Stretch; button.BackgroundImageLayout = ImageLayout.Stretch;
@ -1334,7 +1336,7 @@ namespace DualScreenDemo
this.DoubleBuffered = true; this.DoubleBuffered = true;
this.SuspendLayout(); this.SuspendLayout();
DrawTextOnVodScreenPictureBox(Path.Combine(Application.StartupPath, @"themes\superstar\button\3.介面\歌曲點播_空白介面.png"), currentSelectedSong); DrawTextOnVodScreenPictureBox(Path.Combine(serverPath, @"themes\superstar\button\3.介面\歌曲點播_空白介面.png"), currentSelectedSong);
SetVodScreenPictureBoxAndButtonsVisibility(true); SetVodScreenPictureBoxAndButtonsVisibility(true);
this.ResumeLayout(true); this.ResumeLayout(true);
} }
@ -1415,85 +1417,85 @@ namespace DualScreenDemo
string selectedThemePath = ReadSelectedThemePath(); string selectedThemePath = ReadSelectedThemePath();
string basePath = Path.Combine(Application.StartupPath, selectedThemePath); string basePath = Path.Combine(serverPath, selectedThemePath);
int targetWidth = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width; int targetWidth = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width;
int targetHeight = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height; int targetHeight = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height;
normalStateImage = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\主畫面\\0.下方選單_主畫面.jpg")); normalStateImage = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\主畫面\\0.下方選單_主畫面.jpg"));
resizedNormalStateImage = ResizeImage(normalStateImage, targetWidth, targetHeight); resizedNormalStateImage = ResizeImage(normalStateImage, targetWidth, targetHeight);
mouseOverImage = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\主畫面\\0.主選單_已按.jpg")); mouseOverImage = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\主畫面\\0.主選單_已按.jpg"));
resizedMouseOverImage = ResizeImage(mouseOverImage, targetWidth, targetHeight); resizedMouseOverImage = ResizeImage(mouseOverImage, targetWidth, targetHeight);
mouseDownImage = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\主畫面\\0.主選單_已按.jpg")); mouseDownImage = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\主畫面\\0.主選單_已按.jpg"));
resizedMouseDownImage = ResizeImage(mouseDownImage, targetWidth, targetHeight); resizedMouseDownImage = ResizeImage(mouseDownImage, targetWidth, targetHeight);
normalStateImageNewSongAlert = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\主畫面\\1.新歌快報_未按.jpg")); normalStateImageNewSongAlert = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\主畫面\\1.新歌快報_未按.jpg"));
resizedNormalStateImageForNewSongAlert = ResizeImage(normalStateImageNewSongAlert, targetWidth, targetHeight); resizedNormalStateImageForNewSongAlert = ResizeImage(normalStateImageNewSongAlert, targetWidth, targetHeight);
mouseOverImageNewSongAlert = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\主畫面\\1.新歌快報_已按.jpg")); mouseOverImageNewSongAlert = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\主畫面\\1.新歌快報_已按.jpg"));
resizedMouseOverImageForNewSongAlert = ResizeImage(mouseOverImageNewSongAlert, targetWidth, targetHeight); resizedMouseOverImageForNewSongAlert = ResizeImage(mouseOverImageNewSongAlert, targetWidth, targetHeight);
mouseDownImageNewSongAlert = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\主畫面\\1.新歌快報_已按.jpg")); mouseDownImageNewSongAlert = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\主畫面\\1.新歌快報_已按.jpg"));
resizedMouseDownImageForNewSongAlert = ResizeImage(mouseDownImageNewSongAlert, targetWidth, targetHeight); resizedMouseDownImageForNewSongAlert = ResizeImage(mouseDownImageNewSongAlert, targetWidth, targetHeight);
normalStateImageArtistQuery = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\主畫面\\3.歌星查詢_未按.jpg")); normalStateImageArtistQuery = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\主畫面\\3.歌星查詢_未按.jpg"));
resizedNormalStateImageForArtistQuery = ResizeImage(normalStateImageArtistQuery, targetWidth, targetHeight); resizedNormalStateImageForArtistQuery = ResizeImage(normalStateImageArtistQuery, targetWidth, targetHeight);
mouseOverImageArtistQuery = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\主畫面\\3.歌星查詢_已按.jpg")); mouseOverImageArtistQuery = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\主畫面\\3.歌星查詢_已按.jpg"));
resizedMouseOverImageForArtistQuery = ResizeImage(mouseOverImageArtistQuery, targetWidth, targetHeight); resizedMouseOverImageForArtistQuery = ResizeImage(mouseOverImageArtistQuery, targetWidth, targetHeight);
mouseDownImageArtistQuery = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\主畫面\\3.歌星查詢_已按.jpg")); mouseDownImageArtistQuery = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\主畫面\\3.歌星查詢_已按.jpg"));
resizedMouseDownImageForArtistQuery = ResizeImage(mouseDownImageArtistQuery, targetWidth, targetHeight); resizedMouseDownImageForArtistQuery = ResizeImage(mouseDownImageArtistQuery, targetWidth, targetHeight);
normalStateImageSongQuery = new Bitmap(Path.Combine(Application.StartupPath , "themes\\superstar\\主畫面\\4.歌名查詢_未按.jpg")); normalStateImageSongQuery = new Bitmap(Path.Combine(serverPath , "themes\\superstar\\主畫面\\4.歌名查詢_未按.jpg"));
resizedNormalStateImageForSongQuery = ResizeImage(normalStateImageSongQuery, targetWidth, targetHeight); resizedNormalStateImageForSongQuery = ResizeImage(normalStateImageSongQuery, targetWidth, targetHeight);
mouseOverImageSongQuery = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\主畫面\\4.歌名查詢_已按.jpg")); mouseOverImageSongQuery = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\主畫面\\4.歌名查詢_已按.jpg"));
resizedMouseOverImageForSongQuery = ResizeImage(mouseOverImageSongQuery, targetWidth, targetHeight); resizedMouseOverImageForSongQuery = ResizeImage(mouseOverImageSongQuery, targetWidth, targetHeight);
mouseDownImageSongQuery = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\主畫面\\4.歌名查詢_已按.jpg")); mouseDownImageSongQuery = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\主畫面\\4.歌名查詢_已按.jpg"));
resizedMouseDownImageForSongQuery = ResizeImage(mouseDownImageSongQuery, targetWidth, targetHeight); resizedMouseDownImageForSongQuery = ResizeImage(mouseDownImageSongQuery, targetWidth, targetHeight);
normalStateImageLanguageQuery = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\主畫面\\5.語別查詢_未按.jpg")); normalStateImageLanguageQuery = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\主畫面\\5.語別查詢_未按.jpg"));
resizedNormalStateImageForLanguageQuery = ResizeImage(normalStateImageLanguageQuery, targetWidth, targetHeight); resizedNormalStateImageForLanguageQuery = ResizeImage(normalStateImageLanguageQuery, targetWidth, targetHeight);
mouseOverImageLanguageQuery = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\主畫面\\5.語別查詢_已按.jpg")); mouseOverImageLanguageQuery = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\主畫面\\5.語別查詢_已按.jpg"));
resizedMouseOverImageForLanguageQuery = ResizeImage(mouseOverImageLanguageQuery, targetWidth, targetHeight); resizedMouseOverImageForLanguageQuery = ResizeImage(mouseOverImageLanguageQuery, targetWidth, targetHeight);
mouseDownImageLanguageQuery = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\主畫面\\5.語別查詢_已按.jpg")); mouseDownImageLanguageQuery = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\主畫面\\5.語別查詢_已按.jpg"));
resizedMouseDownImageForLanguageQuery = ResizeImage(mouseDownImageLanguageQuery, targetWidth, targetHeight); resizedMouseDownImageForLanguageQuery = ResizeImage(mouseDownImageLanguageQuery, targetWidth, targetHeight);
normalStateImageCategoryQuery = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\主畫面\\7.類別查詢_未按.jpg")); normalStateImageCategoryQuery = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\主畫面\\7.類別查詢_未按.jpg"));
resizedNormalStateImageForCategoryQuery = ResizeImage(normalStateImageCategoryQuery, targetWidth, targetHeight); resizedNormalStateImageForCategoryQuery = ResizeImage(normalStateImageCategoryQuery, targetWidth, targetHeight);
mouseOverImageCategoryQuery = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\主畫面\\7.類別查詢_已按.jpg")); mouseOverImageCategoryQuery = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\主畫面\\7.類別查詢_已按.jpg"));
resizedMouseOverImageForCategoryQuery = ResizeImage(mouseOverImageCategoryQuery, targetWidth, targetHeight); resizedMouseOverImageForCategoryQuery = ResizeImage(mouseOverImageCategoryQuery, targetWidth, targetHeight);
mouseDownImageCategoryQuery = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\主畫面\\7.類別查詢_已按.jpg")); mouseDownImageCategoryQuery = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\主畫面\\7.類別查詢_已按.jpg"));
resizedMouseDownImageForCategoryQuery = ResizeImage(mouseDownImageCategoryQuery, targetWidth, targetHeight); resizedMouseDownImageForCategoryQuery = ResizeImage(mouseDownImageCategoryQuery, targetWidth, targetHeight);
normalStateImageForPromotionsAndMenu = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\主畫面\\555021.jpg")); normalStateImageForPromotionsAndMenu = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\主畫面\\555021.jpg"));
resizedNormalStateImageForPromotionsAndMenu = ResizeImage(normalStateImageForPromotionsAndMenu, targetWidth, targetHeight); resizedNormalStateImageForPromotionsAndMenu = ResizeImage(normalStateImageForPromotionsAndMenu, targetWidth, targetHeight);
try try
{ {
string imagePath = Path.Combine(Application.StartupPath, "themes\\superstar\\主畫面\\選單內介面_同步畫面.jpg"); string imagePath = Path.Combine(serverPath, "themes\\superstar\\主畫面\\選單內介面_同步畫面.jpg");
if (File.Exists(imagePath)) if (File.Exists(imagePath))
{ {
@ -1513,17 +1515,17 @@ namespace DualScreenDemo
} }
normalStateImageForSceneSoundEffects = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\主畫面\\555022.jpg")); normalStateImageForSceneSoundEffects = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\主畫面\\555022.jpg"));
resizedNormalStateImageForSceneSoundEffects = ResizeImage(normalStateImageForSceneSoundEffects, targetWidth, targetHeight); resizedNormalStateImageForSceneSoundEffects = ResizeImage(normalStateImageForSceneSoundEffects, targetWidth, targetHeight);
normalStateImageHotSong = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\主畫面\\2.熱門排行_未按.jpg")); normalStateImageHotSong = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\主畫面\\2.熱門排行_未按.jpg"));
resizedNormalStateImageForHotSong = ResizeImage(normalStateImageHotSong, targetWidth, targetHeight); resizedNormalStateImageForHotSong = ResizeImage(normalStateImageHotSong, targetWidth, targetHeight);
mouseDownImageHotSong = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\主畫面\\2.熱門排行_已按.jpg")); mouseDownImageHotSong = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\主畫面\\2.熱門排行_已按.jpg"));
resizedMouseDownImageForHotSong = ResizeImage(mouseDownImageHotSong, targetWidth, targetHeight); resizedMouseDownImageForHotSong = ResizeImage(mouseDownImageHotSong, targetWidth, targetHeight);
normalStateImageForLightControl = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\主畫面\\選單內介面_燈光控制.jpg")); normalStateImageForLightControl = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\主畫面\\選單內介面_燈光控制.jpg"));
resizedNormalStateImageForLightControl = ResizeImage(normalStateImageForLightControl, targetWidth, targetHeight); resizedNormalStateImageForLightControl = ResizeImage(normalStateImageForLightControl, targetWidth, targetHeight);
} }
@ -1668,7 +1670,7 @@ namespace DualScreenDemo
orderedSongsButton.BackgroundImage = orderedSongsNormalBackground; orderedSongsButton.BackgroundImage = orderedSongsNormalBackground;
myFavoritesButton.BackgroundImage = myFavoritesNormalBackground; myFavoritesButton.BackgroundImage = myFavoritesNormalBackground;
promotionsButton.BackgroundImage = promotionsNormalBackground; promotionsButton.BackgroundImage = promotionsNormalBackground;
deliciousFoodButton.BackgroundImage = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別上方_美味菜單(已按).png")); deliciousFoodButton.BackgroundImage = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別上方_美味菜單(已按).png"));
isOnOrderedSongsPage = false; isOnOrderedSongsPage = false;
SetHotSongButtonsVisibility(false); SetHotSongButtonsVisibility(false);
@ -2150,7 +2152,7 @@ namespace DualScreenDemo
try try
{ {
string filePath = Path.Combine(Application.StartupPath, "themes", "superstar", "ButtonImages", imageName); string filePath = Path.Combine(serverPath, "themes", "superstar", "ButtonImages", imageName);
if (File.Exists(filePath)) if (File.Exists(filePath))
{ {
return Image.FromFile(filePath); return Image.FromFile(filePath);
@ -2174,7 +2176,7 @@ namespace DualScreenDemo
try try
{ {
string filePath = Path.Combine(Application.StartupPath, "themes\\superstar\\主畫面\\選單內介面_送客畫面.jpg"); string filePath = Path.Combine(serverPath, "themes\\superstar\\主畫面\\選單內介面_送客畫面.jpg");
if (File.Exists(filePath)) if (File.Exists(filePath))
{ {
return Image.FromFile(filePath); return Image.FromFile(filePath);
@ -2226,7 +2228,7 @@ namespace DualScreenDemo
languageSearchButton.BackgroundImage = languageSearchNormalBackground; languageSearchButton.BackgroundImage = languageSearchNormalBackground;
groupSearchButton.BackgroundImage = groupSearchNormalBackground; groupSearchButton.BackgroundImage = groupSearchNormalBackground;
categorySearchButton.BackgroundImage = categorySearchNormalBackground; categorySearchButton.BackgroundImage = categorySearchNormalBackground;
orderedSongsButton.BackgroundImage = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別上方_已點歌曲(已按).png")); orderedSongsButton.BackgroundImage = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別上方_已點歌曲(已按).png"));
myFavoritesButton.BackgroundImage = myFavoritesNormalBackground; myFavoritesButton.BackgroundImage = myFavoritesNormalBackground;
promotionsButton.BackgroundImage = promotionsNormalBackground; promotionsButton.BackgroundImage = promotionsNormalBackground;
deliciousFoodButton.BackgroundImage = deliciousFoodNormalBackground; deliciousFoodButton.BackgroundImage = deliciousFoodNormalBackground;

View File

@ -52,10 +52,10 @@ namespace DualScreenDemo
var configData = LoadConfigData(); var configData = LoadConfigData();
// 取得「注音歌手圖片」的完整路徑 // 取得「注音歌手圖片」的完整路徑
string imagePath = Path.Combine(Application.StartupPath, configData["ImagePaths"]["ZhuYinSingers"]); string imagePath = Path.Combine(serverPath, configData["ImagePaths"]["ZhuYinSingers"]);
// 在 PictureBox 中顯示對應的「注音歌手」圖片 // 在 PictureBox 中顯示對應的「注音歌手」圖片
ShowImageOnPictureBoxZhuYinSingers(Path.Combine(Application.StartupPath, imagePath)); ShowImageOnPictureBoxZhuYinSingers(Path.Combine(serverPath, imagePath));
// 設定不同搜尋模式的 UI 控件可見性 // 設定不同搜尋模式的 UI 控件可見性
SetEnglishSingersAndButtonsVisibility(false); // 隱藏英文字母搜尋相關控件 SetEnglishSingersAndButtonsVisibility(false); // 隱藏英文字母搜尋相關控件
@ -274,7 +274,7 @@ namespace DualScreenDemo
phoneticButtonsForSingers[index] = new Button phoneticButtonsForSingers[index] = new Button
{ {
Name = $"phoneticButton_{phoneticSymbols[index]}", // 按鈕名稱設為語音符號名稱 Name = $"phoneticButton_{phoneticSymbols[index]}", // 按鈕名稱設為語音符號名稱
BackgroundImage = Image.FromFile(Path.Combine(Application.StartupPath, normalImagePath)), // 設定背景圖片 BackgroundImage = Image.FromFile(Path.Combine(serverPath, normalImagePath)), // 設定背景圖片
BackgroundImageLayout = ImageLayout.Stretch, // 設定圖片拉伸樣式 BackgroundImageLayout = ImageLayout.Stretch, // 設定圖片拉伸樣式
FlatStyle = FlatStyle.Flat, // 設定為平面風格 FlatStyle = FlatStyle.Flat, // 設定為平面風格
FlatAppearance = { BorderSize = 0 } // 設定無邊框 FlatAppearance = { BorderSize = 0 } // 設定無邊框
@ -285,9 +285,9 @@ namespace DualScreenDemo
phoneticButtonCoords[index].Width, phoneticButtonCoords[index].Height); phoneticButtonCoords[index].Width, phoneticButtonCoords[index].Height);
// 從檔案中讀取正常、點擊和滑鼠懸停狀態的圖片 // 從檔案中讀取正常、點擊和滑鼠懸停狀態的圖片
Image normalImage = Image.FromFile(Path.Combine(Application.StartupPath, normalImagePath)); Image normalImage = Image.FromFile(Path.Combine(serverPath, normalImagePath));
Image mouseDownImage = Image.FromFile(Path.Combine(Application.StartupPath, mouseDownImagePath)); Image mouseDownImage = Image.FromFile(Path.Combine(serverPath, mouseDownImagePath));
Image mouseOverImage = Image.FromFile(Path.Combine(Application.StartupPath, mouseOverImagePath)); Image mouseOverImage = Image.FromFile(Path.Combine(serverPath, mouseOverImagePath));
// 設置滑鼠事件:點擊、進入、離開等,改變按鈕的背景圖片 // 設置滑鼠事件:點擊、進入、離開等,改變按鈕的背景圖片
phoneticButtonsForSingers[index].MouseDown += (s, e) => phoneticButtonsForSingers[index].BackgroundImage = mouseDownImage; phoneticButtonsForSingers[index].MouseDown += (s, e) => phoneticButtonsForSingers[index].BackgroundImage = mouseDownImage;
@ -559,17 +559,17 @@ namespace DualScreenDemo
FlatStyle = FlatStyle.Flat, FlatStyle = FlatStyle.Flat,
FlatAppearance = { BorderSize = 0, MouseDownBackColor = Color.Transparent, MouseOverBackColor = Color.Transparent }, FlatAppearance = { BorderSize = 0, MouseDownBackColor = Color.Transparent, MouseOverBackColor = Color.Transparent },
BackgroundImageLayout = ImageLayout.Stretch, BackgroundImageLayout = ImageLayout.Stretch,
BackgroundImage = Image.FromFile(Path.Combine(Application.StartupPath, normalImagePath)) BackgroundImage = Image.FromFile(Path.Combine(serverPath, normalImagePath))
}; };
// 設定按鈕的大小和位置 // 設定按鈕的大小和位置
ResizeAndPositionButton(button, coords.X, coords.Y, coords.Width, coords.Height); ResizeAndPositionButton(button, coords.X, coords.Y, coords.Width, coords.Height);
// 設定鼠標事件:進入、離開、按下、放開 // 設定鼠標事件:進入、離開、按下、放開
button.MouseEnter += (sender, e) => button.BackgroundImage = Image.FromFile(Path.Combine(Application.StartupPath, mouseOverImagePath)); button.MouseEnter += (sender, e) => button.BackgroundImage = Image.FromFile(Path.Combine(serverPath, mouseOverImagePath));
button.MouseLeave += (sender, e) => button.BackgroundImage = Image.FromFile(Path.Combine(Application.StartupPath, normalImagePath)); button.MouseLeave += (sender, e) => button.BackgroundImage = Image.FromFile(Path.Combine(serverPath, normalImagePath));
button.MouseDown += (sender, e) => button.BackgroundImage = Image.FromFile(Path.Combine(Application.StartupPath, mouseDownImagePath)); button.MouseDown += (sender, e) => button.BackgroundImage = Image.FromFile(Path.Combine(serverPath, mouseDownImagePath));
button.MouseUp += (sender, e) => button.BackgroundImage = Image.FromFile(Path.Combine(Application.StartupPath, normalImagePath)); button.MouseUp += (sender, e) => button.BackgroundImage = Image.FromFile(Path.Combine(serverPath, normalImagePath));
// 註冊點擊事件處理 // 註冊點擊事件處理
button.Click += clickEventHandler; button.Click += clickEventHandler;

View File

@ -32,9 +32,9 @@ namespace DualScreenDemo
var configData = LoadConfigData(); var configData = LoadConfigData();
string imagePath = Path.Combine(Application.StartupPath, configData["ImagePaths"]["EnglishSingers"]); string imagePath = Path.Combine(serverPath, configData["ImagePaths"]["EnglishSingers"]);
ShowImageOnPictureBoxEnglishSingers(Path.Combine(Application.StartupPath, imagePath)); ShowImageOnPictureBoxEnglishSingers(Path.Combine(serverPath, imagePath));
SetZhuYinSingersAndButtonsVisibility(false); SetZhuYinSingersAndButtonsVisibility(false);
SetPinYinSingersAndButtonsVisibility(false); SetPinYinSingersAndButtonsVisibility(false);
@ -76,15 +76,15 @@ namespace DualScreenDemo
FlatStyle = FlatStyle.Flat, FlatStyle = FlatStyle.Flat,
FlatAppearance = { BorderSize = 0, MouseDownBackColor = Color.Transparent, MouseOverBackColor = Color.Transparent }, FlatAppearance = { BorderSize = 0, MouseDownBackColor = Color.Transparent, MouseOverBackColor = Color.Transparent },
BackgroundImageLayout = ImageLayout.Stretch, BackgroundImageLayout = ImageLayout.Stretch,
BackgroundImage = Image.FromFile(Path.Combine(Application.StartupPath, normalImagePath)) BackgroundImage = Image.FromFile(Path.Combine(serverPath, normalImagePath))
}; };
ResizeAndPositionButton(button, coords.X, coords.Y, coords.Width, coords.Height); ResizeAndPositionButton(button, coords.X, coords.Y, coords.Width, coords.Height);
button.MouseEnter += (sender, e) => button.BackgroundImage = Image.FromFile(Path.Combine(Application.StartupPath, mouseOverImagePath)); button.MouseEnter += (sender, e) => button.BackgroundImage = Image.FromFile(Path.Combine(serverPath, mouseOverImagePath));
button.MouseLeave += (sender, e) => button.BackgroundImage = Image.FromFile(Path.Combine(Application.StartupPath, normalImagePath)); button.MouseLeave += (sender, e) => button.BackgroundImage = Image.FromFile(Path.Combine(serverPath, normalImagePath));
button.MouseDown += (sender, e) => button.BackgroundImage = Image.FromFile(Path.Combine(Application.StartupPath, mouseDownImagePath)); button.MouseDown += (sender, e) => button.BackgroundImage = Image.FromFile(Path.Combine(serverPath, mouseDownImagePath));
button.MouseUp += (sender, e) => button.BackgroundImage = Image.FromFile(Path.Combine(Application.StartupPath, normalImagePath)); button.MouseUp += (sender, e) => button.BackgroundImage = Image.FromFile(Path.Combine(serverPath, normalImagePath));
button.Click += clickEventHandler; button.Click += clickEventHandler;

View File

@ -35,9 +35,9 @@ namespace DualScreenDemo
var configData = LoadConfigData(); var configData = LoadConfigData();
string handWritingImagePath = Path.Combine(Application.StartupPath, configData["ImagePaths"]["HandWritingSingers"]); string handWritingImagePath = Path.Combine(serverPath, configData["ImagePaths"]["HandWritingSingers"]);
ShowImageOnPictureBoxHandWritingSingers(Path.Combine(Application.StartupPath, handWritingImagePath)); ShowImageOnPictureBoxHandWritingSingers(Path.Combine(serverPath, handWritingImagePath));
SetZhuYinSingersAndButtonsVisibility(false); SetZhuYinSingersAndButtonsVisibility(false);
SetEnglishSingersAndButtonsVisibility(false); SetEnglishSingersAndButtonsVisibility(false);
SetPinYinSingersAndButtonsVisibility(false); SetPinYinSingersAndButtonsVisibility(false);

View File

@ -28,9 +28,9 @@ namespace DualScreenDemo
var configData = LoadConfigData(); var configData = LoadConfigData();
string pinyinImagePath = Path.Combine(Application.StartupPath, configData["ImagePaths"]["PinYinSingers"]); string pinyinImagePath = Path.Combine(serverPath, configData["ImagePaths"]["PinYinSingers"]);
ShowImageOnPictureBoxPinYinSingers(Path.Combine(Application.StartupPath, pinyinImagePath)); ShowImageOnPictureBoxPinYinSingers(Path.Combine(serverPath, pinyinImagePath));

View File

@ -72,10 +72,10 @@ namespace DualScreenDemo
var configData = LoadConfigDataforWordCountSingers(); var configData = LoadConfigDataforWordCountSingers();
// 取得「字數歌手圖片」的完整路徑 // 取得「字數歌手圖片」的完整路徑
string imagePath = Path.Combine(Application.StartupPath, configData["ImagePaths"]["WordCountSingers"]); string imagePath = Path.Combine(serverPath, configData["ImagePaths"]["WordCountSingers"]);
// 在 PictureBox 中顯示對應的「字數歌手」圖片 // 在 PictureBox 中顯示對應的「字數歌手」圖片
ShowImageOnPictureBoxWordCountSingers(Path.Combine(Application.StartupPath, imagePath)); ShowImageOnPictureBoxWordCountSingers(Path.Combine(serverPath, imagePath));
// 設定不同搜尋模式的 UI 控件可見性 // 設定不同搜尋模式的 UI 控件可見性
SetZhuYinSingersAndButtonsVisibility(false); // 隱藏注音搜尋相關控件 SetZhuYinSingersAndButtonsVisibility(false); // 隱藏注音搜尋相關控件
@ -291,7 +291,7 @@ namespace DualScreenDemo
numberWordCountButtonsForSingers[index] = new Button numberWordCountButtonsForSingers[index] = new Button
{ {
Name = $"numberWordCountButton_{numberWordCountSymbols[index]}", // 按鈕名稱設為語音符號名稱 Name = $"numberWordCountButton_{numberWordCountSymbols[index]}", // 按鈕名稱設為語音符號名稱
BackgroundImage = Image.FromFile(Path.Combine(Application.StartupPath, normalImagePath)), // 設定背景圖片 BackgroundImage = Image.FromFile(Path.Combine(serverPath, normalImagePath)), // 設定背景圖片
BackgroundImageLayout = ImageLayout.Stretch, // 設定圖片拉伸樣式 BackgroundImageLayout = ImageLayout.Stretch, // 設定圖片拉伸樣式
FlatStyle = FlatStyle.Flat, // 設定為平面風格 FlatStyle = FlatStyle.Flat, // 設定為平面風格
FlatAppearance = { BorderSize = 0 } // 設定無邊框 FlatAppearance = { BorderSize = 0 } // 設定無邊框
@ -302,9 +302,9 @@ namespace DualScreenDemo
numberWordCountButtonCoords[index].Width, numberWordCountButtonCoords[index].Height); numberWordCountButtonCoords[index].Width, numberWordCountButtonCoords[index].Height);
// 從檔案中讀取正常、點擊和滑鼠懸停狀態的圖片 // 從檔案中讀取正常、點擊和滑鼠懸停狀態的圖片
Image normalImage = Image.FromFile(Path.Combine(Application.StartupPath, normalImagePath)); Image normalImage = Image.FromFile(Path.Combine(serverPath, normalImagePath));
Image mouseDownImage = Image.FromFile(Path.Combine(Application.StartupPath, mouseDownImagePath)); Image mouseDownImage = Image.FromFile(Path.Combine(serverPath, mouseDownImagePath));
Image mouseOverImage = Image.FromFile(Path.Combine(Application.StartupPath, mouseOverImagePath)); Image mouseOverImage = Image.FromFile(Path.Combine(serverPath, mouseOverImagePath));
// 設置滑鼠事件:點擊、進入、離開等,改變按鈕的背景圖片 // 設置滑鼠事件:點擊、進入、離開等,改變按鈕的背景圖片
numberWordCountButtonsForSingers[index].MouseDown += (s, e) => numberWordCountButtonsForSingers[index].BackgroundImage = mouseDownImage; numberWordCountButtonsForSingers[index].MouseDown += (s, e) => numberWordCountButtonsForSingers[index].BackgroundImage = mouseDownImage;
@ -601,17 +601,17 @@ namespace DualScreenDemo
FlatStyle = FlatStyle.Flat, FlatStyle = FlatStyle.Flat,
FlatAppearance = { BorderSize = 0, MouseDownBackColor = Color.Transparent, MouseOverBackColor = Color.Transparent }, FlatAppearance = { BorderSize = 0, MouseDownBackColor = Color.Transparent, MouseOverBackColor = Color.Transparent },
BackgroundImageLayout = ImageLayout.Stretch, BackgroundImageLayout = ImageLayout.Stretch,
BackgroundImage = Image.FromFile(Path.Combine(Application.StartupPath, normalImagePath)) BackgroundImage = Image.FromFile(Path.Combine(serverPath, normalImagePath))
}; };
// 設定按鈕的大小和位置 // 設定按鈕的大小和位置
ResizeAndPositionButton(button, coords.X, coords.Y, coords.Width, coords.Height); ResizeAndPositionButton(button, coords.X, coords.Y, coords.Width, coords.Height);
// 設定鼠標事件:進入、離開、按下、放開 // 設定鼠標事件:進入、離開、按下、放開
button.MouseEnter += (sender, e) => button.BackgroundImage = Image.FromFile(Path.Combine(Application.StartupPath, mouseOverImagePath)); button.MouseEnter += (sender, e) => button.BackgroundImage = Image.FromFile(Path.Combine(serverPath, mouseOverImagePath));
button.MouseLeave += (sender, e) => button.BackgroundImage = Image.FromFile(Path.Combine(Application.StartupPath, normalImagePath)); button.MouseLeave += (sender, e) => button.BackgroundImage = Image.FromFile(Path.Combine(serverPath, normalImagePath));
button.MouseDown += (sender, e) => button.BackgroundImage = Image.FromFile(Path.Combine(Application.StartupPath, mouseDownImagePath)); button.MouseDown += (sender, e) => button.BackgroundImage = Image.FromFile(Path.Combine(serverPath, mouseDownImagePath));
button.MouseUp += (sender, e) => button.BackgroundImage = Image.FromFile(Path.Combine(Application.StartupPath, normalImagePath)); button.MouseUp += (sender, e) => button.BackgroundImage = Image.FromFile(Path.Combine(serverPath, normalImagePath));
// 註冊點擊事件處理 // 註冊點擊事件處理
button.Click += clickEventHandler; button.Click += clickEventHandler;

View File

@ -4,31 +4,35 @@ namespace DualScreenDemo
{ {
public partial class PrimaryForm public partial class PrimaryForm
{ {
private Button zhuyinSearchButton; private Button zhuyinSearchButton;
private Bitmap zhuyinSearchNormalBackground =new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\3.歌星查詢_注音查詢(未按).png")); private Bitmap zhuyinSearchNormalBackground;
private Bitmap zhuyinSearchActiveBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\3.歌星查詢_注音查詢(已按).png")); private Bitmap zhuyinSearchActiveBackground;
private Button englishSearchButton; private Button englishSearchButton;
private Bitmap englishSearchNormalBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\3.歌星查詢_英文查詢(未按).png")); private Bitmap englishSearchNormalBackground;
private Bitmap englishSearchActiveBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\3.歌星查詢_英文查詢(已按).png")); private Bitmap englishSearchActiveBackground;
private Button pinyinSearchButton; private Button pinyinSearchButton;
private Bitmap pinyinSearchNormalBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\3.歌星查詢_拼音查詢(未按).png")); private Bitmap pinyinSearchNormalBackground;
private Bitmap pinyinSearchActiveBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\3.歌星查詢_拼音查詢(已按).png")); private Bitmap pinyinSearchActiveBackground;
private Button wordCountSearchButton; private Button wordCountSearchButton;
private Bitmap wordCountSearchNormalBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\3.歌星查詢_字數查詢(未按).png")); private Bitmap wordCountSearchNormalBackground;
private Bitmap wordCountSearchActiveBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\3.歌星查詢_字數查詢(已按).png")); private Bitmap wordCountSearchActiveBackground;
private Button handWritingSearchButton; private Button handWritingSearchButton;
private Bitmap handWritingSearchNormalBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\3.歌星查詢_手寫查詢(未按).png")); private Bitmap handWritingSearchNormalBackground;
private Bitmap handWritingSearchActiveBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\3.歌星查詢_手寫查詢(已按).png")); private Bitmap handWritingSearchActiveBackground;
private void SingerSearchButton_Click(object sender, EventArgs e) private void SingerSearchButton_Click(object sender, EventArgs e)
{ {
newSongAlertButton.BackgroundImage = newSongAlertNormalBackground; newSongAlertButton.BackgroundImage = newSongAlertNormalBackground;
hotPlayButton.BackgroundImage = hotPlayNormalBackground; hotPlayButton.BackgroundImage = hotPlayNormalBackground;
//singerSearchButton.BackgroundImage = singerSearchActiveBackground; //singerSearchButton.BackgroundImage = singerSearchActiveBackground;
singerSearchButton.BackgroundImage =new Bitmap (Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別上方_歌星查詢(已按).png")); ; singerSearchButton.BackgroundImage = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別上方_歌星查詢(已按).png")); ;
songSearchButton.BackgroundImage = songSearchNormalBackground; songSearchButton.BackgroundImage = songSearchNormalBackground;
languageSearchButton.BackgroundImage = languageSearchNormalBackground; languageSearchButton.BackgroundImage = languageSearchNormalBackground;
groupSearchButton.BackgroundImage = groupSearchNormalBackground; groupSearchButton.BackgroundImage = groupSearchNormalBackground;
@ -42,14 +46,14 @@ namespace DualScreenDemo
ResetinputBox(); ResetinputBox();
string query = $"SELECT * FROM artists WHERE category = '男' LIMIT 1000 ;"; string query = $"SELECT * FROM artists WHERE category = '男' LIMIT 1000 ;";
var searchResult = SearchSingers_Mysql(query); var searchResult = SearchSingers_Mysql(query);
currentPage = 0; currentPage = 0;
currentArtistList = searchResult; currentArtistList = searchResult;
totalPages = (int)Math.Ceiling((double)searchResult.Count / itemsPerPage); totalPages = (int)Math.Ceiling((double)searchResult.Count / itemsPerPage);
multiPagePanel.currentPageIndex = 0; multiPagePanel.currentPageIndex = 0;
multiPagePanel.LoadSingers(currentArtistList); multiPagePanel.LoadSingers(currentArtistList);
SetHotSongButtonsVisibility(false); SetHotSongButtonsVisibility(false);
SetNewSongButtonsVisibility(false); SetNewSongButtonsVisibility(false);
SetSongSearchButtonsVisibility(false); SetSongSearchButtonsVisibility(false);
@ -66,14 +70,14 @@ namespace DualScreenDemo
SetPictureBoxSceneSoundEffectsAndButtonsVisibility(false); SetPictureBoxSceneSoundEffectsAndButtonsVisibility(false);
SetSingerSearchButtonsVisibility(true); SetSingerSearchButtonsVisibility(true);
if (pictureBoxQRCode != null) if (pictureBoxQRCode != null)
{ {
pictureBoxQRCode.Visible = false; pictureBoxQRCode.Visible = false;
closeQRCodeButton.Visible = false; closeQRCodeButton.Visible = false;
} }
} }
private void SetSingerSearchButtonsVisibility(bool isVisible) private void SetSingerSearchButtonsVisibility(bool isVisible)
{ {
Button[] singerSearchButtons = { zhuyinSearchButton, englishSearchButton, pinyinSearchButton, wordCountSearchButton, handWritingSearchButton }; Button[] singerSearchButtons = { zhuyinSearchButton, englishSearchButton, pinyinSearchButton, wordCountSearchButton, handWritingSearchButton };
@ -90,13 +94,25 @@ namespace DualScreenDemo
private void InitializeButtonsForSingerSearch() private void InitializeButtonsForSingerSearch()
{ {
zhuyinSearchNormalBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\3.歌星查詢_注音查詢(未按).png"));
zhuyinSearchActiveBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\3.歌星查詢_注音查詢(已按).png")); ;
englishSearchNormalBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\3.歌星查詢_英文查詢(未按).png"));
englishSearchActiveBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\3.歌星查詢_英文查詢(已按).png"));
pinyinSearchNormalBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\3.歌星查詢_拼音查詢(未按).png"));
pinyinSearchActiveBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\3.歌星查詢_拼音查詢(已按).png"));
wordCountSearchNormalBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\3.歌星查詢_字數查詢(未按).png"));
wordCountSearchActiveBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\3.歌星查詢_字數查詢(已按).png"));
handWritingSearchNormalBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\3.歌星查詢_手寫查詢(未按).png"));
handWritingSearchActiveBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\3.歌星查詢_手寫查詢(已按).png"));
InitializeSearchButton(ref zhuyinSearchButton, "zhuyinSearchButton", 1197, 225, 225, 50, ref zhuyinSearchNormalBackground, ref zhuyinSearchActiveBackground, normalStateImageArtistQuery, mouseDownImageArtistQuery, ZhuyinSearchSingersButton_Click); InitializeSearchButton(ref zhuyinSearchButton, "zhuyinSearchButton", 1197, 225, 225, 50, ref zhuyinSearchNormalBackground, ref zhuyinSearchActiveBackground, normalStateImageArtistQuery, mouseDownImageArtistQuery, ZhuyinSearchSingersButton_Click);
InitializeSearchButton(ref englishSearchButton, "englishSearchButton", 1197, 280, 225, 50, ref englishSearchNormalBackground, ref englishSearchActiveBackground, normalStateImageArtistQuery, mouseDownImageArtistQuery, EnglishSearchSingersButton_Click); InitializeSearchButton(ref englishSearchButton, "englishSearchButton", 1197, 280, 225, 50, ref englishSearchNormalBackground, ref englishSearchActiveBackground, normalStateImageArtistQuery, mouseDownImageArtistQuery, EnglishSearchSingersButton_Click);
InitializeSearchButton(ref pinyinSearchButton, "pinyinSearchButton", 1197, 335, 225, 50, ref pinyinSearchNormalBackground, ref pinyinSearchActiveBackground, normalStateImageArtistQuery, mouseDownImageArtistQuery, PinyinSingerSearchButton_Click); InitializeSearchButton(ref pinyinSearchButton, "pinyinSearchButton", 1197, 335, 225, 50, ref pinyinSearchNormalBackground, ref pinyinSearchActiveBackground, normalStateImageArtistQuery, mouseDownImageArtistQuery, PinyinSingerSearchButton_Click);
InitializeSearchButton(ref wordCountSearchButton, "workCountSearchButton", 1197, 390, 225, 50, ref wordCountSearchNormalBackground, ref wordCountSearchActiveBackground, normalStateImageArtistQuery, mouseDownImageArtistQuery, WordCountSearchSingersButton_Click); InitializeSearchButton(ref wordCountSearchButton, "workCountSearchButton", 1197, 390, 225, 50, ref wordCountSearchNormalBackground, ref wordCountSearchActiveBackground, normalStateImageArtistQuery, mouseDownImageArtistQuery, WordCountSearchSingersButton_Click);
@ -114,7 +130,7 @@ namespace DualScreenDemo
button.BackgroundImage = normalBackground; button.BackgroundImage = normalBackground;
button.BackgroundImageLayout = ImageLayout.Stretch; button.BackgroundImageLayout = ImageLayout.Stretch;
button.FlatStyle = FlatStyle.Flat; button.FlatStyle = FlatStyle.Flat;
button.FlatAppearance.BorderSize = 0; button.FlatAppearance.BorderSize = 0;
button.Click += clickEventHandler; button.Click += clickEventHandler;
this.Controls.Add(button); this.Controls.Add(button);
} }

View File

@ -32,9 +32,9 @@ namespace DualScreenDemo
// 讀取 config.ini 並獲取注音圖片的路徑 // 讀取 config.ini 並獲取注音圖片的路徑
var configData = LoadConfigData(); var configData = LoadConfigData();
string imagePath = Path.Combine(Application.StartupPath, configData["ImagePaths"]["ZhuYinSongs"]); string imagePath = Path.Combine(serverPath, configData["ImagePaths"]["ZhuYinSongs"]);
//顯示注音歌曲圖片 //顯示注音歌曲圖片
ShowImageOnPictureBoxZhuYinSongs(Path.Combine(Application.StartupPath, imagePath)); ShowImageOnPictureBoxZhuYinSongs(Path.Combine(serverPath, imagePath));
//設定不同模式的UI顯示 //設定不同模式的UI顯示
@ -104,7 +104,7 @@ namespace DualScreenDemo
phoneticButtonsForSongs[index] = new Button phoneticButtonsForSongs[index] = new Button
{ {
Name = $"phoneticButton_{phoneticSymbols[index]}", // 設定按鈕名稱,方便識別 Name = $"phoneticButton_{phoneticSymbols[index]}", // 設定按鈕名稱,方便識別
BackgroundImage = Image.FromFile(Path.Combine(Application.StartupPath, normalImagePath)), // 設定預設背景圖 BackgroundImage = Image.FromFile(Path.Combine(serverPath, normalImagePath)), // 設定預設背景圖
BackgroundImageLayout = ImageLayout.Stretch, // 背景圖自動填滿按鈕 BackgroundImageLayout = ImageLayout.Stretch, // 背景圖自動填滿按鈕
FlatStyle = FlatStyle.Flat, // 設定按鈕為扁平樣式 FlatStyle = FlatStyle.Flat, // 設定按鈕為扁平樣式
FlatAppearance = { BorderSize = 0 } // 移除按鈕的邊框 FlatAppearance = { BorderSize = 0 } // 移除按鈕的邊框
@ -120,9 +120,9 @@ namespace DualScreenDemo
); );
// 3. 載入三種狀態的圖片 // 3. 載入三種狀態的圖片
Image normalImage = Image.FromFile(Path.Combine(Application.StartupPath, normalImagePath)); Image normalImage = Image.FromFile(Path.Combine(serverPath, normalImagePath));
Image mouseDownImage = Image.FromFile(Path.Combine(Application.StartupPath, mouseDownImagePath)); Image mouseDownImage = Image.FromFile(Path.Combine(serverPath, mouseDownImagePath));
Image mouseOverImage = Image.FromFile(Path.Combine(Application.StartupPath, mouseOverImagePath)); Image mouseOverImage = Image.FromFile(Path.Combine(serverPath, mouseOverImagePath));
// 4. 設定滑鼠事件,改變背景圖 // 4. 設定滑鼠事件,改變背景圖
phoneticButtonsForSongs[index].MouseDown += (s, e) => phoneticButtonsForSongs[index].BackgroundImage = mouseDownImage; phoneticButtonsForSongs[index].MouseDown += (s, e) => phoneticButtonsForSongs[index].BackgroundImage = mouseDownImage;

View File

@ -30,9 +30,9 @@ namespace DualScreenDemo
var configData = LoadConfigData(); var configData = LoadConfigData();
string imagePath = Path.Combine(Application.StartupPath, configData["ImagePaths"]["EnglishSongs"]); string imagePath = Path.Combine(serverPath, configData["ImagePaths"]["EnglishSongs"]);
ShowImageOnPictureBoxEnglishSongs(Path.Combine(Application.StartupPath, imagePath)); ShowImageOnPictureBoxEnglishSongs(Path.Combine(serverPath, imagePath));
// 鍵盤UI介面顯示設定 // 鍵盤UI介面顯示設定
SetWordCountSongsAndButtonsVisibility(false); SetWordCountSongsAndButtonsVisibility(false);
SetEnglishSongsAndButtonsVisibility(true); SetEnglishSongsAndButtonsVisibility(true);

View File

@ -32,9 +32,9 @@ namespace DualScreenDemo
var configData = LoadConfigData(); var configData = LoadConfigData();
string handWritingImagePath = Path.Combine(Application.StartupPath, configData["ImagePaths"]["HandWritingSongs"]); string handWritingImagePath = Path.Combine(serverPath, configData["ImagePaths"]["HandWritingSongs"]);
ShowImageOnPictureBoxHandWritingSongs(Path.Combine(Application.StartupPath, handWritingImagePath)); ShowImageOnPictureBoxHandWritingSongs(Path.Combine(serverPath, handWritingImagePath));
// 鍵盤UI介面顯示設定 // 鍵盤UI介面顯示設定
SetWordCountSongsAndButtonsVisibility(false); SetWordCountSongsAndButtonsVisibility(false);

View File

@ -74,10 +74,10 @@ namespace DualScreenDemo
var configData = LoadConfigData(); var configData = LoadConfigData();
// 取得「注音歌手圖片」的完整路徑 // 取得「注音歌手圖片」的完整路徑
string imagePath = Path.Combine(Application.StartupPath, configData["ImagePaths"]["SongIDSearch"]); string imagePath = Path.Combine(serverPath, configData["ImagePaths"]["SongIDSearch"]);
// 在 PictureBox 中顯示對應的「注音歌手」圖片 // 在 PictureBox 中顯示對應的「注音歌手」圖片
ShowImageOnPictureBoxSongIDSearch(Path.Combine(Application.StartupPath, imagePath)); ShowImageOnPictureBoxSongIDSearch(Path.Combine(serverPath, imagePath));
// 鍵盤UI介面顯示設定 // 鍵盤UI介面顯示設定
SetWordCountSongsAndButtonsVisibility(false); SetWordCountSongsAndButtonsVisibility(false);
@ -270,7 +270,7 @@ namespace DualScreenDemo
numberSongIDButtonsForSongs[index] = new Button numberSongIDButtonsForSongs[index] = new Button
{ {
Name = $"numberSongIDButton_{numberSongIDSymbols[index]}", // 按鈕名稱設為語音符號名稱 Name = $"numberSongIDButton_{numberSongIDSymbols[index]}", // 按鈕名稱設為語音符號名稱
BackgroundImage = Image.FromFile(Path.Combine(Application.StartupPath, normalImagePath)), // 設定背景圖片 BackgroundImage = Image.FromFile(Path.Combine(serverPath, normalImagePath)), // 設定背景圖片
BackgroundImageLayout = ImageLayout.Stretch, // 設定圖片拉伸樣式 BackgroundImageLayout = ImageLayout.Stretch, // 設定圖片拉伸樣式
FlatStyle = FlatStyle.Flat, // 設定為平面風格 FlatStyle = FlatStyle.Flat, // 設定為平面風格
FlatAppearance = { BorderSize = 0 } // 設定無邊框 FlatAppearance = { BorderSize = 0 } // 設定無邊框
@ -281,9 +281,9 @@ namespace DualScreenDemo
numberSongIDButtonCoords[index].Width, numberSongIDButtonCoords[index].Height); numberSongIDButtonCoords[index].Width, numberSongIDButtonCoords[index].Height);
// 從檔案中讀取正常、點擊和滑鼠懸停狀態的圖片 // 從檔案中讀取正常、點擊和滑鼠懸停狀態的圖片
Image normalImage = Image.FromFile(Path.Combine(Application.StartupPath, normalImagePath)); Image normalImage = Image.FromFile(Path.Combine(serverPath, normalImagePath));
Image mouseDownImage = Image.FromFile(Path.Combine(Application.StartupPath, mouseDownImagePath)); Image mouseDownImage = Image.FromFile(Path.Combine(serverPath, mouseDownImagePath));
Image mouseOverImage = Image.FromFile(Path.Combine(Application.StartupPath, mouseOverImagePath)); Image mouseOverImage = Image.FromFile(Path.Combine(serverPath, mouseOverImagePath));
// 設置滑鼠事件:點擊、進入、離開等,改變按鈕的背景圖片 // 設置滑鼠事件:點擊、進入、離開等,改變按鈕的背景圖片
numberSongIDButtonsForSongs[index].MouseDown += (s, e) => numberSongIDButtonsForSongs[index].BackgroundImage = mouseDownImage; numberSongIDButtonsForSongs[index].MouseDown += (s, e) => numberSongIDButtonsForSongs[index].BackgroundImage = mouseDownImage;
@ -580,7 +580,7 @@ namespace DualScreenDemo
this.DoubleBuffered = true; this.DoubleBuffered = true;
this.SuspendLayout(); this.SuspendLayout();
DrawTextOnVodScreenPictureBox(Path.Combine(Application.StartupPath, @"themes\superstar\button\3.介面\歌曲點播_空白介面.png"), currentSelectedSong); DrawTextOnVodScreenPictureBox(Path.Combine(serverPath, @"themes\superstar\button\3.介面\歌曲點播_空白介面.png"), currentSelectedSong);
SetVodScreenPictureBoxAndButtonsVisibility(true); SetVodScreenPictureBoxAndButtonsVisibility(true);
this.ResumeLayout(true); this.ResumeLayout(true);
@ -607,16 +607,16 @@ namespace DualScreenDemo
FlatStyle = FlatStyle.Flat, FlatStyle = FlatStyle.Flat,
FlatAppearance = { BorderSize = 0, MouseDownBackColor = Color.Transparent, MouseOverBackColor = Color.Transparent }, FlatAppearance = { BorderSize = 0, MouseDownBackColor = Color.Transparent, MouseOverBackColor = Color.Transparent },
BackgroundImageLayout = ImageLayout.Stretch, BackgroundImageLayout = ImageLayout.Stretch,
BackgroundImage = Image.FromFile(Path.Combine(Application.StartupPath, normalImagePath)) BackgroundImage = Image.FromFile(Path.Combine(serverPath, normalImagePath))
}; };
// 設定按鈕的大小和位置 // 設定按鈕的大小和位置
ResizeAndPositionButton(button, coords.X, coords.Y, coords.Width, coords.Height); ResizeAndPositionButton(button, coords.X, coords.Y, coords.Width, coords.Height);
// 設定鼠標事件:進入、離開、按下、放開 // 設定鼠標事件:進入、離開、按下、放開
button.MouseEnter += (sender, e) => button.BackgroundImage = Image.FromFile(Path.Combine(Application.StartupPath, mouseOverImagePath)); button.MouseEnter += (sender, e) => button.BackgroundImage = Image.FromFile(Path.Combine(serverPath, mouseOverImagePath));
button.MouseLeave += (sender, e) => button.BackgroundImage = Image.FromFile(Path.Combine(Application.StartupPath, normalImagePath)); button.MouseLeave += (sender, e) => button.BackgroundImage = Image.FromFile(Path.Combine(serverPath, normalImagePath));
button.MouseDown += (sender, e) => button.BackgroundImage = Image.FromFile(Path.Combine(Application.StartupPath, mouseDownImagePath)); button.MouseDown += (sender, e) => button.BackgroundImage = Image.FromFile(Path.Combine(serverPath, mouseDownImagePath));
button.MouseUp += (sender, e) => button.BackgroundImage = Image.FromFile(Path.Combine(Application.StartupPath, normalImagePath)); button.MouseUp += (sender, e) => button.BackgroundImage = Image.FromFile(Path.Combine(serverPath, normalImagePath));
// 註冊點擊事件處理 // 註冊點擊事件處理
button.Click += clickEventHandler; button.Click += clickEventHandler;

View File

@ -31,9 +31,9 @@ namespace DualScreenDemo
// 讀取 config.ini 並獲取拼音圖片的路徑 // 讀取 config.ini 並獲取拼音圖片的路徑
var configData = LoadConfigData(); var configData = LoadConfigData();
string pinyinImagePath = Path.Combine(Application.StartupPath, configData["ImagePaths"]["PinYinSongs"]); string pinyinImagePath = Path.Combine(serverPath, configData["ImagePaths"]["PinYinSongs"]);
// 顯示拼音歌曲圖片 // 顯示拼音歌曲圖片
ShowImageOnPictureBoxPinYinSongs(Path.Combine(Application.StartupPath, pinyinImagePath)); ShowImageOnPictureBoxPinYinSongs(Path.Combine(serverPath, pinyinImagePath));
// 鍵盤UI介面顯示設定 // 鍵盤UI介面顯示設定

View File

@ -40,10 +40,10 @@ namespace DualScreenDemo
var configData = LoadConfigDataforWordCountSongs(); var configData = LoadConfigDataforWordCountSongs();
// 取得「注音歌手圖片」的完整路徑 // 取得「注音歌手圖片」的完整路徑
string imagePath = Path.Combine(Application.StartupPath, configData["ImagePaths"]["WordCountSongs"]); string imagePath = Path.Combine(serverPath, configData["ImagePaths"]["WordCountSongs"]);
// 在 PictureBox 中顯示對應的「注音歌手」圖片 // 在 PictureBox 中顯示對應的「注音歌手」圖片
ShowImageOnPictureBoxWordCountSongs(Path.Combine(Application.StartupPath, imagePath)); ShowImageOnPictureBoxWordCountSongs(Path.Combine(serverPath, imagePath));
// 鍵盤UI介面顯示設定 // 鍵盤UI介面顯示設定
SetWordCountSongsAndButtonsVisibility(true); SetWordCountSongsAndButtonsVisibility(true);
@ -217,7 +217,7 @@ namespace DualScreenDemo
numberWordCountButtonsForSongs[index] = new Button numberWordCountButtonsForSongs[index] = new Button
{ {
Name = $"numberWordCountButton_{numberWordCountSymbols[index]}", // 按鈕名稱設為語音符號名稱 Name = $"numberWordCountButton_{numberWordCountSymbols[index]}", // 按鈕名稱設為語音符號名稱
BackgroundImage = Image.FromFile(Path.Combine(Application.StartupPath, normalImagePath)), // 設定背景圖片 BackgroundImage = Image.FromFile(Path.Combine(serverPath, normalImagePath)), // 設定背景圖片
BackgroundImageLayout = ImageLayout.Stretch, // 設定圖片拉伸樣式 BackgroundImageLayout = ImageLayout.Stretch, // 設定圖片拉伸樣式
FlatStyle = FlatStyle.Flat, // 設定為平面風格 FlatStyle = FlatStyle.Flat, // 設定為平面風格
FlatAppearance = { BorderSize = 0 } // 設定無邊框 FlatAppearance = { BorderSize = 0 } // 設定無邊框
@ -228,9 +228,9 @@ namespace DualScreenDemo
numberWordCountButtonCoords[index].Width, numberWordCountButtonCoords[index].Height); numberWordCountButtonCoords[index].Width, numberWordCountButtonCoords[index].Height);
// 從檔案中讀取正常、點擊和滑鼠懸停狀態的圖片 // 從檔案中讀取正常、點擊和滑鼠懸停狀態的圖片
Image normalImage = Image.FromFile(Path.Combine(Application.StartupPath, normalImagePath)); Image normalImage = Image.FromFile(Path.Combine(serverPath, normalImagePath));
Image mouseDownImage = Image.FromFile(Path.Combine(Application.StartupPath, mouseDownImagePath)); Image mouseDownImage = Image.FromFile(Path.Combine(serverPath, mouseDownImagePath));
Image mouseOverImage = Image.FromFile(Path.Combine(Application.StartupPath, mouseOverImagePath)); Image mouseOverImage = Image.FromFile(Path.Combine(serverPath, mouseOverImagePath));
// 設置滑鼠事件:點擊、進入、離開等,改變按鈕的背景圖片 // 設置滑鼠事件:點擊、進入、離開等,改變按鈕的背景圖片
numberWordCountButtonsForSongs[index].MouseDown += (s, e) => numberWordCountButtonsForSongs[index].BackgroundImage = mouseDownImage; numberWordCountButtonsForSongs[index].MouseDown += (s, e) => numberWordCountButtonsForSongs[index].BackgroundImage = mouseDownImage;
@ -547,17 +547,17 @@ namespace DualScreenDemo
FlatStyle = FlatStyle.Flat, FlatStyle = FlatStyle.Flat,
FlatAppearance = { BorderSize = 0, MouseDownBackColor = Color.Transparent, MouseOverBackColor = Color.Transparent }, FlatAppearance = { BorderSize = 0, MouseDownBackColor = Color.Transparent, MouseOverBackColor = Color.Transparent },
BackgroundImageLayout = ImageLayout.Stretch, BackgroundImageLayout = ImageLayout.Stretch,
BackgroundImage = Image.FromFile(Path.Combine(Application.StartupPath, normalImagePath)) BackgroundImage = Image.FromFile(Path.Combine(serverPath, normalImagePath))
}; };
// 設定按鈕的大小和位置 // 設定按鈕的大小和位置
ResizeAndPositionButton(button, coords.X, coords.Y, coords.Width, coords.Height); ResizeAndPositionButton(button, coords.X, coords.Y, coords.Width, coords.Height);
// 設定鼠標事件:進入、離開、按下、放開 // 設定鼠標事件:進入、離開、按下、放開
button.MouseEnter += (sender, e) => button.BackgroundImage = Image.FromFile(Path.Combine(Application.StartupPath, mouseOverImagePath)); button.MouseEnter += (sender, e) => button.BackgroundImage = Image.FromFile(Path.Combine(serverPath, mouseOverImagePath));
button.MouseLeave += (sender, e) => button.BackgroundImage = Image.FromFile(Path.Combine(Application.StartupPath, normalImagePath)); button.MouseLeave += (sender, e) => button.BackgroundImage = Image.FromFile(Path.Combine(serverPath, normalImagePath));
button.MouseDown += (sender, e) => button.BackgroundImage = Image.FromFile(Path.Combine(Application.StartupPath, mouseDownImagePath)); button.MouseDown += (sender, e) => button.BackgroundImage = Image.FromFile(Path.Combine(serverPath, mouseDownImagePath));
button.MouseUp += (sender, e) => button.BackgroundImage = Image.FromFile(Path.Combine(Application.StartupPath, normalImagePath)); button.MouseUp += (sender, e) => button.BackgroundImage = Image.FromFile(Path.Combine(serverPath, normalImagePath));
// 註冊點擊事件處理 // 註冊點擊事件處理
button.Click += clickEventHandler; button.Click += clickEventHandler;

View File

@ -10,23 +10,23 @@ namespace DualScreenDemo
{ {
// 各種歌曲搜尋按鈕及其對應的背景圖片 (一般狀態 / 啟動狀態) // 各種歌曲搜尋按鈕及其對應的背景圖片 (一般狀態 / 啟動狀態)
private Button zhuyinSearchSongButton; private Button zhuyinSearchSongButton;
private Bitmap zhuyinSearchSongNormalBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\4.歌名查詢_注音查詢(未按).png")); private Bitmap zhuyinSearchSongNormalBackground;
private Bitmap zhuyinSearchSongActiveBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\4.歌名查詢_注音查詢(已按).png")); private Bitmap zhuyinSearchSongActiveBackground;
private Button englishSearchSongButton; private Button englishSearchSongButton;
private Bitmap englishSearchSongNormalBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\4.歌名查詢_英文查詢(未按).png")); private Bitmap englishSearchSongNormalBackground;
private Bitmap englishSearchSongActiveBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\4.歌名查詢_英文查詢(已按).png")); private Bitmap englishSearchSongActiveBackground;
private Button wordCountSearchSongButton; private Button wordCountSearchSongButton;
private Bitmap wordCountSearchSongNormalBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\4.歌名查詢_字數查詢(未按).png")); private Bitmap wordCountSearchSongNormalBackground;
private Bitmap wordCountSearchSongActiveBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\4.歌名查詢_字數查詢(已按).png")); private Bitmap wordCountSearchSongActiveBackground;
private Button pinyinSearchSongButton; private Button pinyinSearchSongButton;
private Bitmap pinyinSearchSongNormalBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\4.歌名查詢_拼音查詢(未按).png")); private Bitmap pinyinSearchSongNormalBackground;
private Bitmap pinyinSearchSongActiveBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\4.歌名查詢_拼音查詢(已按).png")); private Bitmap pinyinSearchSongActiveBackground;
private Button handWritingSearchSongButton; private Button handWritingSearchSongButton;
private Bitmap handWritingSearchSongNormalBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\4.歌名查詢_手寫查詢(未按).png")); private Bitmap handWritingSearchSongNormalBackground;
private Bitmap handWritingSearchSongActiveBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\4.歌名查詢_手寫查詢(已按).png")); private Bitmap handWritingSearchSongActiveBackground;
private Button numberSearchSongButton; private Button numberSearchSongButton;
private Bitmap numberSearchSongNormalBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\4.歌名查詢_編號查詢(未按).png")); private Bitmap numberSearchSongNormalBackground;
private Bitmap numberSearchSongActiveBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\4.歌名查詢_編號查詢(已按).png")); private Bitmap numberSearchSongActiveBackground;
/// <summary> /// <summary>
/// 點擊「歌曲搜尋」按鈕時的事件處理函式 /// 點擊「歌曲搜尋」按鈕時的事件處理函式
@ -41,7 +41,7 @@ namespace DualScreenDemo
hotPlayButton.BackgroundImage = hotPlayNormalBackground; hotPlayButton.BackgroundImage = hotPlayNormalBackground;
singerSearchButton.BackgroundImage = singerSearchNormalBackground; singerSearchButton.BackgroundImage = singerSearchNormalBackground;
songSearchButton.BackgroundImage = songSearchActiveBackground; songSearchButton.BackgroundImage = songSearchActiveBackground;
songSearchButton.BackgroundImage = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別上方_歌名查詢(已按).png")); songSearchButton.BackgroundImage = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別上方_歌名查詢(已按).png"));
languageSearchButton.BackgroundImage = languageSearchNormalBackground; languageSearchButton.BackgroundImage = languageSearchNormalBackground;
groupSearchButton.BackgroundImage = groupSearchNormalBackground; groupSearchButton.BackgroundImage = groupSearchNormalBackground;
categorySearchButton.BackgroundImage = categorySearchNormalBackground; categorySearchButton.BackgroundImage = categorySearchNormalBackground;
@ -54,10 +54,10 @@ namespace DualScreenDemo
ResetinputBox(); ResetinputBox();
string query = $"SELECT * FROM song_library_cache WHERE language_name = '國語' LIMIT 1000;"; string query = $"SELECT * FROM song_library_cache WHERE language_name = '國語' LIMIT 1000;";
var searchResult = SearchSongs_Mysql(query); var searchResult = SearchSongs_Mysql(query);
currentPage = 0; currentPage = 0;
totalPages = (int)Math.Ceiling((double)searchResult.Count / itemsPerPage); totalPages = (int)Math.Ceiling((double)searchResult.Count / itemsPerPage);
multiPagePanel.currentPageIndex = 0; multiPagePanel.currentPageIndex = 0;
multiPagePanel.LoadSongs(searchResult); multiPagePanel.LoadSongs(searchResult);
@ -75,7 +75,7 @@ namespace DualScreenDemo
SetPinYinSongsAndButtonsVisibility(false); SetPinYinSongsAndButtonsVisibility(false);
SetPictureBoxToggleLightAndButtonsVisibility(false); SetPictureBoxToggleLightAndButtonsVisibility(false);
SetPictureBoxSceneSoundEffectsAndButtonsVisibility(false); SetPictureBoxSceneSoundEffectsAndButtonsVisibility(false);
// 顯示歌曲搜尋選單按鈕 // 顯示歌曲搜尋選單按鈕
SetSongSearchButtonsVisibility(true); SetSongSearchButtonsVisibility(true);
@ -86,7 +86,7 @@ namespace DualScreenDemo
closeQRCodeButton.Visible = false; closeQRCodeButton.Visible = false;
} }
} }
/// <summary> /// <summary>
/// 設定「歌曲搜尋」相關按鈕的可見性 /// 設定「歌曲搜尋」相關按鈕的可見性
/// </summary> /// </summary>
@ -96,13 +96,13 @@ namespace DualScreenDemo
pictureBox4.Visible = isVisible; // 控制搜尋 UI 背景的可見性 pictureBox4.Visible = isVisible; // 控制搜尋 UI 背景的可見性
// 歌曲搜尋的按鈕陣列 // 歌曲搜尋的按鈕陣列
Button[] songSearchButtons = { Button[] songSearchButtons = {
zhuyinSearchSongButton, zhuyinSearchSongButton,
englishSearchSongButton, englishSearchSongButton,
wordCountSearchSongButton, wordCountSearchSongButton,
pinyinSearchSongButton, pinyinSearchSongButton,
handWritingSearchSongButton, handWritingSearchSongButton,
numberSearchSongButton numberSearchSongButton
}; };
// 設定按鈕可見性,若顯示則移至最前 // 設定按鈕可見性,若顯示則移至最前
@ -122,10 +122,24 @@ namespace DualScreenDemo
/// </summary> /// </summary>
private void InitializeButtonsForSongSearch() private void InitializeButtonsForSongSearch()
{ {
zhuyinSearchSongNormalBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\4.歌名查詢_注音查詢(未按).png"));
zhuyinSearchSongActiveBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\4.歌名查詢_注音查詢(已按).png"));
englishSearchSongNormalBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\4.歌名查詢_英文查詢(未按).png"));
englishSearchSongActiveBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\4.歌名查詢_英文查詢(已按).png"));
wordCountSearchSongNormalBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\4.歌名查詢_字數查詢(未按).png"));
wordCountSearchSongActiveBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\4.歌名查詢_字數查詢(已按).png"));
pinyinSearchSongNormalBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\4.歌名查詢_拼音查詢(未按).png"));
pinyinSearchSongActiveBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\4.歌名查詢_拼音查詢(已按).png"));
handWritingSearchSongNormalBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\4.歌名查詢_手寫查詢(未按).png"));
handWritingSearchSongActiveBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\4.歌名查詢_手寫查詢(已按).png"));
numberSearchSongNormalBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\4.歌名查詢_編號查詢(未按).png"));
numberSearchSongActiveBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\2.次類別\\4.歌名查詢_編號查詢(已按).png"));
// 初始化「注音搜尋」按鈕 // 初始化「注音搜尋」按鈕
InitializeSearchButton(ref zhuyinSearchSongButton, "zhuyinSearchSongButton", InitializeSearchButton(ref zhuyinSearchSongButton, "zhuyinSearchSongButton",
1197, 225, 225, 50, ref zhuyinSearchSongNormalBackground, ref zhuyinSearchSongActiveBackground, 1197, 225, 225, 50, ref zhuyinSearchSongNormalBackground, ref zhuyinSearchSongActiveBackground,
normalStateImageSongQuery, mouseDownImageSongQuery, ZhuyinSearchSongsButton_Click); normalStateImageSongQuery, mouseDownImageSongQuery, ZhuyinSearchSongsButton_Click);
// 初始化「英文搜尋」按鈕 // 初始化「英文搜尋」按鈕
InitializeSearchButton(ref englishSearchSongButton, "englishSearchSongButton", InitializeSearchButton(ref englishSearchSongButton, "englishSearchSongButton",

View File

@ -799,4 +799,4 @@ FontStyle = Regular
ForeColor = Black ForeColor = Black
[ImageSrc] [ImageSrc]
path=//sshost/KTVSuperstar path=\\sshost\KTVSuperstar