Example #1
0
        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);
        }
Example #2
0
        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);
        }
Example #3
0
        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);
        }
Example #4
0
        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);
        }
Example #5
0
        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);
        }
Example #6
0
        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);
        }
Example #7
0
        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);
        }
Example #8
0
        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);
        }