Exemplo n.º 1
0
 public static SerializableClass GetDataByNumber(decimal solderId, int n)
 {
     lock (Locker)
     {
         if (!DataBase.TaskStack.Any(item => item.DateID == n && item.SolderID == solderId))
         {
             n = 1;
         }
         TaskStack data = DataBase.TaskStack.First(item => item.DateID == n && item.SolderID == solderId);
         return(new SerializableClass
         {
             Ammunittions = data.Ammunittions,
             DateID = data.DateID,
             BulletProofVestState = data.BulletProofVestState,
             FlickerEyes = data.FlickerEyes,
             Pulse = data.Pulse,
             SolderID = data.SolderID,
             TemperatureBarell = data.TemperatureBarell,
             Location = data.Location.AsText(),
             WeatherID = new Package.Weather {
                 Humidity = data.Weather.Humidity, WindSpeed = data.Weather.WindSpeed, Pressure = data.Weather.Pressure, WeatherID = data.Weather.WeatherID, Tempherature = data.Weather.Tempherature
             }
         });
     }
 }
Exemplo n.º 2
0
 private static void A_ReceivedData(TaskStack data)
 {
     if (data == null)
     {
         exitFlag = true;
         return;
     }
     Sender.Send(new SerializableClass
     {
         Ammunittions         = data.Ammunittions,
         DateID               = data.DateID,
         BulletProofVestState = data.BulletProofVestState,
         FlickerEyes          = data.FlickerEyes,
         Pulse             = data.Pulse,
         SolderID          = data.SolderID,
         TemperatureBarell = data.TemperatureBarell,
         Location          = data.Location.AsText()
     });
     Console.WriteLine(data.ToString());
 }