コード例 #1
0
ファイル: ContactBuilder.cs プロジェクト: 0000duck/bird
        private void OnContactUpdateReceived(object sender, ControlCommandOccuredEventArgs e)
        {
            var contact = getContactFromReceivedData(e.data);

            contact.currentIp = e.id;
            ContactsStore.getInstance().addContact(contact.mac, contact);
        }
コード例 #2
0
ファイル: ContactsStore.cs プロジェクト: 0000duck/bird
        public static ContactsStore getInstance()
        {
            if (instance == null)
            {
                if (StorageHandler.doesContactsFileExistInDerectory())
                {
                    instance = StorageHandler.getContactsStore();
                }
                else
                {
                    instance = new ContactsStore();
                    StorageHandler.updateMyContactsFile(instance);
                }
            }

            return(instance);
        }