当前位置: 首页>>代码示例>>C#>>正文


C# Contacts.SearchAsync方法代码示例

本文整理汇总了C#中Contacts.SearchAsync方法的典型用法代码示例。如果您正苦于以下问题:C# Contacts.SearchAsync方法的具体用法?C# Contacts.SearchAsync怎么用?C# Contacts.SearchAsync使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Contacts的用法示例。


在下文中一共展示了Contacts.SearchAsync方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Details_Loaded

 private void Details_Loaded(object sender, RoutedEventArgs e)
 {
     var name = NavigationContext.QueryString["name"];
     Contacts c = new Contacts();
     c.SearchCompleted += c_SearchCompleted;
     c.SearchAsync(name, FilterKind.DisplayName, name);
 }
开发者ID:ChrisKoenig,项目名称:DellMangoDemos,代码行数:7,代码来源:Details.xaml.cs

示例2: MainPage

 // Constructor
 public MainPage()
 {
     InitializeComponent();
     Contacts objContacts = new Contacts();
     objContacts.SearchCompleted += new EventHandler<ContactsSearchEventArgs>(objContacts_SearchCompleted);
     objContacts.SearchAsync(string.Empty, FilterKind.None, null);
 }
开发者ID:saratkiran,项目名称:Oven-Timer--Windows-phone-app-,代码行数:8,代码来源:MainPage.xaml.cs

示例3: GetAllAsync

        public Task<Contact[]> GetAllAsync()
        {
            var taskCompletionSource = new TaskCompletionSource<Contact[]>();
            var contacts = new Contacts();
            contacts.SearchCompleted += (sender, args) =>
            {
                var addressbook = args.Results
                    .Where(i => !string.IsNullOrEmpty(i.DisplayName))
                    .Select(ToContact)
                    .ToArray();

                //if there is no any contact (run in emulator?) - add several fakes
                if (!addressbook.Any())
                {
                    addressbook = new[]
                        {
                            new Contact { Name = "Egor Bogatov", Number = "+01231"},
                            new Contact { Name = "Ian Gillan", Number = "+01232"},
                            new Contact { Name = "Freddie Mercury", Number = "+01233"},
                            new Contact { Name = "David Gilmour", Number = "+01234"},
                            new Contact { Name = "Steve Ballmer", Number = "+01235"},
                        };
                }

                taskCompletionSource.SetResult(addressbook);
            };
            contacts.SearchAsync(string.Empty, FilterKind.DisplayName, null);

            return taskCompletionSource.Task;
        }
开发者ID:alexnaraghi,项目名称:SharedSquawk,代码行数:30,代码来源:ContactsRepository.cs

示例4: LoadContactsToDbAsync

        public void LoadContactsToDbAsync()
        {
            var cons = new Contacts();

            cons.SearchCompleted += ContactsSearchCompleted;
            cons.SearchAsync(String.Empty, FilterKind.None, null);
        }
开发者ID:ravado,项目名称:Foodler,代码行数:7,代码来源:ParticipantService.cs

示例5: fillContactsTextBox

 private string fillContactsTextBox()
 {
     Contacts cons = new Contacts();
     str = "";
     cons.SearchCompleted += new EventHandler<ContactsSearchEventArgs>(Contacts_SearchCompleted);
     cons.SearchAsync(String.Empty, FilterKind.None, "Contacts Test #1");
     return str;
 }
开发者ID:arjamizo,项目名称:Contacts-Serializer,代码行数:8,代码来源:MainPage.xaml.cs

示例6: SearchContacts

        private void SearchContacts()
        {
            Contacts cons = new Contacts();

            cons.SearchCompleted += new EventHandler<ContactsSearchEventArgs>(Contacts_SearchCompleted);

            cons.SearchAsync(String.Empty, contactFilterKind, "Contacts Test #1");
        }
开发者ID:johnedvard,项目名称:Spleisekalkulator,代码行数:8,代码来源:AddContactPage.xaml.cs

示例7: SyncContacts

        public async Task SyncContacts() {
            await TelegramSession.Instance.Established;

            Contacts contacts = new Contacts();
            contacts.SearchCompleted += ContactsOnSearchCompleted;
            contacts.SearchAsync(String.Empty, FilterKind.None, "Addressbook Contacts Sync");

        }
开发者ID:Grief-Code,项目名称:kilogram,代码行数:8,代码来源:ContactManager.cs

示例8: ProcurarContacto_Click

        private void ProcurarContacto_Click(object sender, RoutedEventArgs e)
        {
            var contacts = new Contacts();
            contacts.SearchCompleted += Contacts_SearchCompleted;

            contacts.SearchAsync(nomeTextbox.Text,
                FilterKind.DisplayName, null);
        }
开发者ID:caioproiete,项目名称:WP7MangoDevHub2011-DataAccess,代码行数:8,代码来源:MainPage.xaml.cs

示例9: addressTask_Completed

 void addressTask_Completed(object sender, AddressResult e)
 {
     if (e.TaskResult == TaskResult.OK)
     {
         Contacts contacts = new Contacts();
         contacts.SearchCompleted += new EventHandler<ContactsSearchEventArgs>(contacts_SearchCompleted);
         contacts.SearchAsync(e.DisplayName, FilterKind.DisplayName, null);
     }
 }
开发者ID:travbod57,项目名称:DatingDiary,代码行数:9,代码来源:ImportContactView.xaml.cs

示例10: People

 public People()
 {
     //setProgressBar(true);
     InitializeComponent();
     Contacts objContacts = new Contacts();
     objContacts.SearchCompleted += new EventHandler<ContactsSearchEventArgs>(Contacts_SearchCompleted);
     objContacts.SearchAsync(string.Empty, FilterKind.None, null);
     progressBar.Visibility = Visibility.Visible;
 }
开发者ID:UWbadgers16,项目名称:BillSync,代码行数:9,代码来源:People.xaml.cs

示例11: LoadData

        public void LoadData(bool refresh)
        {
            ContactItems.Clear();
            settings.IsLoadingContentSetting = true;
            Contacts cons = new Contacts();

            LoadFavorites("Favorites");
            cons.SearchCompleted += new EventHandler<ContactsSearchEventArgs>(ContactsSearch_Completed);
            cons.SearchAsync(String.Empty, FilterKind.None," Test" );
        }
开发者ID:shegg77,项目名称:Contacts,代码行数:10,代码来源:ModelView.cs

示例12: GetContactPictures_Click

        private void GetContactPictures_Click(object sender, RoutedEventArgs e)
        {
            Contacts cons = new Contacts();

            //Identify the method that runs after the asynchronous search completes.
            cons.SearchCompleted += new EventHandler<ContactsSearchEventArgs>(Contacts_SearchCompleted_Many);

            //Start the asynchronous search.
            cons.SearchAsync(String.Empty, FilterKind.None, "Contacts Test #3 Picture");
        }
开发者ID:trilok567,项目名称:Windows-Phone,代码行数:10,代码来源:MainPage.xaml.cs

示例13: CreateContactStore

 private async void CreateContactStore()
 {
     contacts = await ContactStore.CreateOrOpenAsync(ContactStoreSystemAccessMode.ReadWrite, ContactStoreApplicationAccessMode.ReadOnly);
     if (contacts.RevisionNumber <1)
     {
         Contacts cons = new Contacts();
         cons.SearchCompleted += new EventHandler<ContactsSearchEventArgs>(SearchCompleted);
         cons.SearchAsync(String.Empty, FilterKind.None, "Searching");
     }
 }
开发者ID:Ricealso,项目名称:PayBaq,代码行数:10,代码来源:MainPage.xaml.cs

示例14: PhoneNumbersGetContacts

        private void PhoneNumbersGetContacts()
        {
            Contacts cons = new Contacts();

            //Identify the method that runs after the asynchronous search completes.
            cons.SearchCompleted += new EventHandler<ContactsSearchEventArgs>(cons_SearchCompleted);

            //Start the asynchronous search. 
            cons.SearchAsync(String.Empty, FilterKind.DisplayName, null);

        }
开发者ID:mfouad90,项目名称:WinDeskMobileSms,代码行数:11,代码来源:MainPage.xaml.cs

示例15: UserListControl

        public UserListControl() {
            InitializeComponent();
            Contacts contacts = new Contacts();

            contacts.SearchCompleted += ContactsOnSearchCompleted;
            contacts.SearchAsync(String.Empty, FilterKind.None, "Addressbook Contacts");

            FriendsList.ItemsSource = friendList;

            GetFriends();
//            initDemo();
        }
开发者ID:Grief-Code,项目名称:kilogram,代码行数:12,代码来源:UserListControl.xaml.cs


注:本文中的Contacts.SearchAsync方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。