c#实现KTV点歌系统

2019-12-26 13:10:24王旭

这篇文章主要用C#语言编写的KTV点歌系统,需要的朋友可以参考下

下面通过图文并茂的方式给大家分享C#实现KTV点歌系统。

c#实现KTV点歌系统

c#实现KTV点歌系统

 

 
  1. public enum SongPlayState  { 
  2. //未播放,播放,重播,切歌  unplayed, played, again, cut 
  3. }  public class Song 
  4. {  public string SongName { get; set; }//歌曲名称 
  5. public string SongURL { get; set; }//歌曲路径  public SongPlayState playState = SongPlayState.unplayed;//默认未播放 
  6. internal SongPlayState PlayState { get; set; }  //状态为已播 
  7. public void SetSongPlayed()  { 
  8. this.PlayState = SongPlayState.played;  } 
  9. //重唱  public void SetPlayAgain() 
  10. {  this.playState = SongPlayState.again; 
  11. }  //切歌 
  12. public void SetSongCut()  { 
  13. this.playState = SongPlayState.cut;  } 

PlayList类中实现切歌 重唱 下一首 等.....

 

 
  1. public class PlayList  { 
  2. //定义一个长度为、 的歌曲数组,默认存储 首歌曲  public static Song[] SongList = new Song[ ];