Ejemplo n.º 1
0
 public Playlist()
 {
     currentList = new PlaylistFile()
     {
         files = new List <EpisodeInfo>()
     };
 }
Ejemplo n.º 2
0
 public bool Load(string filePath)
 {
     if (!File.Exists(filePath))
     {
         CMBox.Show("Error", "Couldn't load playlist, Error: File not found", Style.Error, Buttons.OK);
         return(false);
     }
     else
     {
         try
         {
             using Stream fStream = new FileStream(filePath, FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.None);
             currentList          = (PlaylistFile)XmlFormatter.Deserialize(fStream);
             return(true);
         }
         catch (Exception ex)
         {
             CMBox.Show("Error", "Couldn't load playlist, Error: " + ex.Message, Style.Error, Buttons.OK, ex.ToString());
             return(false);
         }
     }
 }