private void InitName() { ContactRow row = new ContactRow(); row.labelTitle.Content = "Name"; row.SetSingle(); if (m_contact != null) { row.AddOne(m_contact.FullName); } else { row.AddOne(null); } mypanel.Children.Add(row); }
private void InitAddress() { ContactRow row = new ContactRow(); row.labelTitle.Content = "Address"; if (m_contact != null && m_contact.Addresses.Count > 0) { foreach (var addr in m_contact.Addresses) { row.AddOne(addr.StreetAddress); } } else { row.AddOne(null); } mypanel.Children.Add(row); }
private void InitEmail() { ContactRow row = new ContactRow(); row.labelTitle.Content = "Email"; if (m_contact != null && m_contact.Emails.Count > 0) { foreach (var mail in m_contact.Emails) { row.AddOne(mail.Address); } } else { row.AddOne(null); } mypanel.Children.Add(row); }
private void InitPhone() { ContactRow row = new ContactRow(); row.labelTitle.Content = "Phone"; if (m_contact != null && m_contact.Phones.Count > 0) { foreach (var phone in m_contact.Phones) { row.AddOne(phone.Number); } } else { row.AddOne(null); } mypanel.Children.Add(row); }
private void InitWeb() { ContactRow row = new ContactRow(); row.labelTitle.Content = "Website"; if (m_contact != null && m_contact.Websites.Count > 0) { foreach (var web in m_contact.Websites) { row.AddOne(web.RawValue); } } else { row.AddOne(null); } mypanel.Children.Add(row); }
private void InitSignificantOthers() { ContactRow row = new ContactRow(); row.labelTitle.Content = "Significant Other"; //row.SetSingle(); if (m_contact != null && m_contact.SignificantOthers.Count > 0) { foreach (var d in m_contact.SignificantOthers) { string s = d.Relationship + ": " + d.Name; row.AddOne(s); } } else { row.AddOne(null); } mypanel.Children.Add(row); }
private void InitJobOffice() { ContactRow row = new ContactRow(); row.labelTitle.Content = "Job Office"; row.SetSingle(); if (m_contact != null && m_contact.JobInfo.Count > 0) { foreach (var job in m_contact.JobInfo) { row.AddOne(job.Office); break; } } else { row.AddOne(null); } mypanel.Children.Add(row); }
private void InitImportantDate() { ContactRow row = new ContactRow(); row.labelTitle.Content = "Important Date"; //row.SetSingle(); if (m_contact != null && m_contact.ImportantDates.Count > 0) { foreach (var d in m_contact.ImportantDates) { int? year = d.Year; uint? month = d.Month; uint? date = d.Day; string s = d.Kind.ToString() + ": " + year + "-" + month + "-" + date; row.AddOne(s); } } else { row.AddOne(null); } mypanel.Children.Add(row); }