Esempio n. 1
0
        public void SaveContact(Contact contact)
        {
            if (!CurrentContacts.Contains(contact))
            {
                CurrentContacts.Add(contact);
            }

            _contactRepository.Save(contact);
            StatusText = $"Contact '{contact.LookupName}' was saved.";
        }
        public void SaveContact(Contact contact)
        {
            if (!CurrentContacts.Contains(contact))
            {
                CurrentContacts.Add(contact);
            }

            _contactRepository.Save(contact);
            StatusText = string.Format("Contact ‘{0}’ was saved.", contact.LookupName);
        }
        public void SaveContact(Contact contact)
        {
            if (!CurrentContacts.Contains(contact))
            {
                CurrentContacts.Add(contact);
            }

            _contactRepository.Save(contact);

            string statusMessage = string.Format(
                "Contact <{0}> was saved.",
                contact.LookupName
                );

            UpdateStatusText(statusMessage);
        }
Esempio n. 4
0
 /// <summary>
 /// Adds a point as a type and class of contact
 /// </summary>
 /// <param name="newContact">Relative position from (0,0) <see cref="IContact"/></param>
 public void AddContact(IContact newContact)
 {
     if (CurrentContacts == null)
     {
         CurrentContacts = new SortedList <Guid, IContact>();
     }
     if (!CurrentContacts.ContainsKey(newContact.UniqueId))
     {
         CurrentContacts.Add(newContact.UniqueId, newContact);
         // newContact.UpdateRegion += Contact_UpdatePending;
         Logger.Debug($"Added contact: {newContact}");
     }
     else
     {
         Logger.Warn($"Already found reference to contact {newContact}");
     }
 }