Пример #1
0
 private void hideIndicator()
 {
     // InvokeRequired required compares the thread ID of the
     // calling thread to the thread ID of the creating thread.
     // If these threads are different, it returns true.
     if (this.cardIndicatorL.InvokeRequired)
     {
         displayUserDelegate d = new displayUserDelegate(hideIndicator);
         this.Invoke(d, new object[] {  });
     }
     else
     {
         this.cardIndicatorL.Visible = false;
     }
 }
Пример #2
0
 private void displayUser(User user)
 {
     // InvokeRequired required compares the thread ID of the
     // calling thread to the thread ID of the creating thread.
     // If these threads are different, it returns true.
     if (this.cardLabel.InvokeRequired)
     {
         displayUserDelegate d = new displayUserDelegate(displayUser);
         this.Invoke(d, new object[] { user });
     }
     else
     {
         this.cardLabel.Text  = user.CardId;
         this.lnameLabel.Text = user.LastName;
         this.nameLabel.Text  = user.Name;
         this.phoneLabel.Text = user.Phone.ToString();
         this.uldLabel.Text   = user.Uld.ToString();
     }
 }