最後整理,不連接SQLite(完成)
This commit is contained in:
parent
8ea87307f1
commit
fb2ae757bb
@ -25,7 +25,7 @@ namespace DBObj
|
|||||||
public ArtistManager()
|
public ArtistManager()
|
||||||
{
|
{
|
||||||
AllArtists = new List<Artist>();
|
AllArtists = new List<Artist>();
|
||||||
LoadArtists();
|
//LoadArtists();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ namespace DBObj
|
|||||||
|
|
||||||
// 继续使用可用的数据库(可能是更新后的或原本的本地数据库)
|
// 继续使用可用的数据库(可能是更新后的或原本的本地数据库)
|
||||||
InitializeDatabase();
|
InitializeDatabase();
|
||||||
LoadSongs();
|
//LoadSongs();
|
||||||
InitializeNewSongLists();
|
InitializeNewSongLists();
|
||||||
InitializeHotSongLists();
|
InitializeHotSongLists();
|
||||||
}
|
}
|
||||||
|
@ -111,14 +111,6 @@ namespace DualScreenDemo
|
|||||||
activeButton.BackgroundImage = activeBackground;
|
activeButton.BackgroundImage = activeBackground;
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<SongData> GetSongsByCategory(string category, int limit)
|
|
||||||
{
|
|
||||||
return allSongs.Where(song => song.Category == category)
|
|
||||||
.OrderByDescending(song => song.Plays)
|
|
||||||
.Take(limit)
|
|
||||||
.ToList();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void UpdateSongList(List<SongData> songs)
|
private void UpdateSongList(List<SongData> songs)
|
||||||
{
|
{
|
||||||
currentPage = 0;
|
currentPage = 0;
|
||||||
|
@ -131,10 +131,12 @@ namespace DualScreenDemo
|
|||||||
|
|
||||||
private void AlbumButton_Click(object sender, EventArgs e)
|
private void AlbumButton_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
string name = currentSelectedSong.ArtistA;
|
||||||
var selectedSongs = allSongs.Where(song => song.ArtistA == currentSelectedSong.ArtistA)
|
string query = $"SELECT * FROM SongLibrary WHERE `歌星 A` = '{name}' ORDER BY `新增日期` DESC";
|
||||||
|
var selectedSongs = SearchSongs_Mysql(query);
|
||||||
|
/*var selectedSongs = allSongs.Where(song => song.ArtistA == currentSelectedSong.ArtistA)
|
||||||
.OrderByDescending(song => song.AddedTime)
|
.OrderByDescending(song => song.AddedTime)
|
||||||
.ToList();
|
.ToList();*/
|
||||||
|
|
||||||
UpdateSongList(selectedSongs);
|
UpdateSongList(selectedSongs);
|
||||||
SetVodScreenPictureBoxAndButtonsVisibility(false);
|
SetVodScreenPictureBoxAndButtonsVisibility(false);
|
||||||
|
@ -173,22 +173,11 @@ namespace DualScreenDemo
|
|||||||
|
|
||||||
private static Bitmap normalStateImageForLightControl;
|
private static Bitmap normalStateImageForLightControl;
|
||||||
private static Bitmap resizedNormalStateImageForLightControl;
|
private static Bitmap resizedNormalStateImageForLightControl;
|
||||||
|
|
||||||
public VideoPlayerForm videoPlayerForm;
|
public VideoPlayerForm videoPlayerForm;
|
||||||
|
|
||||||
|
|
||||||
public List<SongData> allSongs;
|
|
||||||
public List<Artist> allArtists;
|
|
||||||
public List<SongData> currentSongList;
|
public List<SongData> currentSongList;
|
||||||
public List<Artist> currentArtistList;
|
public List<Artist> currentArtistList;
|
||||||
public List<SongData> publicSongList;
|
public List<SongData> publicSongList;
|
||||||
//private List<SongData> guoYuSongs;
|
|
||||||
//private List<SongData> guoYuSongs2;
|
|
||||||
//private List<SongData> taiYuSongs2;
|
|
||||||
//private List<SongData> yueYuSongs2;
|
|
||||||
//private List<SongData> yingWenSongs2;
|
|
||||||
//private List<SongData> riYuSongs2;
|
|
||||||
//private List<SongData> hanYuSongs2;
|
|
||||||
public static List<SongData> userRequestedSongs;
|
public static List<SongData> userRequestedSongs;
|
||||||
public static List<SongData> playedSongsHistory;
|
public static List<SongData> playedSongsHistory;
|
||||||
public static List<PlayState> playStates;
|
public static List<PlayState> playStates;
|
||||||
|
@ -51,8 +51,8 @@ static void Main()
|
|||||||
|
|
||||||
// 創建主窗體
|
// 創建主窗體
|
||||||
primaryForm = new PrimaryForm();
|
primaryForm = new PrimaryForm();
|
||||||
primaryForm.allSongs = songListManager.AllSongs;
|
//primaryForm.allSongs = songListManager.AllSongs;
|
||||||
primaryForm.allArtists = artistManager.AllArtists;
|
//primaryForm.allArtists = artistManager.AllArtists;
|
||||||
primaryForm.StartPosition = FormStartPosition.Manual;
|
primaryForm.StartPosition = FormStartPosition.Manual;
|
||||||
primaryForm.Location = new Point(0, 0);
|
primaryForm.Location = new Point(0, 0);
|
||||||
primaryForm.Size = new Size(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height);
|
primaryForm.Size = new Size(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user