示例#1
0
 public void Save()
 {
     if (FullName == null)
     {
         throw new InvalidOperationException("Unable to save album with no name");
     }
     AlbumStorage.WriteAlbum(Album, FullName, Password);
 }
示例#2
0
 public AlbumManager(string name) : this()
 {
     this.name = name;
     album     = AlbumStorage.ReadAlbum(name);
     if (Album.Count > 0)
     {
         Index = 0;
     }
 }
示例#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;
 }
示例#4
0
 public AlbumManager(string name, string pwd) : this()
 {
     this.name = name;
     album     = AlbumStorage.ReadAlbum(name, pwd);
     Password  = pwd;
 }