Example #1
0
 public void Save()
 {
     if (FullName == null)
     {
         throw new InvalidOperationException("Unable to save album with no name");
     }
     AlbumStorage.WriteAlbum(Album, FullName, Password);
 }
Example #2
0
 public AlbumManager(string name) : this()
 {
     this.name = name;
     album     = AlbumStorage.ReadAlbum(name);
     if (Album.Count > 0)
     {
         Index = 0;
     }
 }
Example #3
0
 public void Save(string name, bool overwrite)
 {
     if (name == null)
     {
         throw new ArgumentNullException("name");
     }
     if (name != FullName && AlbumExists(name) && !overwrite)
     {
         throw new ArgumentException("An album with this name exists");
     }
     AlbumStorage.WriteAlbum(Album, name, Password);
     FullName = name;
 }
Example #4
0
 public AlbumManager(string name, string pwd) : this()
 {
     this.name = name;
     album     = AlbumStorage.ReadAlbum(name, pwd);
     Password  = pwd;
 }