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


C# Contacts类代码示例

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


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

示例1: MainPage

 public MainPage()
 {
     InitializeComponent();
     contacts = new Contacts();
     contacts.SearchCompleted += contacts_SearchCompleted;
     appointments.SearchCompleted += appointments_SearchCompleted;
 }
开发者ID:whrxiao,项目名称:Windows-Phone-7-In-Action,代码行数:7,代码来源:MainPage.xaml.cs

示例2: LoadContactsToDbAsync

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

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

示例3: 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

示例4: ConversationForm

        /// <summary>
        /// Constructeur de la classe
        /// </summary>
        /// <param name="contact">La ligne du contact avec laquel on a une conversation</param>
        /// <param name="index">L'indice de ce contact dans la liste des contacts</param>
        public ConversationForm(Contacts.ContactsDataSet.ContactsRow contact, int index)
        {
            InitializeComponent();

            // permettra de tenir a jour la liste des conversations ouvertes.
            indice = index;

            Address = contact.Address;
            DisplayName = contact.DisplayName;
            Text = Address;

            // On séléctionne la zone de texte dans laquelle il faut écrire pour communiquer.
            WriteBox.Select();

            // Mise à jour de la barre de status
            StatusLabel.Text += DisplayName + " et vous commencée.";

            // définition de la fonction à éxécuter par le BackgroundWorker
            bw.DoWork += bw_DoWork;

            // On s'abonne à l'évenement de reception des messages
            SessionController.GetInstance().MessageReceived += ConversationForm_MessageReceived;

            // On s'abonne à l'évenement d'appuie sur une touche ( on n'agit que sur la touche entrer )
            WriteBox.KeyUp += WriteBox_KeyUp;
        }
开发者ID:SamuelMorel,项目名称:CS.NET,代码行数:31,代码来源:ConversationForm.cs

示例5: HomeModule

        public HomeModule()
        {
            Get["/"] = _ =>
              {
            return View ["hub.cshtml"];
              };

              Get["/add_contact"] = _ =>
              {
            return View ["add_contact.cshtml"];
              };
              Post["/contact_created"] = _ =>
              {
            string name = Request.Form["contactName"];
            int number = Request.Form["contactPhone"];
            string address = Request.Form["contactAddress"];
            Contacts newContact = new Contacts(name, address, number);
            return View ["contact_added.cshtml", newContact];
              };
              Get["/view_contacts"] = _ =>
              {
            return View ["view_contacts.cshtml", Contacts.GetAllContacts()];
              };

              Get["/view_contacts/{id}"] = parameters =>
              {
            return View ["contact_detail.cshtml", Contacts.GetContactById(parameters.id)];
              };

              Get["/contacts_cleared"] = _ =>
              {
            Contacts.ClearContacts();
            return View ["contacts_deleted"];
              };
        }
开发者ID:cathulhu,项目名称:CodeReview2-12-16,代码行数:35,代码来源:HomeModule.cs

示例6: Delete

 public ActionResult Delete(Contacts contactToDelete)
 {
     /*if(*/
     _service.DeleteContact(contactToDelete);/*)*/
     return RedirectToAction("Index");
     //return View();
 }
开发者ID:dineshkummarc,项目名称:hatta-erp,代码行数:7,代码来源:ContactsController.cs

示例7: InitData

    private void InitData()
    {
        int nItemID = ConvertData.ConvertToInt(Request.QueryString[Constants.ACTION_ID]);
        string URL = Constants.ROOT + Pages.BackEnds.ADMIN + "?" + Constants.PAGE + "=" + Pages.BackEnds.STR_CONTACT;
        try
        {
            if (nItemID > 0)
            {
                Contacts objContactUs = new Contacts();
                objContactUs.LoadById(nItemID);
                lblEmail.Text = ConvertData.ConvertToString(objContactUs.Data.Email);
                lblFullName.Text = objContactUs.Data.Fullname.ToLower();
                lblTelephone.Text = objContactUs.Data.Telephone;
                lblMainContent.Text = objContactUs.Data.MainContent;
                lblTelephone.Text = objContactUs.Data.Telephone;
                lblContactDate.Text = ConvertData.ConvertIntToDatetimeString(objContactUs.Data.CreatedDate);

                int Result = objContactUs.UpdateStatus(nItemID, EnumeType.ACTIVE);
            }
            else
            { Response.Redirect(URL); }
        }
        catch
        {
            Response.Redirect(URL);
        }
    }
开发者ID:changtraicantinh,项目名称:atpgroup,代码行数:27,代码来源:ContactAdd.ascx.cs

示例8: getContacts

        public void getContacts()
        {
            Contacts cons = new Contacts();

            cons.SearchCompleted += new EventHandler<ContactsSearchEventArgs>(Contacts_SearchCompleted);
            cons.SearchAsync(string.Empty, FilterKind.None, null);
        }
开发者ID:NAWEB-USP,项目名称:SmartAudioCityGuide,代码行数:7,代码来源:HelpModeContact.xaml.cs

示例9: 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

示例10: Fix_Name

 private void Fix_Name(Contacts cont)
 {
     if (cont.FirstName != null)
         return;
     int fn = 0;
     int ln = 1;
     string fname = "";
     string lname = "";
     string[] nps = cont.Name.Split(' ');
     List<string> newname = new List<string>();
     foreach (string name in nps)
     {
         string n = "";
         string nn = name.Replace(".", "");
         if (nn.Length == 1)
             continue;
         else
             n = name.Substring(0, 1) + name.Substring(1).ToLower();
         newname.Add(n);
     }
     if (newname.Count == 0)
         return;
     fname = newname[0];
     for (int i = 1; i < newname.Count; i++)
     {
         lname += newname[i] + " ";
     }
     cont.FirstName = fname;
     if (lname.Length > 199)
         lname = lname.Substring(0, 199);
     cont.LastName = lname;
 }
开发者ID:DennisCarrasquillo,项目名称:ABC-Web-Site,代码行数:32,代码来源:MarketingController.cs

示例11: 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

示例12: 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

示例13: Find

        public dynamic Find(int id)
        {
            //var table = new Contacts();
            //return table.Single(key: id);

            dynamic table = new Contacts();
            return table.GetContact(Id: id);
        }
开发者ID:jeanhibbert,项目名称:EfTestConsole,代码行数:8,代码来源:ContactRepository.cs

示例14: 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

示例15: 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


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