Beispiel #1
0
        static void dp_Changed(object sender, EventArgs e)
        {
            TOSDataPoint dataPoint = (TOSDataPoint)sender;

            snapshot[dataPoint.Item].data.Update(dataPoint.Topic, dataPoint.Value);
            Console.WriteLine("{0} - {1} : {2}", dataPoint.Item, dataPoint.Topic, dataPoint.Value);
        }
Beispiel #2
0
 void Subscribe(params TOSTopic[] topics)
 {
     foreach (TOSTopic topic in topics)
     {
         try
         {
             TOSDataPoint dataPoint = TOSClient.Subscribe(topic, ticker);
             dataPoint.Changed += new EventHandler(dp_Changed);
         }
         catch (Exception ex)
         {
             Console.WriteLine("\n" + ex.ToString());
         }
     }
 }