Ejemplo n.º 1
0
        /// <summary>
        /// Handler when the user wants to save the contact.
        /// </summary>
        private void HandleSaveEdit()
        {
            UpdateContactFromFields();

            #if PLATFORM_LUMIN
            MLResult contactResult = MLContacts.ValidateContact(_contact);
            if (!contactResult.IsOk)
            {
                _visualizerStatusText.text = string.Format("<color=red>{0}</color>", contactResult.ToString());
                return;
            }
            _contactsVisualizer.Contacts.SaveContact(_contact);
            #endif

            // leave the page, the MLContactsBehavior will update the
            // page depending on the result of operation
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Validates a contact.
 /// </summary>
 /// <param name="contact">Contact to be validated</param>
 /// <returns>Result of Validation</returns>
 public MLResult ValidateContact(MLContactsContact contact)
 {
     return(MLContacts.ValidateContact(contact));
 }