Пример #1
0
        public ClientHandler(TcpClient newClient, int _ClientIdCounter, ConnectionManager connectionManager, CommandLineInterface CLI)
        {
            this._Client            = newClient;
            this._ClientIdCounter   = _ClientIdCounter;
            this._ConnectionManager = connectionManager;
            this._CLI = CLI;

            _HeartBeat.Elapsed += HeartBeatHandler;
        }
Пример #2
0
        public static bool WriteToFile(string content, string filename, CommandLineInterface _CLI)
        {
            bool success = false;

            try
            {
                StreamWriter sw = new StreamWriter(@filename);
                sw.Write(content);
                sw.Close();
                success = true;
            } catch (Exception e)
            {
                _CLI.Out("Error while saving the file:" + e.Message, true, true);
            }
            return(success);
        }
Пример #3
0
 public Controller()
 {
     _CLI = new CommandLineInterface();
     _CLI.SetCurrentController(this);
     _TM = new TestManager(_CLI);
 }
 public ConnectionManager(CommandLineInterface _CLI, Controller controller)
 {
     this._CLI       = _CLI;
     this.controller = controller;
 }