Example #1
0
        static void StatusChanged_EventHandler(Object sender, StatusChangedEventArgs e)
        {
            CommunicatorIntegration ci = (CommunicatorIntegration)sender;

            string msg = string.Format("{0}: {1} is now {2}.", e.TimeOfChange, e.Email, e.CurrentStatus);
            Console.WriteLine(msg);
            if (e.Email.ToLower().Equals("*****@*****.**") || e.Email.ToLower().Equals(ci.GetLocalUserEmail()))
            {
                ci.OpenConversationWithRedgateEmail("*****@*****.**", msg);
            }
        }
Example #2
0
 private void CommunicatorOnStatusChanged(object sender, StatusChangedEventArgs statusChangedEventArgs)
 {
     var player = m_FoosPlayers.FirstOrDefault(p => p.Email == statusChangedEventArgs.Email);
     if (player != null) player.Status = statusChangedEventArgs.CurrentStatus;
 }
 private void OnStatusChanged(StatusChangedEventArgs e)
 {
     StatusChangedEventHandler handler = StatusChanged;
     if (handler != null)
     {
         handler(this, e);
     }
 }
        private void communicator_OnContactStatusChange(object pMContact, MISTATUS mStatus)
        {
            IMessengerContactAdvanced contact = (IMessengerContactAdvanced)pMContact;

            if (m_SubscribedContacts.ContainsKey(contact.SigninName.ToLower()))
            {
                StatusChangedEventArgs args = new StatusChangedEventArgs();
                args.Email = contact.SigninName.ToLower();
                args.CurrentStatus = MistatusToFoosStatus(contact.Status);
                args.TimeOfChange = DateTime.Now;
                OnStatusChanged(args);
            }
        }