예제 #1
0
 public void OnNewMessage(User nick, string message)
 {
     foreach (User n in Users)
     {
         if (nick.Nick == n.Nick)
         {
             OnMessage.Fire(this, new UserMessageEventArgs(n, message));
             break;
         }
     }
 }
예제 #2
0
        void m_queue_DataOnQueueChanged(object sender, EventArgs e)
        {
            var msg = new TraceMessage(m_serializer);

            try
            {
                Thread.Sleep(100);
                var result = m_queue.Receive(msg);

                if (result == ReadWriteResult.OK)
                {
                    OnMessage.Fire(this, new GenericEventArgs <TraceMessage>(msg));
                }
            }
            catch (Exception ex)
            {
            }
        }