Esempio n. 1
0
 /// <summary>
 /// the constructor.
 /// </summary>
 public SettingsModel()
 {
     //getting a communcation instance.
     communicate = ModelCommunication.GetInstance();
     //in case the connection had failed.
     if (!communicate.IsConnected())
     {
         return;
     }
     Config = Configure.GetInstance();
     //Request from the service the configurations
     try
     {
         communicate.SendCommend((int)CommandEnum.GetConfigCommand, null);
         communicate.GetConfig     += GetConfig;
         communicate.RemoveHandler += GetHandlerClosed;
         //Waiting until adding the config file until we continue;
         while (!addedConfig)
         {
             ;
         }
     }
     catch (Exception)
     {
         return;
     }
 }
Esempio n. 2
0
        /// <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)
            {
                ;
            }
        }
Esempio n. 3
0
 public TCPModel()
 {
     //getting a communcation instance.
     communicate = ModelCommunication.GetInstance();
 }
 /// <summary>
 /// MainWindowModel constructor.
 /// </summary>
 public MainWindowModel()
 {
     //getting the communication instance in order to know if failed or not.
     communicate = ModelCommunication.GetInstance();
 }