Esempio n. 1
0
        public static IServerController GetClient()
        {
            if (_client == null)
            {
                _client = Framework.Network.CreateClient();

                if (_client != null)
                {
                    _client.OnDataReceived += ModulesReceived;
                    _client.Connect();
                    _client.FetchModules();
                    _client.Disconnect();
                }
            }

            return(_client);
        }
Esempio n. 2
0
 public static void RefreshModuleFiles()
 {
     try
     {
         var client = GetClient();
         if (client != null)
         {
             _client.Connect();
             _client.FetchModules();
             _client.Disconnect();
         }
     }
     catch (Exception error)
     {
         Framework.EventBus.Publish(error);
     }
 }