最後整理,不連接SQLite(完成)
This commit is contained in:
parent
8ea87307f1
commit
fb2ae757bb
@ -25,7 +25,7 @@ namespace DBObj
|
||||
public ArtistManager()
|
||||
{
|
||||
AllArtists = new List<Artist>();
|
||||
LoadArtists();
|
||||
//LoadArtists();
|
||||
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,7 @@ namespace DBObj
|
||||
|
||||
// 继续使用可用的数据库(可能是更新后的或原本的本地数据库)
|
||||
InitializeDatabase();
|
||||
LoadSongs();
|
||||
//LoadSongs();
|
||||
InitializeNewSongLists();
|
||||
InitializeHotSongLists();
|
||||
}
|
||||
|
@ -111,14 +111,6 @@ namespace DualScreenDemo
|
||||
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)
|
||||
{
|
||||
currentPage = 0;
|
||||
|
@ -131,10 +131,12 @@ namespace DualScreenDemo
|
||||
|
||||
private void AlbumButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
var selectedSongs = allSongs.Where(song => song.ArtistA == currentSelectedSong.ArtistA)
|
||||
string name = 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)
|
||||
.ToList();
|
||||
.ToList();*/
|
||||
|
||||
UpdateSongList(selectedSongs);
|
||||
SetVodScreenPictureBoxAndButtonsVisibility(false);
|
||||
|
@ -173,22 +173,11 @@ namespace DualScreenDemo
|
||||
|
||||
private static Bitmap normalStateImageForLightControl;
|
||||
private static Bitmap resizedNormalStateImageForLightControl;
|
||||
|
||||
public VideoPlayerForm videoPlayerForm;
|
||||
|
||||
|
||||
public List<SongData> allSongs;
|
||||
public List<Artist> allArtists;
|
||||
public List<SongData> currentSongList;
|
||||
public List<Artist> currentArtistList;
|
||||
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> playedSongsHistory;
|
||||
public static List<PlayState> playStates;
|
||||
|
@ -51,8 +51,8 @@ static void Main()
|
||||
|
||||
// 創建主窗體
|
||||
primaryForm = new PrimaryForm();
|
||||
primaryForm.allSongs = songListManager.AllSongs;
|
||||
primaryForm.allArtists = artistManager.AllArtists;
|
||||
//primaryForm.allSongs = songListManager.AllSongs;
|
||||
//primaryForm.allArtists = artistManager.AllArtists;
|
||||
primaryForm.StartPosition = FormStartPosition.Manual;
|
||||
primaryForm.Location = new Point(0, 0);
|
||||
primaryForm.Size = new Size(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height);
|
||||
|
Loading…
x
Reference in New Issue
Block a user