Esempio n. 1
0
 static void Main(string[] args)
 {
     while (true)
     {
         var ip      = Discovery.FindMonitor();
         var monitor = new Monitor(ip);
         monitor.ValueReceived += Monitor_ValueReceived;
         monitor.Error         += Monitor_Error;
         monitor.Read();
         monitor.ValueReceived -= Monitor_ValueReceived;
         monitor.Error         -= Monitor_Error;
     }
 }
Esempio n. 2
0
 private void WatchData()
 {
     Start = DateTime.Now.Millisecond;
     while (IsOpen)
     {
         var ip      = Discovery.FindMonitor();
         var monitor = new WSMonitor.Monitor(ip);
         monitor.ValueReceived += Monitor_ValueReceived;
         monitor.Error         += Monitor_Error;
         monitor.Read();
         monitor.ValueReceived -= Monitor_ValueReceived;
         monitor.Error         -= Monitor_Error;
     }
 }