Beispiel #1
0
        private void OnContactUpdateReceived(object sender, ControlCommandOccuredEventArgs e)
        {
            var contact = getContactFromReceivedData(e.data);

            contact.currentIp = e.id;
            ContactsStore.getInstance().addContact(contact.mac, contact);
        }
Beispiel #2
0
        public static ContactsStore getInstance()
        {
            if (instance == null)
            {
                if (StorageHandler.doesContactsFileExistInDerectory())
                {
                    instance = StorageHandler.getContactsStore();
                }
                else
                {
                    instance = new ContactsStore();
                    StorageHandler.updateMyContactsFile(instance);
                }
            }

            return(instance);
        }