|
|
|
@ -1,4 +1,5 @@
|
|
|
|
|
using System.IO;
|
|
|
|
|
using Utils;
|
|
|
|
|
namespace DualScreenDemo
|
|
|
|
|
{
|
|
|
|
|
public partial class PrimaryForm
|
|
|
|
@ -29,133 +30,131 @@ namespace DualScreenDemo
|
|
|
|
|
private Bitmap vietnameseNormalBackground;
|
|
|
|
|
private Bitmap vietnameseActiveBackground;
|
|
|
|
|
|
|
|
|
|
string serverPath = Utils.Env.GetPath("", "");
|
|
|
|
|
|
|
|
|
|
private void ResetBtnStatus()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
loveDuetButton.BackgroundImage = loveDuetNormalBackground;
|
|
|
|
|
talentShowButton.BackgroundImage = talentShowNormalBackground;
|
|
|
|
|
medleyDanceButton.BackgroundImage = medleyDanceNormalBackground;
|
|
|
|
|
ninetiesButton.BackgroundImage = ninetiesNormalBackground;
|
|
|
|
|
nostalgicSongsButton.BackgroundImage = nostalgicSongsNormalBackground;
|
|
|
|
|
chinaSongsButton.BackgroundImage = chinaNormalBackground;
|
|
|
|
|
vietnameseSongsButton.BackgroundImage = vietnameseNormalBackground;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void InitializeButtonsForCategorySearch()
|
|
|
|
|
{
|
|
|
|
|
var data=LoadConfigData();
|
|
|
|
|
|
|
|
|
|
categorySearchNormalBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別上方_類別查詢(未按).png"));
|
|
|
|
|
categorySearchActiveBackground = new Bitmap(Path.Combine(serverPath, "themes\\superstar\\button\\1.主類別\\主類別上方_類別查詢(已按).png"));
|
|
|
|
|
|
|
|
|
|
categorySearchButton = new Button { Text = "" };
|
|
|
|
|
categorySearchButton.Name = "categorySearchButton";
|
|
|
|
|
ResizeAndPositionButton(categorySearchButton, 731, 97, 99, 99);
|
|
|
|
|
Rectangle categorySearchCropArea = new Rectangle(731, 97, 99, 99);
|
|
|
|
|
categorySearchNormalBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\1.主類別\\主類別上方_類別查詢-07.png"));
|
|
|
|
|
categorySearchActiveBackground = mouseDownImage.Clone(categorySearchCropArea, mouseDownImage.PixelFormat);
|
|
|
|
|
categorySearchButton.BackgroundImage = categorySearchNormalBackground;
|
|
|
|
|
categorySearchButton.BackgroundImageLayout = ImageLayout.Stretch;
|
|
|
|
|
categorySearchButton.FlatStyle = FlatStyle.Flat;
|
|
|
|
|
categorySearchButton.FlatAppearance.BorderSize = 0;
|
|
|
|
|
categorySearchButton.Click += CategorySearchButton_Click;
|
|
|
|
|
this.Controls.Add(categorySearchButton);
|
|
|
|
|
ConfigureButton(categorySearchButton, 731, 97, 99, 99,
|
|
|
|
|
categorySearchNormalBackground,
|
|
|
|
|
categorySearchActiveBackground,
|
|
|
|
|
categorySearchActiveBackground,
|
|
|
|
|
CategorySearchButton_Click);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void InitializeCategorySearchButtons()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
loveDuetButton = new Button { Text = "", Visible = false };
|
|
|
|
|
ResizeAndPositionButton(loveDuetButton, 1197, 225, 225, 50);
|
|
|
|
|
Rectangle loveDuetButtonCropArea = new Rectangle(1197, 225, 225, 50);
|
|
|
|
|
loveDuetNormalBackground = new Bitmap(Path.Combine(Application.StartupPath, "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"));
|
|
|
|
|
medleyDanceNormalBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\7.類別查詢_串燒舞曲(未按).png"));
|
|
|
|
|
ninetiesNormalBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\7.類別查詢_90年代(未按).png"));
|
|
|
|
|
nostalgicSongsNormalBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\7.類別查詢_懷舊老歌(未按).png"));
|
|
|
|
|
chinaNormalBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\7.類別查詢_中國大陸(未按).png"));
|
|
|
|
|
vietnameseNormalBackground= new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\7.類別查詢_越南歌曲(未按).png"));
|
|
|
|
|
|
|
|
|
|
loveDuetActiveBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\7.類別查詢_男女情歌(已按).png"));
|
|
|
|
|
loveDuetButton.BackgroundImage = loveDuetNormalBackground;
|
|
|
|
|
loveDuetButton.BackgroundImageLayout = ImageLayout.Stretch;
|
|
|
|
|
loveDuetButton.FlatStyle = FlatStyle.Flat;
|
|
|
|
|
loveDuetButton.FlatAppearance.BorderSize = 0;
|
|
|
|
|
loveDuetButton.Click += LoveDuetButton_Click;
|
|
|
|
|
this.Controls.Add(loveDuetButton);
|
|
|
|
|
talentShowActiveBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\7.類別查詢_選秀節目(已按).png"));
|
|
|
|
|
medleyDanceActiveBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\7.類別查詢_串燒舞曲(已按).png"));
|
|
|
|
|
ninetiesActiveBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\7.類別查詢_90年代(已按).png"));
|
|
|
|
|
nostalgicSongsActiveBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\7.類別查詢_懷舊老歌(已按).png"));
|
|
|
|
|
chinaActiveBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\7.類別查詢_中國大陸(已按).png"));
|
|
|
|
|
vietnameseActiveBackground= new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\7.類別查詢_越南歌曲(已按).png"));
|
|
|
|
|
|
|
|
|
|
loveDuetButton = new Button { Text = "", Visible = false };
|
|
|
|
|
ConfigureButton(loveDuetButton, 1197, 225, 225, 50,
|
|
|
|
|
loveDuetNormalBackground,
|
|
|
|
|
loveDuetNormalBackground,
|
|
|
|
|
loveDuetActiveBackground,
|
|
|
|
|
LoveDuetButton_Click);
|
|
|
|
|
|
|
|
|
|
loveDuetButton.MouseLeave += (sender, e) => loveDuetButton.BackgroundImage = loveDuetActiveBackground;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
talentShowButton = new Button { Text = "", Visible = false };
|
|
|
|
|
ResizeAndPositionButton(talentShowButton, 1197, 280, 225, 50);
|
|
|
|
|
Rectangle talentShowButtonCropArea = new Rectangle(1197, 280, 225, 50);
|
|
|
|
|
talentShowNormalBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\7.類別查詢_選秀節目(未按).png"));
|
|
|
|
|
talentShowActiveBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\7.類別查詢_選秀節目(已按).png"));
|
|
|
|
|
talentShowButton.BackgroundImage = talentShowNormalBackground;
|
|
|
|
|
talentShowButton.BackgroundImageLayout = ImageLayout.Stretch;
|
|
|
|
|
talentShowButton.FlatStyle = FlatStyle.Flat;
|
|
|
|
|
talentShowButton.FlatAppearance.BorderSize = 0;
|
|
|
|
|
talentShowButton.Click += TalentShowButton_Click;
|
|
|
|
|
this.Controls.Add(talentShowButton);
|
|
|
|
|
ConfigureButton(talentShowButton, 1197, 280, 225, 50,
|
|
|
|
|
talentShowNormalBackground,
|
|
|
|
|
talentShowNormalBackground,
|
|
|
|
|
talentShowNormalBackground,
|
|
|
|
|
TalentShowButton_Click);
|
|
|
|
|
|
|
|
|
|
talentShowButton.MouseLeave += (sender, e) => talentShowButton.BackgroundImage = talentShowActiveBackground;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
medleyDanceButton = new Button { Text = "", Visible = false };
|
|
|
|
|
ResizeAndPositionButton(medleyDanceButton, 1197, 335, 225, 50);
|
|
|
|
|
Rectangle medleyDanceButtonCropArea = new Rectangle(1197, 335, 225, 50);
|
|
|
|
|
medleyDanceNormalBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\7.類別查詢_串燒舞曲(未按).png"));
|
|
|
|
|
medleyDanceActiveBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\7.類別查詢_串燒舞曲(已按).png"));
|
|
|
|
|
medleyDanceButton.BackgroundImage = medleyDanceNormalBackground;
|
|
|
|
|
medleyDanceButton.BackgroundImageLayout = ImageLayout.Stretch;
|
|
|
|
|
medleyDanceButton.FlatStyle = FlatStyle.Flat;
|
|
|
|
|
medleyDanceButton.FlatAppearance.BorderSize = 0;
|
|
|
|
|
medleyDanceButton.Click += MedleyDanceButton_Click;
|
|
|
|
|
this.Controls.Add(medleyDanceButton);
|
|
|
|
|
ConfigureButton(medleyDanceButton, 1197, 335, 225, 50,
|
|
|
|
|
medleyDanceNormalBackground,
|
|
|
|
|
medleyDanceNormalBackground,
|
|
|
|
|
medleyDanceNormalBackground,
|
|
|
|
|
MedleyDanceButton_Click);
|
|
|
|
|
|
|
|
|
|
medleyDanceButton.MouseLeave += (sender, e) => medleyDanceButton.BackgroundImage = medleyDanceActiveBackground;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ninetiesButton = new Button { Text = "", Visible = false };
|
|
|
|
|
ResizeAndPositionButton(ninetiesButton, 1197, 390, 225, 50);
|
|
|
|
|
Rectangle ninetiesButtonCropArea = new Rectangle(1197, 390, 225, 50);
|
|
|
|
|
ninetiesNormalBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\7.類別查詢_90年代(未按).png"));
|
|
|
|
|
ninetiesActiveBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\7.類別查詢_90年代(已按).png"));
|
|
|
|
|
ninetiesButton.BackgroundImage = ninetiesNormalBackground;
|
|
|
|
|
ninetiesButton.BackgroundImageLayout = ImageLayout.Stretch;
|
|
|
|
|
ninetiesButton.FlatStyle = FlatStyle.Flat;
|
|
|
|
|
ninetiesButton.FlatAppearance.BorderSize = 0;
|
|
|
|
|
ninetiesButton.Click += NinetiesButton_Click;
|
|
|
|
|
this.Controls.Add(ninetiesButton);
|
|
|
|
|
ConfigureButton(ninetiesButton, 1197, 390, 225, 50,
|
|
|
|
|
ninetiesNormalBackground,
|
|
|
|
|
ninetiesNormalBackground,
|
|
|
|
|
ninetiesNormalBackground,
|
|
|
|
|
NinetiesButton_Click);
|
|
|
|
|
|
|
|
|
|
ninetiesButton.MouseLeave += (sender, e) => ninetiesButton.BackgroundImage = ninetiesActiveBackground;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
nostalgicSongsButton = new Button { Text = "", Visible = false };
|
|
|
|
|
ResizeAndPositionButton(nostalgicSongsButton, 1197, 445, 225, 50);
|
|
|
|
|
Rectangle nostalgicSongsButtonCropArea = new Rectangle(1197, 445, 225, 50);
|
|
|
|
|
nostalgicSongsNormalBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\7.類別查詢_懷舊老歌(未按).png"));
|
|
|
|
|
nostalgicSongsActiveBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\7.類別查詢_懷舊老歌(已按).png"));
|
|
|
|
|
nostalgicSongsButton.BackgroundImage = nostalgicSongsNormalBackground;
|
|
|
|
|
nostalgicSongsButton.BackgroundImageLayout = ImageLayout.Stretch;
|
|
|
|
|
nostalgicSongsButton.FlatStyle = FlatStyle.Flat;
|
|
|
|
|
nostalgicSongsButton.FlatAppearance.BorderSize = 0;
|
|
|
|
|
nostalgicSongsButton.Click += NostalgicSongsButton_Click;
|
|
|
|
|
this.Controls.Add(nostalgicSongsButton);
|
|
|
|
|
ConfigureButton(nostalgicSongsButton, 1197, 445, 225, 50,
|
|
|
|
|
nostalgicSongsNormalBackground,
|
|
|
|
|
nostalgicSongsNormalBackground,
|
|
|
|
|
nostalgicSongsNormalBackground,
|
|
|
|
|
NostalgicSongsButton_Click);
|
|
|
|
|
|
|
|
|
|
nostalgicSongsButton.MouseLeave += (sender, e) => nostalgicSongsButton.BackgroundImage = nostalgicSongsActiveBackground;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
chinaSongsButton = new Button { Text = "", Visible = false };
|
|
|
|
|
ResizeAndPositionButton(chinaSongsButton, 1197, 500, 225, 50);
|
|
|
|
|
Rectangle chinaCropArea = new Rectangle(1197, 500, 225, 50);
|
|
|
|
|
ConfigureButton(chinaSongsButton, 1197, 500, 225, 50,
|
|
|
|
|
chinaNormalBackground,
|
|
|
|
|
chinaNormalBackground,
|
|
|
|
|
chinaNormalBackground,
|
|
|
|
|
ChinaSongsButton_Click);
|
|
|
|
|
|
|
|
|
|
chinaSongsButton.MouseLeave += (sender, e) => chinaSongsButton.BackgroundImage = chinaActiveBackground;
|
|
|
|
|
|
|
|
|
|
chinaNormalBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\7.類別查詢_中國大陸(未按).png"));
|
|
|
|
|
chinaActiveBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\7.類別查詢_中國大陸(已按).png"));
|
|
|
|
|
chinaSongsButton.BackgroundImage = chinaNormalBackground;
|
|
|
|
|
chinaSongsButton.BackgroundImageLayout = ImageLayout.Stretch;
|
|
|
|
|
chinaSongsButton.FlatStyle = FlatStyle.Flat;
|
|
|
|
|
chinaSongsButton.FlatAppearance.BorderSize = 0;
|
|
|
|
|
chinaSongsButton.Click += ChinaSongsButton_Click;
|
|
|
|
|
this.Controls.Add(chinaSongsButton);
|
|
|
|
|
|
|
|
|
|
vietnameseSongsButton = new Button { Text = "", Visible = false };
|
|
|
|
|
ResizeAndPositionButton(vietnameseSongsButton, 1197, 555, 225, 50);
|
|
|
|
|
Rectangle vietnameseCropArea = new Rectangle(1197, 555, 225, 50);
|
|
|
|
|
|
|
|
|
|
vietnameseNormalBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\7.類別查詢_越南歌曲(未按).png"));
|
|
|
|
|
vietnameseActiveBackground = new Bitmap(Path.Combine(Application.StartupPath, "themes\\superstar\\button\\2.次類別\\7.類別查詢_越南歌曲(已按).png"));
|
|
|
|
|
vietnameseSongsButton.BackgroundImage = vietnameseNormalBackground;
|
|
|
|
|
vietnameseSongsButton.BackgroundImageLayout = ImageLayout.Stretch;
|
|
|
|
|
vietnameseSongsButton.FlatStyle = FlatStyle.Flat;
|
|
|
|
|
vietnameseSongsButton.FlatAppearance.BorderSize = 0;
|
|
|
|
|
vietnameseSongsButton.Click += VietnameseSongsButton_Click;
|
|
|
|
|
this.Controls.Add(vietnameseSongsButton);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ConfigureButton(vietnameseSongsButton, 1197, 555, 225, 50,
|
|
|
|
|
vietnameseNormalBackground,
|
|
|
|
|
vietnameseNormalBackground,
|
|
|
|
|
vietnameseNormalBackground,
|
|
|
|
|
VietnameseSongsButton_Click);
|
|
|
|
|
|
|
|
|
|
vietnameseSongsButton.MouseLeave += (sender, e) => vietnameseSongsButton.BackgroundImage = vietnameseActiveBackground;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void CategorySearchButton_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
newSongAlertButton.BackgroundImage = newSongAlertNormalBackground;
|
|
|
|
|
hotPlayButton.BackgroundImage = hotPlayNormalBackground;
|
|
|
|
|
singerSearchButton.BackgroundImage = singerSearchNormalBackground;
|
|
|
|
@ -169,13 +168,9 @@ namespace DualScreenDemo
|
|
|
|
|
deliciousFoodButton.BackgroundImage = deliciousFoodNormalBackground;
|
|
|
|
|
isOnOrderedSongsPage = false;
|
|
|
|
|
|
|
|
|
|
loveDuetButton.BackgroundImage = loveDuetActiveBackground;
|
|
|
|
|
talentShowButton.BackgroundImage = talentShowNormalBackground;
|
|
|
|
|
medleyDanceButton.BackgroundImage = medleyDanceNormalBackground;
|
|
|
|
|
ninetiesButton.BackgroundImage = ninetiesNormalBackground;
|
|
|
|
|
nostalgicSongsButton.BackgroundImage = nostalgicSongsNormalBackground;
|
|
|
|
|
chinaSongsButton.BackgroundImage = chinaNormalBackground;
|
|
|
|
|
ResetBtnStatus();
|
|
|
|
|
|
|
|
|
|
loveDuetButton.BackgroundImage = loveDuetActiveBackground;
|
|
|
|
|
|
|
|
|
|
/*loveDuetSongs = allSongs.Where(song => song.SongGenre.Contains("A1"))
|
|
|
|
|
.OrderByDescending(song => song.Plays)
|
|
|
|
|