示例#1
0
 static void Main(string[] args)
 {
     calc     = new ExchangeCalc();
     Receiver = new UdpReceiver(calc);
     Console.WriteLine("To print result press enter, for exit press esc..");
     while (true)
     {
         ConsoleKeyInfo keyInfo = Console.ReadKey();
         if (keyInfo.Key == ConsoleKey.Enter)
         {
             Console.WriteLine(calc);
         }
         else if (keyInfo.Key == ConsoleKey.Escape)
         {
             break;
         }
     }
 }
示例#2
0
 public UdpReceiver(ExchangeCalc exc)
 {
     calc = exc;
     Init();
 }