示例#1
0
        private void GetContactFromId()
        {
            int index = (int)cbContactsListFound.IndexOfSelectedItem;

            string id = valuesFound[index];

            if (rainbowContacts.GetContactFromContactId(id) == null)
            {
                BeginInvokeOnMainThread(() => { btnRoster.Title = "Add"; });
            }
            else
            {
                BeginInvokeOnMainThread(() => { btnRoster.Title = "Remove"; });
            }

            rainbowContacts.GetContactFromContactIdFromServer(id, callback =>
            {
                if (callback.Result.Success)
                {
                    BeginInvokeOnMainThread(() => { UpdateDetailsFoundContact(callback.Data); });
                }
                else
                {
                    string logline = String.Format("Impossible to get info about this contact [{1}]:\r\n{0}", Util.SerializeSdkError(callback.Result), id);
                }
            });
        }
示例#2
0
 public override void GetContactFromContactIdFromServer(String peerId, Action <SdkResult <Contact> > callback = null)
 {
     RbContacts.GetContactFromContactIdFromServer(peerId, null);
 }