Exemplo n.º 1
0
 virtual protected void OnUserAvail(IMAvailEventArgs e)
 {
     if (UserAvailable != null)
     {
         UserAvailable(this, e);
     }
 }
Exemplo n.º 2
0
 void im_UserAvailable(object sender, IMAvailEventArgs e)
 {
     this.BeginInvoke(new MethodInvoker(delegate
     {
         if (e.UserName == sendTo)
         {
             if (lastAvail != e.IsAvailable)
             {
                 lastAvail      = e.IsAvailable;
                 string avail   = (e.IsAvailable ? "available" : "unavailable");
                 this.Text      = String.Format("{0} - {1}", sendTo, avail);
                 talkText.Text += String.Format("[{0} is {1}]\r\n", sendTo, avail);
             }
         }
     }));
 }