Exemple #1
0
 protected virtual void OnUserAvail(IMAvailEventArgs e)
 {
     if (UserAvailable != null)
     {
         UserAvailable(this, e);
     }
 }
Exemple #2
0
 private void OnIm_UserAvailable(object sender, IMAvailEventArgs e)
 {
     if (e.Username == sendTo)
     {
         if (e.IsAvailable != lastAvail)
         {
             this.BeginInvoke(new MethodInvoker(delegate
             {
                 lastAvail = e.IsAvailable;
                 this.sendTextBox.Enabled = true;
                 string avail             = (lastAvail ? "Available" : "Unavailable");
                 this.sendTextBox.Enabled = lastAvail;
                 this.talkTextBox.Text   += string.Format("[{0} is {1}]\r\n", sendTo, avail);
             }));
         }
     }
 }