public static void Clear()
 {
     AllLogs.Clear();
     MessagesCount = 0;
     WarningsCount = 0;
     ErrorsCount   = 0;
     ErrorsCount   = 0;
 }
Beispiel #2
0
 /// <summary>
 /// Handle gotten logs from server
 /// </summary>
 /// <param name="sender">server</param>
 /// <param name="message">logs list</param>
 public void HandleLogMessage(object sender, TCPEventArgs message)
 {
     try
     {
         List <JObject> temp = JsonConvert.DeserializeObject <List <JObject> >(message.Args);
         AllLogs.Clear();
         foreach (JObject log in temp)
         {
             string  logType  = (string)log["logType"];
             string  logInfo  = (string)log["logInfo"];
             LogArgs toInsert = new LogArgs(logType, logInfo);
             AllLogs.Add(toInsert);
         }
     }
     catch (Exception) { }
 }