Esempio n. 1
0
        private void contact_click(object sender, RoutedEventArgs e)
        {
            _controls.contactField clicked = (_controls.contactField)sender;
            Page P = new _pages.conversation(clicked.name.Content.ToString(), clicked.phone.Content.ToString());

            this.NavigationService.Navigate(P);
        }
Esempio n. 2
0
        private void searchContatcs(string query)
        {
            contactsGrid.Children.Clear();
            int i         = 0;
            int marginTop = 65;

            if (_class.core.contactList == null)
            {
                _class.core.getContacts();
            }

            foreach (_class.Contact C in _class.core.contactList.Contact)
            {
                marginTop = 65 * i;
                _controls.contactField contact = new _controls.contactField();
                contact.MouseDown    += contact_click;
                contact.Margin        = new Thickness(0, marginTop, 0, 0);
                contact.name.Content  = _class.core.DecodeFromUtf8(C.name.Replace("\n", " "));
                contact.phone.Content = C.phoneNumber;
                if (C.name.ToUpper().Contains(query.ToUpper()))
                {
                    contactsGrid.Children.Add(contact);
                    i++;
                }
            }
        }
Esempio n. 3
0
        private void buildContactsList()
        {
            int i         = 0;
            int marginTop = 65;

            if (_class.core.contactList == null)
            {
                _class.core.getContacts();
            }

            foreach (_class.Contact C in _class.core.contactList.Contact)
            {
                marginTop = 65 * i;
                _controls.contactField contact = new _controls.contactField();
                contact.MouseDown    += contact_click;
                contact.Margin        = new Thickness(0, marginTop, 0, 0);
                contact.name.Content  = _class.core.DecodeFromUtf8(C.name.Replace("\n", " "));
                contact.phone.Content = C.phoneNumber;
                contactsGrid.Children.Add(contact);
                i++;
            }
        }