private void OnLoaded(object sender, RoutedEventArgs routedEventArgs)
 {
     var friends = handler._skype.Friends.Cast<User>();
     foreach (User user in friends)
     {
         //SaveSkypeAvatar(user.Handle, user.FullName + ".jpg");
         var holder = new ContactHolder {ContactDisplayName = user.DisplayName};
         Contacts.Add(holder);
     }
 }
示例#2
0
        private void OnLoaded(object sender, RoutedEventArgs routedEventArgs)
        {
            var friends = handler._skype.Friends.Cast <User>();

            foreach (User user in friends)
            {
                //SaveSkypeAvatar(user.Handle, user.FullName + ".jpg");
                var holder = new ContactHolder {
                    ContactDisplayName = user.DisplayName
                };
                Contacts.Add(holder);
            }
        }
示例#3
0
    private void UpdateContactsList()
    {
        if (Contacts == null)
        {
            return;
        }

        noContactsText.text = Contacts.Count == 0 ? "Phone Book Empty" : "";
        DeactivateHolders();

        for (int i = 0; i < Contacts.Count; i++)
        {
            contact = Contacts[i];
            if (contact == null)
            {
                continue;
            }

            //Safety Checks
            holderObject = contactHolderPool.Get();
            if (holderObject == null)
            {
                Debug.LogError("Error getting pooled object");
                return;
            }
            holder = holderObject.GetComponent <ContactHolder>();
            if (holder == null)
            {
                Debug.LogError("Error getting pooled object component");
                return;
            }
            //
            //Debug.Log(holder.name);
            holder.SetConact(contact);
            holderObject.SetActive(true);
            activeContactHolders.Add(holderObject);
        }
    }