Пример #1
0
        private void returnToSender()
        {
            counter = 0;
            Contact contact = new Contact();
            contact = ContactDB.ConvertFromContactDB(contacts [counter]);

            LOLConnectClient service = new LOLConnectClient(LOLConstants.DefaultHttpBinding, LOLConstants.LOLConnectEndpoint);
            service.ContactsSaveCompleted += Service_ContactsSaveCompleted;
            service.ContactsSaveAsync(contact, new Guid(AndroidData.ServiceAuthToken));
        }
Пример #2
0
        private void blockcontact_Click(object sender, EventArgs e)
        {
            LOLConnectClient service = new LOLConnectClient(LOLConstants.DefaultHttpBinding, LOLConstants.LOLConnectEndpoint);
            RunOnUiThread(() => Toast.MakeText(context,
                                              (EditContactUtil.UserContact.Blocked ? Resource.String.editContactBlocking : Resource.String.editContactUnblocking),
                                              ToastLength.Short).Show());

            service.ContactsSaveCompleted += Service_ContactsSaveCompleted;
            service.ContactsSaveAsync(ContactDB.ConvertFromContactDB(EditContactUtil.UserContact), new Guid(AndroidData.ServiceAuthToken));
        }
 private void AddUserAsContact()
 {
     RunOnUiThread (delegate {
         Toast.MakeText (context, Resource.String.contactsAddingContact, ToastLength.Short).Show ();
     });
     Contact contact = new Contact ();
     contact.Blocked = false;
     contact.ContactAccountID = UserFrom.AccountID;
     contact.OwnerAccountID = AndroidData.CurrentUser.AccountID;
     LOLConnectClient service = new LOLConnectClient (LOLConstants.DefaultHttpBinding, LOLConstants.LOLConnectEndpoint);
     service.ContactsSaveCompleted += Service_ContactsSaveCompleted;
     service.ContactsSaveAsync (contact, new Guid (AndroidData.ServiceAuthToken));
 }
        private void AddContact(ImageView checkbox, int contactId)
        {
            if (checkbox.ContentDescription == ADD_ENABLED)
            {
                Contact contact = new Contact();
                contact = ContactDB.ConvertFromContactDB(contacts [contactId]);

                LOLConnectClient service = new LOLConnectClient(LOLConstants.DefaultHttpBinding, LOLConstants.LOLConnectEndpoint);
                service.ContactsSaveCompleted += Service_ContactsSaveCompleted;
                service.ContactsSaveAsync(contact, new Guid(AndroidData.ServiceAuthToken));

                RunOnUiThread(delegate
                {
                    checkbox.SetImageDrawable(Application.Context.Resources.GetDrawable(Resource.Drawable.@checkedbox));
                    checkbox.ContentDescription = ADD_DISABLED;
                });
            }
        }