Пример #1
0
 static void StartTracking()
 {
     Console.WriteLine("Press [Enter] to start delivery tracking");
     EthereumApi.StartDelivery();
     while (true)
     {
         Console.WriteLine("Press [Enter] to track current data:");
         Console.ReadLine();
         var currentData = SensorsDataShapshot.GetData();
         var hash        = CryptoHelper.MD5(JsonConvert.SerializeObject(currentData));
         EthereumApi.SendInfo(currentData.UID, hash);
         SaveSensorsInfo(currentData);
     }
 }
Пример #2
0
 static void ElapsedTimerEventHandler(object sender, ElapsedEventArgs args)
 {
     var currentData = SensorsDataShapshot.GetData();
     var hash        = CryptoHelper.MD5(JsonConvert.SerializeObject(currentData));
 }