PrimaryForm 按鍵設定代碼清理重構
This commit is contained in:
parent
9ae5cf827a
commit
5deeb7843c
@ -121,7 +121,7 @@ namespace DualScreenDemo
|
||||
public List<Artist> currentArtistList;
|
||||
public MultiPagePanel multiPagePanel;
|
||||
private List<Label> songLabels = new List<Label>();
|
||||
private int _currentPage { get; set; }= 0;
|
||||
private int _currentPage { get; set; } = 0;
|
||||
private int _totalPages { get; set; }
|
||||
|
||||
public int currentPage
|
||||
@ -280,7 +280,7 @@ namespace DualScreenDemo
|
||||
// `DrawString(要繪製的文字, 字型, 畫刷, 位置)`
|
||||
e.Graphics.DrawString(displayName, font, brush, point_PCName);
|
||||
e.Graphics.DrawString(pageNumber, font, brush, point_PageNumber);
|
||||
e.Graphics.DrawString(version.Substring(version.IndexOf("V"),4),font,brush, point_verSion);
|
||||
e.Graphics.DrawString(version.Substring(version.IndexOf("V"), 4), font, brush, point_verSion);
|
||||
}
|
||||
private void User_Paint(object sender, PaintEventArgs e)
|
||||
{
|
||||
@ -356,7 +356,7 @@ namespace DualScreenDemo
|
||||
public void HideSendOffScreen()
|
||||
{
|
||||
sendOffPanel.Visible = false;
|
||||
foreach (Control ctrl in this.Controls)
|
||||
foreach (Control ctrl in this.Controls)
|
||||
{
|
||||
ctrl.Enabled = true;
|
||||
}
|
||||
@ -851,7 +851,7 @@ namespace DualScreenDemo
|
||||
|
||||
private void LightControlTimer_Tick(object sender, EventArgs e)
|
||||
{
|
||||
if(lightControlTimer.Tag != null)
|
||||
if (lightControlTimer.Tag != null)
|
||||
{
|
||||
SendCommandThroughSerialPort(lightControlTimer.Tag.ToString());
|
||||
}
|
||||
@ -992,6 +992,8 @@ namespace DualScreenDemo
|
||||
this.Controls.Add(button);
|
||||
}
|
||||
|
||||
|
||||
#region 主畫面按鈕設定
|
||||
private void InitializeOtherControls()
|
||||
{
|
||||
InitializeButton(ref newSongAlertButton, ref newSongAlertNormalBackground, ref newSongAlertActiveBackground, "newSongAlertButton", 20, 98, 105, 120, "themes\\superstar\\button\\1.主類別\\主類別上方_新歌快報(未按).png", NewSongAlertButton_Click);
|
||||
@ -1008,26 +1010,13 @@ namespace DualScreenDemo
|
||||
|
||||
InitializeButton(ref categorySearchButton, ref categorySearchNormalBackground, ref categorySearchActiveBackground, "categorySearchButton", 726, 98, 106, 120, "themes\\superstar\\button\\1.主類別\\主類別上方_類別查詢(未按).png", CategorySearchButton_Click);
|
||||
|
||||
Bitmap serviceBell = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別上方_服務鈴(未按).png"));
|
||||
Bitmap serviceBellHover = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別上方_服務鈴(已按).png"));
|
||||
//serviceBellButton = new Button { Text = "" };
|
||||
//serviceBellButton.Name = "serviceBellButton";
|
||||
//ConfigureButton(serviceBellButton, 848, 96, 101, 102,
|
||||
// resizedMouseOverImage, resizedMouseOverImage, resizedMouseDownImage,
|
||||
// (sender, e) => OnServiceBellButtonClick(sender, e));
|
||||
//this.Controls.Add(serviceBellButton);
|
||||
|
||||
Rectangle serviceBellButtonCropArea = new Rectangle(843, 98, 107, 120);
|
||||
InitializeButton(
|
||||
ref serviceBellButton,
|
||||
"serviceBellButton",
|
||||
843, 98, 107, 120,
|
||||
serviceBellButtonCropArea,
|
||||
serviceBell,
|
||||
(sender, e) => OnServiceBellButtonClick(sender, e)
|
||||
);
|
||||
serviceBellButton.MouseEnter += (sender, e) => serviceBellButton.BackgroundImage = serviceBellHover;
|
||||
serviceBellButton.MouseLeave += (sender, e) => serviceBellButton.BackgroundImage = serviceBell;
|
||||
serviceBellButton = new Button { Text = "" };
|
||||
ConfigureButton(serviceBellButton, 843, 98, 107, 120,
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別上方_服務鈴(未按).png")),
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別上方_服務鈴(未按).png")),
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別上方_服務鈴(已按).png")),
|
||||
(sender, e) => OnServiceBellButtonClick(sender, e));
|
||||
|
||||
|
||||
InitializeButton(ref orderedSongsButton, ref orderedSongsNormalBackground, ref orderedSongsActiveBackground, "orderedSongsButton", 961, 98, 107, 120, "themes\\superstar\\button\\1.主類別\\主類別上方_已點歌曲(未按).png", OrderedSongsButton_Click);
|
||||
@ -1038,412 +1027,245 @@ namespace DualScreenDemo
|
||||
|
||||
InitializeButton(ref deliciousFoodButton, ref deliciousFoodNormalBackground, ref deliciousFoodActiveBackground, "deliciousFoodButton", 1315, 98, 107, 120, "themes\\superstar\\button\\1.主類別\\主類別上方_美味菜單(未按).png", DeliciousFoodButton_Click);
|
||||
|
||||
//mobileSongRequestButton = new Button { Text = "" };
|
||||
//mobileSongRequestButton.Name = "mobileSongRequestButton";
|
||||
//ConfigureButton(mobileSongRequestButton, 1211, 669, 210, 70,
|
||||
// resizedNormalStateImage, resizedMouseOverImage, resizedMouseDownImage,
|
||||
// MobileSongRequestButton_Click);
|
||||
|
||||
Bitmap mobileSongRequest = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別上方_手機點歌.png"));
|
||||
|
||||
Rectangle mobileSongRequestButtonCropArea = new Rectangle(1198, 629, 223, 88);
|
||||
InitializeButton(
|
||||
ref mobileSongRequestButton,
|
||||
"mobileSongRequestButton",
|
||||
1198, 629, 223, 88,
|
||||
mobileSongRequestButtonCropArea,
|
||||
mobileSongRequest,
|
||||
MobileSongRequestButton_Click
|
||||
);
|
||||
mobileSongRequestButton = new Button { Text = "" };
|
||||
mobileSongRequestButton.Name = "mobileSongRequestButton";
|
||||
ConfigureButton(mobileSongRequestButton, 1198, 629, 223, 88,
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別上方_手機點歌.png")),
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別上方_手機點歌.png")),
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別上方_手機點歌.png")),
|
||||
MobileSongRequestButton_Click);
|
||||
|
||||
|
||||
Bitmap qieGe=new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_切歌.png"));
|
||||
qieGeButton = new Button { Text = "" };
|
||||
qieGeButton.Name = "qieGeButton";
|
||||
ConfigureButton(qieGeButton, 20, 738, 92, 147,
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_切歌.png")),
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_切歌.png")),
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_切歌.png")),
|
||||
(sender, e) => videoPlayerForm.PlayNextSong());
|
||||
|
||||
Rectangle qieGeButtonCropArea = new Rectangle(20, 738, 92, 147);
|
||||
InitializeButton(
|
||||
ref qieGeButton,
|
||||
"qieGeButton",
|
||||
20, 738, 92, 147,
|
||||
qieGeButtonCropArea,
|
||||
qieGe,
|
||||
(sender, e) => videoPlayerForm.PlayNextSong()
|
||||
);
|
||||
this.Controls.Add(qieGeButton);
|
||||
|
||||
musicUpButton = new Button{ Text = "" };
|
||||
musicUpButton = new Button { Text = "" };
|
||||
musicUpButton.Name = "musicUpButton";
|
||||
ResizeAndPositionButton(musicUpButton, 128, 738, 93, 62);
|
||||
Rectangle musicUpButtonCropArea = new Rectangle(128, 738, 93, 62);
|
||||
//musicUpButton.BackgroundImage = normalStateImage.Clone(musicUpButtonCropArea, normalStateImage.PixelFormat);
|
||||
musicUpButton.BackgroundImage = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_音樂+.png"));
|
||||
//musicUpButton.BackColor = Color.Transparent;
|
||||
musicUpButton.BackgroundImageLayout = ImageLayout.Stretch;
|
||||
musicUpButton.FlatStyle = FlatStyle.Flat;
|
||||
musicUpButton.FlatAppearance.BorderSize = 0;
|
||||
//musicUpButton.FlatAppearance.MouseOverBackColor = Color.Transparent;
|
||||
//musicUpButton.FlatAppearance.MouseDownBackColor = Color.Transparent;
|
||||
musicUpButton.MouseDown += (sender, e) => { OverlayForm.MainForm.ShowTopRightLabel("音量 ↑","a2 b3 a4"); };
|
||||
musicUpButton.MouseUp += (sender, e) => { OverlayForm.MainForm.RedisplayTopRigthLabel(); };
|
||||
musicUpButton.MouseLeave += (sender, e) => musicUpButton.BackgroundImage = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_音樂+.png"));
|
||||
musicUpButton.MouseDown += (sender, e) => musicUpButton.BackgroundImage = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\音樂及麥克風icon_音樂++.png"));
|
||||
this.Controls.Add(musicUpButton);
|
||||
ConfigureButton(musicUpButton, 128, 738, 93, 62,
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_音樂+.png")),
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_音樂+.png")),
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\音樂及麥克風icon_音樂++.png")),
|
||||
(sender, e) => { OverlayForm.MainForm.ShowTopRightLabel("音量 ↑", "a2 b3 a4"); });
|
||||
|
||||
|
||||
musicDownButton = new Button{ Text = "" };
|
||||
musicDownButton = new Button { Text = "" };
|
||||
musicDownButton.Name = "musicDownButton";
|
||||
ResizeAndPositionButton(musicDownButton, 128, 823, 93, 62);
|
||||
Rectangle musicDownButtonCropArea = new Rectangle(128, 823, 93, 62);
|
||||
//musicDownButton.BackgroundImage = normalStateImage.Clone(musicDownButtonCropArea, normalStateImage.PixelFormat);
|
||||
musicDownButton.BackgroundImage = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_音樂-.png"));
|
||||
//musicDownButton.BackColor = Color.Transparent;
|
||||
musicDownButton.BackgroundImageLayout = ImageLayout.Stretch;
|
||||
musicDownButton.FlatStyle = FlatStyle.Flat;
|
||||
musicDownButton.FlatAppearance.BorderSize = 0;
|
||||
//musicDownButton.FlatAppearance.MouseOverBackColor = Color.Transparent;
|
||||
//musicDownButton.FlatAppearance.MouseDownBackColor = Color.Transparent;
|
||||
musicDownButton.MouseDown += (sender, e) => { OverlayForm.MainForm.ShowTopRightLabel("音量 ↓","a2 b4 a4"); };
|
||||
musicDownButton.MouseUp += (sender, e) => { OverlayForm.MainForm.RedisplayTopRigthLabel(); };
|
||||
musicDownButton.MouseLeave += (sender, e) => musicDownButton.BackgroundImage = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_音樂-.png"));
|
||||
musicDownButton.MouseDown += (sender, e) => musicDownButton.BackgroundImage = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\音樂及麥克風icon_音樂--.png"));
|
||||
this.Controls.Add(musicDownButton);
|
||||
ConfigureButton(musicDownButton, 128, 823, 93, 62,
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_音樂-.png")),
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_音樂-.png")),
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\音樂及麥克風icon_音樂--.png")),
|
||||
(sender, e) => { OverlayForm.MainForm.ShowTopRightLabel("音量 ↓", "a2 b4 a4"); });
|
||||
|
||||
|
||||
micUpButton = new Button{ Text = "" };
|
||||
micUpButton = new Button { Text = "" };
|
||||
micUpButton.Name = "micUpButton";
|
||||
ResizeAndPositionButton(micUpButton, 238, 738, 93, 62);
|
||||
Rectangle micUpButtonCropArea = new Rectangle(238, 738, 93, 62);
|
||||
//micUpButton.BackgroundImage = normalStateImage.Clone(micUpButtonCropArea, normalStateImage.PixelFormat);
|
||||
micUpButton.BackgroundImage = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_麥克風+.png"));
|
||||
//micUpButton.BackColor = Color.Transparent;
|
||||
micUpButton.BackgroundImageLayout = ImageLayout.Stretch;
|
||||
micUpButton.FlatStyle = FlatStyle.Flat;
|
||||
micUpButton.FlatAppearance.BorderSize = 0;
|
||||
//micUpButton.FlatAppearance.MouseOverBackColor = Color.Transparent;
|
||||
//micUpButton.FlatAppearance.MouseDownBackColor = Color.Transparent;
|
||||
micUpButton.MouseDown += (sender, e) => { OverlayForm.MainForm.ShowTopRightLabel("麥克風 ↑","a2 b5 a4"); };
|
||||
micUpButton.MouseUp += (sender, e) => { OverlayForm.MainForm.RedisplayTopRigthLabel(); };
|
||||
micUpButton.MouseLeave += (sender, e) => micUpButton.BackgroundImage = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_麥克風+.png"));
|
||||
micUpButton.MouseDown += (sender, e) => micUpButton.BackgroundImage = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\音樂及麥克風icon_麥克風++.png"));
|
||||
this.Controls.Add(micUpButton);
|
||||
ConfigureButton(micUpButton, 238, 738, 93, 62,
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_麥克風+.png")),
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_麥克風+.png")),
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\音樂及麥克風icon_麥克風++.png")),
|
||||
(sender, e) => { OverlayForm.MainForm.ShowTopRightLabel("麥克風 ↑", "a2 b5 a4"); });
|
||||
|
||||
|
||||
micDownButton = new Button{ Text = "" };
|
||||
micDownButton = new Button { Text = "" };
|
||||
micDownButton.Name = "micDownButton";
|
||||
ResizeAndPositionButton(micDownButton, 238, 823, 93, 62);
|
||||
Rectangle micDownButtonCropArea = new Rectangle(238, 823, 93, 62);
|
||||
//micDownButton.BackgroundImage = normalStateImage.Clone(micDownButtonCropArea, normalStateImage.PixelFormat);
|
||||
micDownButton.BackgroundImage = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_麥克風-.png"));
|
||||
//micDownButton.BackColor = Color.Transparent;
|
||||
micDownButton.BackgroundImageLayout = ImageLayout.Stretch;
|
||||
micDownButton.FlatStyle = FlatStyle.Flat;
|
||||
micDownButton.FlatAppearance.BorderSize = 0;
|
||||
//micDownButton.FlatAppearance.MouseOverBackColor = Color.Transparent;
|
||||
//micDownButton.FlatAppearance.MouseDownBackColor = Color.Transparent;
|
||||
micDownButton.MouseDown += (sender, e) =>{ OverlayForm.MainForm.ShowTopRightLabel("麥克風 ↓","a2 b6 a4"); };
|
||||
micDownButton.MouseUp += (sender, e) => { OverlayForm.MainForm.RedisplayTopRigthLabel(); };
|
||||
micDownButton.MouseLeave += (sender, e) => micDownButton.BackgroundImage = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_麥克風-.png"));
|
||||
micDownButton.MouseDown += (sender, e) => micDownButton.BackgroundImage = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\音樂及麥克風icon_麥克風--.png"));
|
||||
this.Controls.Add(micDownButton);
|
||||
ConfigureButton(micDownButton, 238, 823, 93, 62,
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_麥克風-.png")),
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_麥克風-.png")),
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\音樂及麥克風icon_麥克風--.png")),
|
||||
(sender, e) => { OverlayForm.MainForm.ShowTopRightLabel("麥克風 ↓", "a2 b6 a4"); });
|
||||
|
||||
|
||||
originalSongButton = new Button { Text = "" };
|
||||
originalSongButton.Name = "originalSongButton";
|
||||
ResizeAndPositionButton(originalSongButton, 347, 738, 93, 62);
|
||||
Rectangle originalSongButtonCropArea = new Rectangle(347, 738, 93, 62);
|
||||
//originalSongButton.BackgroundImage = normalStateImage.Clone(originalSongButtonCropArea, normalStateImage.PixelFormat);
|
||||
originalSongButton.BackgroundImage = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_原唱.png"));
|
||||
//originalSongButton.BackColor = Color.Transparent;
|
||||
originalSongButton.BackgroundImageLayout = ImageLayout.Stretch;
|
||||
originalSongButton.FlatStyle = FlatStyle.Flat;
|
||||
originalSongButton.FlatAppearance.BorderSize = 0;
|
||||
//originalSongButton.FlatAppearance.MouseOverBackColor = Color.Transparent;
|
||||
//originalSongButton.FlatAppearance.MouseDownBackColor = Color.Transparent;
|
||||
originalSongButton.Click += OriginalSongButton_Click;
|
||||
this.Controls.Add(originalSongButton);
|
||||
ConfigureButton(originalSongButton, 347, 738, 93, 62,
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_原唱.png")),
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_原唱.png")),
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_原唱.png")),
|
||||
OriginalSongButton_Click);
|
||||
|
||||
|
||||
replayButton = new Button{ Text = "" };
|
||||
replayButton = new Button { Text = "" };
|
||||
replayButton.Name = "replayButton";
|
||||
ResizeAndPositionButton(replayButton, 347, 823, 93, 62);
|
||||
Rectangle replayButtonCropArea = new Rectangle(347, 823, 93, 62);
|
||||
//replayButton.BackgroundImage = normalStateImage.Clone(replayButtonCropArea, normalStateImage.PixelFormat);
|
||||
replayButton.BackgroundImage = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_重唱.png"));
|
||||
//replayButton.BackColor = Color.Transparent;
|
||||
replayButton.BackgroundImageLayout = ImageLayout.Stretch;
|
||||
replayButton.FlatStyle = FlatStyle.Flat;
|
||||
replayButton.FlatAppearance.BorderSize = 0;
|
||||
//replayButton.FlatAppearance.MouseOverBackColor = Color.Transparent;
|
||||
//replayButton.FlatAppearance.MouseDownBackColor = Color.Transparent;
|
||||
replayButton.Click += ReplayButton_Click;
|
||||
this.Controls.Add(replayButton);
|
||||
ConfigureButton(replayButton, 347, 823, 93, 62,
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_重唱.png")),
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_重唱.png")),
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_重唱.png")),
|
||||
ReplayButton_Click);
|
||||
|
||||
|
||||
pauseButton = new Button {
|
||||
pauseButton = new Button{
|
||||
Text = "",
|
||||
Name = "pauseButton"
|
||||
};
|
||||
ResizeAndPositionButton(pauseButton, 456, 738, 93, 62);
|
||||
Rectangle pauseButtonCropArea = new Rectangle(456, 738, 93, 62);
|
||||
//pauseButton.BackgroundImage = normalStateImage.Clone(pauseButtonCropArea, normalStateImage.PixelFormat);
|
||||
pauseButton.BackgroundImage = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_暫停.png"));
|
||||
//pauseButton.BackColor = Color.Transparent;
|
||||
pauseButton.BackgroundImageLayout = ImageLayout.Stretch;
|
||||
pauseButton.FlatStyle = FlatStyle.Flat;
|
||||
pauseButton.FlatAppearance.BorderSize = 0;
|
||||
//pauseButton.FlatAppearance.MouseOverBackColor = Color.Transparent;
|
||||
//pauseButton.FlatAppearance.MouseDownBackColor = Color.Transparent;
|
||||
pauseButton.Click += PauseButton_Click;
|
||||
this.Controls.Add(pauseButton);
|
||||
Name = "pauseButton" };
|
||||
ConfigureButton(pauseButton, 456, 738, 93, 62,
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_暫停.png")),
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_暫停.png")),
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_暫停.png")),
|
||||
PauseButton_Click);
|
||||
|
||||
|
||||
playButton = new Button {
|
||||
playButton = new Button
|
||||
{
|
||||
Text = "",
|
||||
Name = "playButton",
|
||||
Visible = false
|
||||
};
|
||||
ResizeAndPositionButton(playButton, 456, 738, 93, 62);
|
||||
Rectangle playButtonCropArea = new Rectangle(456, 740, 93, 62);
|
||||
//playButton.BackgroundImage = normalStateImage.Clone(playButtonCropArea, normalStateImage.PixelFormat);
|
||||
playButton.BackgroundImage = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_暫停.png"));
|
||||
//playButton.BackColor = Color.Transparent;
|
||||
playButton.BackgroundImageLayout = ImageLayout.Stretch;
|
||||
playButton.FlatStyle = FlatStyle.Flat;
|
||||
playButton.FlatAppearance.BorderSize = 0;
|
||||
//playButton.FlatAppearance.MouseOverBackColor = Color.Transparent;
|
||||
//playButton.FlatAppearance.MouseDownBackColor = Color.Transparent;
|
||||
playButton.Click += PlayButton_Click;
|
||||
this.Controls.Add(playButton);
|
||||
ConfigureButton(playButton, 456, 738, 93, 62,
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_暫停.png")),
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_暫停.png")),
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_暫停.png")),
|
||||
PlayButton_Click);
|
||||
|
||||
|
||||
muteButton = new Button{ Text = "" };
|
||||
muteButton = new Button { Text = "" };
|
||||
muteButton.Name = "muteButton";
|
||||
ResizeAndPositionButton(muteButton, 456, 823, 93, 62);
|
||||
Rectangle muteButtonCropArea = new Rectangle(456, 823, 93, 62);
|
||||
//muteButton.BackgroundImage = normalStateImage.Clone(muteButtonCropArea, normalStateImage.PixelFormat);
|
||||
muteButton.BackgroundImage = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_靜音.png"));
|
||||
//muteButton.BackColor = Color.Transparent;
|
||||
muteButton.BackgroundImageLayout = ImageLayout.Stretch;
|
||||
muteButton.FlatStyle = FlatStyle.Flat;
|
||||
muteButton.FlatAppearance.BorderSize = 0;
|
||||
//muteButton.FlatAppearance.MouseOverBackColor = Color.Transparent;
|
||||
//muteButton.FlatAppearance.MouseDownBackColor = Color.Transparent;
|
||||
muteButton.Click += MuteUnmuteButton_Click;
|
||||
this.Controls.Add(muteButton);
|
||||
ConfigureButton(muteButton, 456, 823, 93, 62,
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_靜音.png")),
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_靜音.png")),
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_靜音.png")),
|
||||
MuteUnmuteButton_Click);
|
||||
|
||||
|
||||
maleKeyButton = new Button{ Text = "" };
|
||||
maleKeyButton = new Button { Text = "" };
|
||||
maleKeyButton.Name = "maleKeyButton";
|
||||
ResizeAndPositionButton(maleKeyButton, 564, 738, 93, 62);
|
||||
Rectangle maleKeyButtonCropArea = new Rectangle(564, 738, 93, 62);
|
||||
//maleKeyButton.BackgroundImage = normalStateImage.Clone(maleKeyButtonCropArea, normalStateImage.PixelFormat);
|
||||
maleKeyButton.BackgroundImage = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_男調.png"));
|
||||
//maleKeyButton.BackColor = Color.Transparent;
|
||||
maleKeyButton.BackgroundImageLayout = ImageLayout.Stretch;
|
||||
maleKeyButton.FlatStyle = FlatStyle.Flat;
|
||||
maleKeyButton.Click += MaleKeyButton_Click;
|
||||
maleKeyButton.FlatAppearance.BorderSize = 0;
|
||||
//maleKeyButton.FlatAppearance.MouseOverBackColor = Color.Transparent;
|
||||
//maleKeyButton.FlatAppearance.MouseDownBackColor = Color.Transparent;
|
||||
this.Controls.Add(maleKeyButton);
|
||||
ConfigureButton(maleKeyButton, 564, 738, 93, 62,
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_男調.png")),
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_男調.png")),
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_男調.png")),
|
||||
MaleKeyButton_Click);
|
||||
|
||||
|
||||
femaleKeyButton = new Button{ Text = "" };
|
||||
femaleKeyButton = new Button { Text = "" };
|
||||
femaleKeyButton.Name = "femaleKeyButton";
|
||||
ResizeAndPositionButton(femaleKeyButton, 565, 823, 93, 62);
|
||||
Rectangle femaleKeyButtonCropArea = new Rectangle(565, 823, 93, 62);
|
||||
//femaleKeyButton.BackgroundImage = normalStateImage.Clone(femaleKeyButtonCropArea, normalStateImage.PixelFormat);
|
||||
femaleKeyButton.BackgroundImage = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_女調.png"));
|
||||
//femaleKeyButton.BackColor = Color.Transparent;
|
||||
femaleKeyButton.BackgroundImageLayout = ImageLayout.Stretch;
|
||||
femaleKeyButton.FlatStyle = FlatStyle.Flat;
|
||||
femaleKeyButton.FlatAppearance.BorderSize = 0;
|
||||
//femaleKeyButton.FlatAppearance.MouseOverBackColor = Color.Transparent;
|
||||
//femaleKeyButton.FlatAppearance.MouseDownBackColor = Color.Transparent;
|
||||
femaleKeyButton.Click += FemaleKeyButton_Click;
|
||||
this.Controls.Add(femaleKeyButton);
|
||||
ConfigureButton(femaleKeyButton, 565, 823, 93, 62,
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_女調.png")),
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_女調.png")),
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_女調.png")),
|
||||
FemaleKeyButton_Click);
|
||||
|
||||
|
||||
standardKeyButton = new Button { Text = "" };
|
||||
standardKeyButton.Name = "standardKeyButton";
|
||||
ResizeAndPositionButton(standardKeyButton, 674, 738, 93, 62);
|
||||
Rectangle standardKeyButtonCropArea = new Rectangle(674, 738, 93, 62);
|
||||
//standardKeyButton.BackgroundImage = normalStateImage.Clone(standardKeyButtonCropArea, normalStateImage.PixelFormat);
|
||||
standardKeyButton.BackgroundImage = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_標準調.png"));
|
||||
//standardKeyButton.BackColor = Color.Transparent;
|
||||
standardKeyButton.BackgroundImageLayout = ImageLayout.Stretch;
|
||||
standardKeyButton.FlatStyle = FlatStyle.Flat;
|
||||
standardKeyButton.FlatAppearance.BorderSize = 0;
|
||||
//standardKeyButton.FlatAppearance.MouseOverBackColor = Color.Transparent;
|
||||
//standardKeyButton.FlatAppearance.MouseDownBackColor = Color.Transparent;
|
||||
standardKeyButton.Click += StandardKeyButton_Click;
|
||||
this.Controls.Add(standardKeyButton);
|
||||
ConfigureButton(standardKeyButton, 674, 738, 93, 62,
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_標準調.png")),
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_標準調.png")),
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_標準調.png")),
|
||||
StandardKeyButton_Click);
|
||||
|
||||
|
||||
soundEffectButton = new Button { Text = "" };
|
||||
soundEffectButton.Name = "soundEffectButton";
|
||||
ResizeAndPositionButton(soundEffectButton, 674, 823, 93, 62);
|
||||
Rectangle soundEffectButtonCropArea = new Rectangle(674, 823, 93, 62);
|
||||
//soundEffectButton.BackgroundImage = normalStateImage.Clone(soundEffectButtonCropArea, normalStateImage.PixelFormat);
|
||||
soundEffectButton.BackgroundImage = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_音效.png"));
|
||||
//soundEffectButton.BackColor = Color.Transparent;
|
||||
soundEffectButton.BackgroundImageLayout = ImageLayout.Stretch;
|
||||
soundEffectButton.FlatStyle = FlatStyle.Flat;
|
||||
soundEffectButton.FlatAppearance.BorderSize = 0;
|
||||
//soundEffectButton.FlatAppearance.MouseOverBackColor = Color.Transparent;
|
||||
//soundEffectButton.FlatAppearance.MouseDownBackColor = Color.Transparent;
|
||||
soundEffectButton.Click += SoundEffectButton_Click;
|
||||
this.Controls.Add(soundEffectButton);
|
||||
ConfigureButton(soundEffectButton, 674, 823, 93, 62,
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_音效.png")),
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_音效.png")),
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_音效.png")),
|
||||
SoundEffectButton_Click);
|
||||
|
||||
|
||||
pitchUpButton = new Button{ Text = "" };
|
||||
pitchUpButton = new Button { Text = "" };
|
||||
pitchUpButton.Name = "pitchUpButton";
|
||||
ResizeAndPositionButton(pitchUpButton, 784, 738, 93, 62);
|
||||
Rectangle pitchUpButtonCropArea = new Rectangle(784, 738, 93, 62);
|
||||
//pitchUpButton.BackgroundImage = normalStateImage.Clone(pitchUpButtonCropArea, normalStateImage.PixelFormat);
|
||||
pitchUpButton.BackgroundImage = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_升調.png"));
|
||||
//pitchUpButton.BackColor = Color.Transparent;
|
||||
pitchUpButton.BackgroundImageLayout = ImageLayout.Stretch;
|
||||
pitchUpButton.FlatStyle = FlatStyle.Flat;
|
||||
pitchUpButton.FlatAppearance.BorderSize = 0;
|
||||
//pitchUpButton.FlatAppearance.MouseOverBackColor = Color.Transparent;
|
||||
//pitchUpButton.FlatAppearance.MouseDownBackColor = Color.Transparent;
|
||||
pitchUpButton.Click += PitchUpButton_Click;
|
||||
this.Controls.Add(pitchUpButton);
|
||||
ConfigureButton(pitchUpButton, 784, 738, 93, 62,
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_升調.png")),
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_升調.png")),
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_升調.png")),
|
||||
PitchUpButton_Click);
|
||||
|
||||
|
||||
pitchDownButton = new Button{ Text = "" };
|
||||
pitchDownButton = new Button { Text = "" };
|
||||
pitchDownButton.Name = "pitchDownButton";
|
||||
ResizeAndPositionButton(pitchDownButton, 784, 823, 93, 62);
|
||||
Rectangle pitchDownButtonCropArea = new Rectangle(784, 823, 93, 62);
|
||||
//pitchDownButton.BackgroundImage = normalStateImage.Clone(pitchDownButtonCropArea, normalStateImage.PixelFormat);
|
||||
pitchDownButton.BackgroundImage = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_降調.png"));
|
||||
//pitchDownButton.BackColor = Color.Transparent;
|
||||
pitchDownButton.BackgroundImageLayout = ImageLayout.Stretch;
|
||||
pitchDownButton.FlatStyle = FlatStyle.Flat;
|
||||
pitchDownButton.FlatAppearance.BorderSize = 0;
|
||||
//pitchDownButton.FlatAppearance.MouseOverBackColor = Color.Transparent;
|
||||
//pitchDownButton.FlatAppearance.MouseDownBackColor = Color.Transparent;
|
||||
pitchDownButton.Click += PitchDownButton_Click;
|
||||
this.Controls.Add(pitchDownButton);
|
||||
ConfigureButton(pitchDownButton, 784, 823, 93, 62,
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_降調.png")),
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_降調.png")),
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_降調.png")),
|
||||
PitchDownButton_Click);
|
||||
|
||||
|
||||
syncScreenButton = new Button { Text = "" };
|
||||
syncScreenButton.Name = "syncScreenButton";
|
||||
ResizeAndPositionButton(syncScreenButton, 893, 736, 92, 149);
|
||||
Rectangle syncScreenButtonCropArea = new Rectangle(893, 736, 92, 149);
|
||||
//syncScreenButton.BackgroundImage = normalStateImage.Clone(syncScreenButtonCropArea, normalStateImage.PixelFormat);
|
||||
syncScreenButton.BackgroundImage = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_同步畫面.png"));
|
||||
//syncScreenButton.BackColor = Color.Transparent;
|
||||
syncScreenButton.BackgroundImageLayout = ImageLayout.Stretch;
|
||||
syncScreenButton.FlatStyle = FlatStyle.Flat;
|
||||
syncScreenButton.FlatAppearance.BorderSize = 0;
|
||||
//syncScreenButton.FlatAppearance.MouseOverBackColor = Color.Transparent;
|
||||
//syncScreenButton.FlatAppearance.MouseDownBackColor = Color.Transparent;
|
||||
syncScreenButton.Click += SyncScreenButton_Click;
|
||||
this.Controls.Add(syncScreenButton);
|
||||
ConfigureButton(syncScreenButton, 893, 736, 92, 149,
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_同步畫面.png")),
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_同步畫面.png")),
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_同步畫面.png")),
|
||||
SyncScreenButton_Click);
|
||||
|
||||
toggleLightButton = new Button{ Text = "" };
|
||||
|
||||
toggleLightButton = new Button { Text = "" };
|
||||
toggleLightButton.Name = "toggleLightButton";
|
||||
|
||||
ResizeAndPositionButton(toggleLightButton, 1002, 736, 92, 149);
|
||||
Rectangle toggleLightButtonCropArea = new Rectangle(1002, 736, 92, 149);
|
||||
//toggleLightButton.BackgroundImage = normalStateImage.Clone(toggleLightButtonCropArea, normalStateImage.PixelFormat);
|
||||
toggleLightButton.BackgroundImage = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_燈光控制.png"));
|
||||
//toggleLightButton.BackColor = Color.Transparent;
|
||||
toggleLightButton.BackgroundImageLayout = ImageLayout.Stretch;
|
||||
toggleLightButton.FlatStyle = FlatStyle.Flat;
|
||||
toggleLightButton.FlatAppearance.BorderSize = 0;
|
||||
//toggleLightButton.FlatAppearance.MouseOverBackColor = Color.Transparent;
|
||||
//toggleLightButton.FlatAppearance.MouseDownBackColor = Color.Transparent;
|
||||
toggleLightButton.Click += ToggleLightButton_Click;
|
||||
|
||||
this.Controls.Add(toggleLightButton);
|
||||
|
||||
Bitmap PPage = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_上一頁.png"));
|
||||
|
||||
Rectangle previousPageButtonCropArea = new Rectangle(1110, 738, 93, 62);
|
||||
InitializeButton(
|
||||
ref btnPreviousPage,
|
||||
"btnPreviousPage",
|
||||
1111, 738, 93, 62,
|
||||
previousPageButtonCropArea,
|
||||
PPage,
|
||||
PreviousPageButton_Click
|
||||
);
|
||||
ConfigureButton(toggleLightButton, 1002, 736, 92, 149,
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_燈光控制.png")),
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_燈光控制.png")),
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_燈光控制.png")),
|
||||
ToggleLightButton_Click);
|
||||
|
||||
|
||||
btnReturn = new Button{ Text = "" };
|
||||
btnPreviousPage = new Button { Text = "" };
|
||||
btnPreviousPage.Name = "btnPreviousPageButton";
|
||||
ConfigureButton(btnPreviousPage, 1110, 738, 93, 62,
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_上一頁.png")),
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_上一頁.png")),
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_上一頁.png")),
|
||||
PreviousPageButton_Click);
|
||||
|
||||
|
||||
btnReturn = new Button { Text = "" };
|
||||
btnReturn.Name = "btnReturn";
|
||||
ConfigureButton(btnReturn, 1220, 738, 93, 62,
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_退出.png")),
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_退出.png")),
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_退出.png")),
|
||||
ShouYeButton_Click);
|
||||
|
||||
ResizeAndPositionButton(btnReturn, 1220, 738, 93, 62);
|
||||
Rectangle returnButtonCropArea = new Rectangle(1220, 738, 93, 62);
|
||||
//btnReturn.BackgroundImage = normalStateImage.Clone(returnButtonCropArea, normalStateImage.PixelFormat);
|
||||
btnReturn.BackgroundImage = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_退出.png"));
|
||||
//btnReturn.BackColor = Color.Transparent;
|
||||
btnReturn.BackgroundImageLayout = ImageLayout.Stretch;
|
||||
btnReturn.FlatStyle = FlatStyle.Flat;
|
||||
btnReturn.FlatAppearance.BorderSize = 0;
|
||||
//btnReturn.FlatAppearance.MouseOverBackColor = Color.Transparent;
|
||||
//btnReturn.FlatAppearance.MouseDownBackColor = Color.Transparent;
|
||||
btnReturn.Click += ShouYeButton_Click;
|
||||
|
||||
this.Controls.Add(btnReturn);
|
||||
btnNextPage = new Button { Text = "" };
|
||||
btnNextPage.Name = "btnNextPage";
|
||||
ConfigureButton(btnNextPage, 1330, 738, 93, 62,
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_下一頁.png")),
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_下一頁.png")),
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_下一頁.png")),
|
||||
NextPageButton_Click);
|
||||
|
||||
Bitmap NPage = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_下一頁.png"));
|
||||
|
||||
Rectangle nextPageButtonCropArea = new Rectangle(1330, 738, 93, 62);
|
||||
InitializeButton(
|
||||
ref btnNextPage,
|
||||
"btnNextPage",
|
||||
1330, 738, 93, 62,
|
||||
nextPageButtonCropArea,
|
||||
NPage,
|
||||
NextPageButton_Click
|
||||
);
|
||||
btnApplause = new Button { Text = "" };
|
||||
btnApplause.Name = "btnApplause";
|
||||
ConfigureButton(btnApplause, 1110, 823, 93, 62,
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_掌聲.png")),
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_掌聲.png")),
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_掌聲.png")),
|
||||
ApplauseButton_Click);
|
||||
|
||||
Bitmap aPPaulse = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_掌聲.png"));
|
||||
|
||||
Rectangle applauseButtonCropArea = new Rectangle(1110, 823, 93, 62);
|
||||
InitializeButton(
|
||||
ref btnApplause,
|
||||
"btnApplause",
|
||||
1110, 823, 93, 62,
|
||||
applauseButtonCropArea,
|
||||
aPPaulse,
|
||||
ApplauseButton_Click
|
||||
);
|
||||
btnSimplifiedChinese = new Button { Text = "" };
|
||||
btnSimplifiedChinese.Name = "btnSimplifiedChinese";
|
||||
ConfigureButton(btnSimplifiedChinese, 1330, 823, 93, 62,
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_簡體.png")),
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_簡體.png")),
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_簡體.png")),
|
||||
SimplifiedChineseButton_Click);
|
||||
|
||||
Bitmap SChinese = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_簡體.png"));
|
||||
|
||||
Rectangle simplifiedChineseButtonCropArea = new Rectangle(1330, 823, 93, 62);
|
||||
InitializeButton(
|
||||
ref btnSimplifiedChinese,
|
||||
"btnSimplifiedChinese",
|
||||
1330, 823, 93, 62,
|
||||
simplifiedChineseButtonCropArea,
|
||||
SChinese,
|
||||
SimplifiedChineseButton_Click
|
||||
);
|
||||
|
||||
Bitmap bTChinese = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_繁體.png"));
|
||||
|
||||
Rectangle traditionalChineseButtonCropArea = new Rectangle(1220, 823, 93, 62);
|
||||
InitializeButton(
|
||||
ref btnTraditionalChinese,
|
||||
"btnTraditionalChinese",
|
||||
1220, 823, 93, 62,
|
||||
traditionalChineseButtonCropArea,
|
||||
bTChinese,
|
||||
TraditionalChineseButton_Click
|
||||
);
|
||||
btnTraditionalChinese = new Button { Text = "" };
|
||||
btnTraditionalChinese.Name = "btnTraditionalChinese";
|
||||
ConfigureButton(btnTraditionalChinese, 1220, 823, 93, 62,
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_繁體.png")),
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_繁體.png")),
|
||||
new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別下方_繁體.png")),
|
||||
TraditionalChineseButton_Click);
|
||||
|
||||
/* 關閉應用程式按鈕*/
|
||||
exitButton = new Button{};
|
||||
exitButton = new Button { };
|
||||
/*exitButton.Name = "exitButton";
|
||||
ConfigureButton(exitButton, 1394, 2, 1428 - 1394, 37 - 2,
|
||||
resizedNormalStateImage, resizedMouseOverImage, resizedMouseDownImage,
|
||||
(sender, e) => Application.Exit());*/
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
private void InitializeButton(ref Button button, ref Bitmap normalBackground, ref Bitmap activeBackground, string buttonName, int x, int y, int width, int height, string imagePath, EventHandler clickEventHandler)
|
||||
{
|
||||
@ -1740,8 +1562,8 @@ namespace DualScreenDemo
|
||||
|
||||
int screenWidth = 1440;
|
||||
int screenHeight = 900;
|
||||
int pictureBoxWidth = (int)(938*0.8f);
|
||||
int pictureBoxHeight = (int)(209*0.8f);
|
||||
int pictureBoxWidth = (int)(938 * 0.8f);
|
||||
int pictureBoxHeight = (int)(209 * 0.8f);
|
||||
|
||||
int xPosition = (screenWidth - pictureBoxWidth) / 2;
|
||||
int yPosition = (screenHeight - pictureBoxHeight) / 2;
|
||||
@ -1928,7 +1750,7 @@ namespace DualScreenDemo
|
||||
}
|
||||
}
|
||||
|
||||
public void OriginalSongButton_Click(object sender, EventArgs e)
|
||||
public void OriginalSongButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
videoPlayerForm.ToggleVocalRemoval();
|
||||
}
|
||||
@ -1966,7 +1788,7 @@ namespace DualScreenDemo
|
||||
foreach(var song in userRequestedSongs){
|
||||
Console.WriteLine(song.ToString());
|
||||
}*/
|
||||
if( multiPagePanel.get_currentSongList() == SongList.GetHistory())
|
||||
if (multiPagePanel.get_currentSongList() == SongList.GetHistory())
|
||||
return;
|
||||
autoRefreshTimer.Stop(); // 停止自动刷新
|
||||
FindFirstNonEmptyText(inputBoxZhuYinSingers
|
||||
@ -2164,7 +1986,7 @@ namespace DualScreenDemo
|
||||
|
||||
// 显示提示信息
|
||||
//OverlayForm.MainForm.HideAllLabels();
|
||||
OverlayForm.MainForm.ShowTopRightLabel("服務鈴","a2 53 a4");
|
||||
OverlayForm.MainForm.ShowTopRightLabel("服務鈴", "a2 53 a4");
|
||||
// 延迟3秒
|
||||
await Task.Delay(3000);
|
||||
|
||||
@ -2182,7 +2004,8 @@ namespace DualScreenDemo
|
||||
};
|
||||
|
||||
// 初始化服務鈴圖標
|
||||
serviceBellPictureBox = new PictureBox {
|
||||
serviceBellPictureBox = new PictureBox
|
||||
{
|
||||
Visible = true,
|
||||
BackColor = Color.Transparent,
|
||||
SizeMode = PictureBoxSizeMode.StretchImage,
|
||||
@ -2191,7 +2014,8 @@ namespace DualScreenDemo
|
||||
};
|
||||
|
||||
// 添加服務鈴點擊事件
|
||||
serviceBellPictureBox.Click += (sender, e) => {
|
||||
serviceBellPictureBox.Click += (sender, e) =>
|
||||
{
|
||||
if (serviceBellButton != null)
|
||||
{
|
||||
OnServiceBellButtonClick(sender, e);
|
||||
@ -2199,7 +2023,8 @@ namespace DualScreenDemo
|
||||
};
|
||||
|
||||
// 使用 PictureBox 並加載小圖片
|
||||
buttonMiddle = new PictureBox {
|
||||
buttonMiddle = new PictureBox
|
||||
{
|
||||
Visible = true,
|
||||
BackColor = Color.Transparent,
|
||||
SizeMode = PictureBoxSizeMode.StretchImage,
|
||||
@ -2207,7 +2032,8 @@ namespace DualScreenDemo
|
||||
Cursor = System.Windows.Forms.Cursors.Hand
|
||||
};
|
||||
|
||||
buttonTopRight = new PictureBox {
|
||||
buttonTopRight = new PictureBox
|
||||
{
|
||||
Visible = true,
|
||||
BackColor = Color.Transparent,
|
||||
SizeMode = PictureBoxSizeMode.StretchImage,
|
||||
@ -2215,7 +2041,8 @@ namespace DualScreenDemo
|
||||
Cursor = System.Windows.Forms.Cursors.Hand
|
||||
};
|
||||
|
||||
buttonTopLeft = new PictureBox {
|
||||
buttonTopLeft = new PictureBox
|
||||
{
|
||||
Visible = true,
|
||||
BackColor = Color.Transparent,
|
||||
SizeMode = PictureBoxSizeMode.StretchImage,
|
||||
@ -2223,7 +2050,8 @@ namespace DualScreenDemo
|
||||
Cursor = System.Windows.Forms.Cursors.Hand
|
||||
};
|
||||
|
||||
buttonThanks = new PictureBox {
|
||||
buttonThanks = new PictureBox
|
||||
{
|
||||
Visible = true,
|
||||
BackColor = Color.Transparent,
|
||||
SizeMode = PictureBoxSizeMode.StretchImage,
|
||||
@ -2248,7 +2076,7 @@ namespace DualScreenDemo
|
||||
sendOffPanel.Controls.Add(buttonThanks);
|
||||
|
||||
// 包廂名稱顯示
|
||||
sendOffPanel.Paint+=SendOffPanel_Paint;
|
||||
sendOffPanel.Paint += SendOffPanel_Paint;
|
||||
|
||||
// 確保圖片在最上層
|
||||
serviceBellPictureBox.BringToFront(); // 確保服務鈴在最上層
|
||||
@ -2258,7 +2086,8 @@ namespace DualScreenDemo
|
||||
buttonThanks.BringToFront();
|
||||
|
||||
// 重新計算按鈕位置
|
||||
sendOffPanel.Resize += (s, e) => {
|
||||
sendOffPanel.Resize += (s, e) =>
|
||||
{
|
||||
UpdateSendOffButtonPositions();
|
||||
sendOffPanel.Invalidate(); // 重新繪製面板以更新顯示
|
||||
};
|
||||
@ -2269,7 +2098,8 @@ namespace DualScreenDemo
|
||||
/// 動態按鈕座標位置設定(依據螢幕大小)
|
||||
/// </summary>
|
||||
private void UpdateSendOffButtonPositions()
|
||||
{ Size designSize = new Size(1920, 1080);
|
||||
{
|
||||
Size designSize = new Size(1920, 1080);
|
||||
var panelWidth = sendOffPanel.Width;
|
||||
var panelHeight = sendOffPanel.Height;
|
||||
|
||||
@ -2291,9 +2121,9 @@ namespace DualScreenDemo
|
||||
|
||||
// ========== 服務鈴位置與大小 ==========
|
||||
//serviceBellPictureBox.Location = new Point((int)(757 * scaleX), (int)(151 * scaleY));
|
||||
serviceBellPictureBox.Location = new Point(740,103);
|
||||
serviceBellPictureBox.Location = new Point(740, 103);
|
||||
//serviceBellPictureBox.Size = new Size((int)(410 * scaleX), (int)(130 * scaleY));
|
||||
serviceBellPictureBox.Size = new Size(430,146);
|
||||
serviceBellPictureBox.Size = new Size(430, 146);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
Loading…
x
Reference in New Issue
Block a user