Exemple #1
0
 static void Main(string[] args)
 {
     MessageManage msgManage = new MessageManage();
     msgManage.Register();
     msgManage.GetMessageReceived += msgManage_GetMessageReceived;
     int count = 0;
     while (count < 5)
     {
         msgManage.SendMessage(new Random().Next(0, 99));
         count++;
         Thread.Sleep(1000);
     }
     msgManage.Logout();
 }
Exemple #2
0
 static void msgManage_GetMessageReceived(object sender, MessageManage.GetMessageEventArgs e)
 {
     Console.WriteLine("message received : " + e.MessageData);
 }