Example #1
0
 /// <summary>
 /// get logs function
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="msg"></param>
 private void getlogs(object sender, DataInfo msg)
 {
     if (msg.Id == CommandEnum.LogCommand)
     {
         try
         {
             List <MessageRecievedEventArgs> recLog = JsonConvert.
                                                      DeserializeObject <List <MessageRecievedEventArgs> >(msg.Args);
             Logs.Clear();
             foreach (MessageRecievedEventArgs entry in recLog)
             {
                 LogWeb logWeb = new LogWeb()
                 {
                     Msg  = entry.Message,
                     Type = toStringFromMessageTypeEnum(entry.Status)
                 };
                 Logs.Insert(0, logWeb);
             }
             ifLogUpdate = true;
         }
         catch (Exception e)
         {
             Console.WriteLine(e.Message);
         }
     }
 }
Example #2
0
 /// <summary>
 /// copy method
 /// </summary>
 /// <param name="pm"></param>
 public void copy(LogWeb pm)
 {
     Type = pm.Type;
     Msg  = pm.Msg;
 }