示例#1
0
 public static Terminal GetSingleton()
 {
     if (_singleton == null) {
         lock (_lock) {
             if (_singleton == null) {
                 _singleton = new Terminal("localhost", 8000, 10, 80, 50); // hostname, port, timeout [s], width, height
                 //_singleton = new Terminal("faf.vliegwiel.org", 8000, 10, 80, 50); // hostname, port, timeout [s], width, height
                 _singleton.Connect();
             }
         }
     }
     return _singleton;
 }
示例#2
0
        public TerminalDemo(string host)
        {
            tn = new Terminal(host, 8000, 10, 80, 50); // hostname, port, timeout [s], width, height
            tn.Connect();

            System.Console.WindowHeight = 51;
            System.Console.WindowWidth = 80;
            System.Console.Title = "DFTerm parsing By Vliegwiel";

            ThreadStart tc1 = new ThreadStart(DrawLoop);
            ThreadStart tc2 = new ThreadStart(Read);

            Thread t1 = new Thread(tc1);
            Thread t2 = new Thread(tc2);

            t1.Start();
            t2.Start();
        }