Exemple #1
0
 static void refreshMessages()
 {
     while (true)
     {
         lock (lockObj)
         {
             if (!mensagens.Equals(remoteObject.getMessages()))
             {
                 mensagens = remoteObject.getMessages();
                 Console.Clear();
                 Console.WriteLine(mensagens);
             }
         }
         Thread.Sleep(500);
     }
 }