Beispiel #1
0
 public Person(string name, MyTupleXML <int, int> ageBracket, DateTime dateOfBirth, string sex, int zipCode,
               string phoneNumber, string favoritePrimaryColor, List <string> bestPizzaToppings, string dreamJob,
               string vehicle)
 {
     this.Name                 = name;
     this.AgeBracket           = ageBracket;
     this.DateOfBirth          = dateOfBirth;
     this.Sex                  = sex;
     this.ZipCode              = zipCode;
     this.TenDigitPhoneNumber  = phoneNumber;
     this.FavoritePrimaryColor = favoritePrimaryColor;
     this.BestPizzaToppings    = bestPizzaToppings;
     this.DreamJob             = dreamJob;
     this.Vehicle              = vehicle;
 }
        public CustomEntry(string file)
        {
            Application word = new Application();
            Document    doc  = word.Documents.Open(file);

            this.Author = doc.BuiltInDocumentProperties["Author"].Value;
            this.Title  = doc.BuiltInDocumentProperties["Title"].Value;
            this.Trial  = doc.BuiltInDocumentProperties["Subject"].Value;
            Person p = ExtractResponses(doc);

            word.Quit();
            this.Name                 = p.Name;
            this.AgeBracket           = p.AgeBracket;
            this.DateOfBirth          = p.DateOfBirth;
            this.Sex                  = p.Sex;
            this.ZipCode              = p.ZipCode;
            this.TenDigitPhoneNumber  = p.TenDigitPhoneNumber;
            this.FavoritePrimaryColor = p.FavoritePrimaryColor;
            this.BestPizzaToppings    = p.BestPizzaToppings;
            this.DreamJob             = p.DreamJob;
            this.Vehicle              = p.Vehicle;
        }