/// <summary> /// the constructor. /// </summary> public LogModel() { communicate = ModelCommunication.GetInstance(); logList = new LogCollection(); if (!communicate.IsConnected()) { return; } try { //Request from the service the logs communicate.SendCommend((int)CommandEnum.LogCommand, null); } catch (Exception) { return; } //Updating the communication events communicate.GetLogs += GetLogs; communicate.AddLog += AddLog; //Waiting until adding the logs file until we continue. while (!gotLogs) { ; } }
public bool IsConnected() { return(communicate.IsConnected()); }