/// <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;
     }
 }
Beispiel #2
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();
 }