private void ListProperties(Contact cContact) { Console.WriteLine("ID=" + cContact.ID); Console.WriteLine("USERNAME="******"") { Console.WriteLine("FN=" + cContact.FN); } IABList nList = cContact.GetNames(); foreach(Name cName in nList) { Console.Write("N=("); Console.Write("ID=" + cName.ID); if (cName.Prefix != "") { Console.Write(";Prefix="); Console.Write(cName.Prefix); } if (cName.Given != "") { Console.Write(";Given="); Console.Write(cName.Given); } if (cName.Other != "") { Console.Write(";Other="); Console.Write(cName.Other); } if (cName.Family != "") { Console.Write(";Family="); Console.Write(cName.Family); } if (cName.Suffix != "") { Console.Write(";Suffix="); Console.Write(cName.Suffix); } if (cName.Preferred == true) { Console.Write(";PREF"); } Console.WriteLine(")"); } if (cContact.Nickname != "") { Console.WriteLine("NICKNAME=" + cContact.Nickname); } if (cContact.Title != "") { Console.WriteLine("TITLE=" + cContact.Title); } if (cContact.Role != "") { Console.WriteLine("ROLE=" + cContact.Role); } IABList mList = cContact.GetEmailAddresses(); foreach(Email tMail in mList) { Console.Write("EMAIL=" + tMail.Address); if (tMail.Preferred == true) { Console.Write(";PREF"); } if ((tMail.Types & EmailTypes.work) == EmailTypes.work) { Console.Write(";WORK"); } if ((tMail.Types & EmailTypes.personal) == EmailTypes.personal) { Console.Write(";PERSONAL"); } if ((tMail.Types & EmailTypes.internet) == EmailTypes.internet) { Console.Write(";INTERNET"); } if ((tMail.Types & EmailTypes.x400) == EmailTypes.x400) { Console.Write(";X.400"); } Console.WriteLine(""); } IABList tList = cContact.GetTelephoneNumbers(); foreach(Telephone tPhone in tList) { Console.Write("TEL=" + tPhone.Number); if (tPhone.Preferred == true) { Console.Write(";PREF"); } if ((tPhone.Types & PhoneTypes.home) == PhoneTypes.home) { Console.Write(";HOME"); } if ((tPhone.Types & PhoneTypes.work) == PhoneTypes.work) { Console.Write(";WORK"); } if ((tPhone.Types & PhoneTypes.other) == PhoneTypes.other) { Console.Write(";OTHER"); } if ((tPhone.Types & PhoneTypes.cell) == PhoneTypes.cell) { Console.Write(";CELL"); } if ((tPhone.Types & PhoneTypes.voice) == PhoneTypes.voice) { Console.Write(";VOICE"); } if ((tPhone.Types & PhoneTypes.fax) == PhoneTypes.fax) { Console.Write(";FAX"); } if ((tPhone.Types & PhoneTypes.msg) == PhoneTypes.msg) { Console.Write(";MSG"); } if ((tPhone.Types & PhoneTypes.bbs) == PhoneTypes.bbs) { Console.Write(";BBS"); } if ((tPhone.Types & PhoneTypes.car) == PhoneTypes.car) { Console.Write(";CAR"); } if ((tPhone.Types & PhoneTypes.isdn) == PhoneTypes.isdn) { Console.Write(";ISDN"); } if ((tPhone.Types & PhoneTypes.modem) == PhoneTypes.modem) { Console.Write(";MODEM"); } if ((tPhone.Types & PhoneTypes.pager) == PhoneTypes.pager) { Console.Write(";PAGER"); } if ((tPhone.Types & PhoneTypes.pcs) == PhoneTypes.pcs) { Console.Write(";PCS"); } if ((tPhone.Types & PhoneTypes.video) == PhoneTypes.video) { Console.Write(";VIDEO"); } if ((tPhone.Types & PhoneTypes.voip) == PhoneTypes.voip) { Console.Write(";VOIP"); } Console.WriteLine(""); } if (cContact.Organization != "") { Console.WriteLine("ORG=" + cContact.Organization); } if (cContact.WorkForceID != "") { Console.WriteLine("WORKFORCEID=" + cContact.WorkForceID); } if (cContact.ManagerID != "") { Console.WriteLine("MANAGERID=" + cContact.ManagerID); } if (cContact.Birthday != "") { Console.WriteLine("BDAY=" + cContact.Birthday); } if (cContact.Blog != "") { Console.WriteLine("BLOG=" + cContact.Blog); } if (cContact.Url != "") { Console.WriteLine("URL=" + cContact.Url); } IABList aList = cContact.GetAddresses(); foreach(Address cAddress in aList) { Console.Write("ADR=("); if (cAddress.ID != "") { Console.Write("ID=" + cAddress.ID); } if (cAddress.Street != "") { Console.Write(";STREET=" + cAddress.Street); } if (cAddress.Locality != "") { Console.Write(";LOCALITY=" + cAddress.Locality); } if (cAddress.Region != "") { Console.Write(";REGION=" + cAddress.Region); } if (cAddress.PostalCode != "") { Console.Write(";PCODE=" + cAddress.PostalCode); } if (cAddress.PostalBox != "") { Console.Write(";PBOX=" + cAddress.PostalBox); } if (cAddress.Country != "") { Console.Write(";COUNTRY=" + cAddress.Country); } if (cAddress.Types != 0) { if ((cAddress.Types & AddressTypes.preferred) == AddressTypes.preferred) { Console.Write(";PREF"); } if ((cAddress.Types & AddressTypes.home) == AddressTypes.home) { Console.Write(";HOME"); } if ((cAddress.Types & AddressTypes.work) == AddressTypes.work) { Console.Write(";WORK"); } if ((cAddress.Types & AddressTypes.other) == AddressTypes.other) { Console.Write(";OTHER"); } if ((cAddress.Types & AddressTypes.postal) == AddressTypes.postal) { Console.Write(";POSTAL"); } if ((cAddress.Types & AddressTypes.parcel) == AddressTypes.parcel) { Console.Write(";PARCEL"); } if ((cAddress.Types & AddressTypes.dom) == AddressTypes.dom) { Console.Write(";DOM"); } if ((cAddress.Types & AddressTypes.intl) == AddressTypes.intl) { Console.Write(";INTL"); } } Console.WriteLine(")"); } if (cContact.Note != "") { Console.WriteLine("NOTE=" + cContact.Note); } }