Пример #1
0
 public Playlists_List()
 {
     InitializeComponent();
     playlist   = new List <Song>();
     songPanels = new List <Panel>();
     ap         = new AddPanels();
     Index      = -1;
 }
Пример #2
0
 public Allsongs(bool x)  //x = true  display all songs    x = false  display the top 10
 {
     InitializeComponent();
     ap         = new AddPanels();
     songList   = new List <Song>();
     songPanels = new List <Panel>();
     Index      = -1;
     all        = x;
 }
Пример #3
0
 public RemoveSongs(int x) //if x = 0 then remove songs  x = 1 creating playlist  x = 2 remove playlist
 {
     InitializeComponent();
     indexList  = new List <int>();
     songList   = new List <Song>();
     songPanels = new List <Panel>();
     ap         = new AddPanels();
     del        = x;
     if (del != 0 && del != 1 && del != 2)
     {
         this.Close();
     }
 }
Пример #4
0
        public PlayList(Playlists_List x)
        {
            InitializeComponent();
            playlist   = new List <Song>();
            songPanels = new List <Panel>();
            ap         = new AddPanels();
            indexList  = new List <int>();
            BinaryFormatter bf = new BinaryFormatter();
            FileStream      f  = new FileStream("Files/Songs/songs.dat", FileMode.OpenOrCreate);

            try
            {
                songList = (List <Song>)bf.Deserialize(f);
            }
            catch
            {
                songList = new List <Song>();
            }
            f.Close();
            caller = x;
        }