public void SaveArchive(XMasArchive archive)
 {
     File.Delete(mArchiveBackup);
       if (File.Exists(mArchivePath))
       {
     File.Move(mArchivePath, mArchiveBackup);
       }
       FileStream archiveFile = new FileStream(mArchivePath, FileMode.CreateNew, FileAccess.ReadWrite);
       XmlSerializer xml = new XmlSerializer(typeof(XMasArchive));
       xml.Serialize(archiveFile, archive);
       archiveFile.Close();
 }
 protected static bool AreEquals(XMasArchive a, XMasArchive b)
 {
     bool areEqual = true;
       if (a.mArchive.Keys.Count != b.mArchive.Keys.Count)
       {
     areEqual = false;
       }
       else
       {
     foreach (DateTime xmasDate in a.mArchive.Keys)
     {
       if (b.mArchive.ContainsKey(xmasDate) == false)
       {
     areEqual = false;
     break;
       }
       else
       {
     if (a.mArchive[xmasDate] != b.mArchive[xmasDate])
     {
       areEqual = false;
       break;
     }
       }
     }
       }
       return areEqual;
 }
 public KidListRuleProvider(FamilyTree family, XMasArchive archive, int years)
 {
     mFamily = family;
     mArchive = archive;
     mYearsBack = years;
 }
        protected XMasArchive CreateXmasPast()
        {
            string[] firstName1 = new string[] { "Ann", "Clare", "Beth", "Meg" };
              string[] firstName2 = new string[] { "Clare", "Ann", "Beth", "Meg" };
              string[] firstName3 = new string[] { "Clare", "Beth", "Ann", "Meg" };
              string[] firstName4 = new string[] { "Clare", "Beth", "Meg", "Ann" };

              XMasArchive tmp = new XMasArchive();
              tmp.Add(1971, this.CreateTestPickList(1971, firstName1));
              tmp.Add(1972, this.CreateTestPickList(1972, firstName2));
              tmp.Add(1973, this.CreateTestPickList(1973, firstName3));
              tmp.Add(1974, this.CreateTestPickList(1974, firstName4));
              return tmp;
        }