Exemple #1
0
        public static int Main(String[] args)
        {
            Console.BackgroundColor = ConsoleColor.White;
            Console.Clear();
            int port = 4456;

            Console.Title           = "FBRPan - Emulator Panel";
            Console.ForegroundColor = ConsoleColor.Black;
            Console.WriteLine("");
            Console.WriteLine(@"        .--------.  .--------.    .--------.                                   ");
            Console.WriteLine(@"        : .------´  : .-----. :   : .-----. :                                  ");
            Console.WriteLine(@"        : `------.  : :_____: ;   : :_____: ;   .-----. .-----. .-.  .-.       ");
            Console.WriteLine(@"        : .------´  : .-----.´    : .-.  .-´    : .-. : : .-. : :  \ : :       ");
            Console.WriteLine(@"        : :         : :_____:`:   : :  \  \     : `-´ ; : `-´ : : \ `´ :       ");
            Console.WriteLine(@"        :_:         :________ :   :_:    \ _\   :_:¨¨´  :_:¨:_: :_:  :_:        ");
            Console.BackgroundColor = ConsoleColor.Black;

            Console.ForegroundColor = ConsoleColor.White;
            Console.WriteLine(@"                             Developed by FilipeBR                              ");
            Console.ForegroundColor = ConsoleColor.Black;
            Console.BackgroundColor = ConsoleColor.White;
            Console.WriteLine("> Starting...");
            HttpServer httpServer;

            if (args.GetLength(0) > 0)
            {
                httpServer = new MyHttpServer(Convert.ToInt16(args[0]));
            }
            else
            {
                httpServer = new MyHttpServer(port);
            }
            Thread thread = new Thread(new ThreadStart(httpServer.listen));

            thread.Start();
            Console.WriteLine("> Started");
            Console.WriteLine("> Running on port {0}", port);
            Console.Title = Console.Title + " - Runnig on port " + port;
            while (true)
            {
                Console.ForegroundColor = ConsoleColor.Black;
                MyHttpServer.HandleCommand(Console.ReadLine());
            }
        }
Exemple #2
0
        public static int Main(String[] args)
        {
            Console.BackgroundColor = ConsoleColor.White;
            Console.Clear();
            int port = 4456;
            Console.Title = "FBRPan - Emulator Panel";
            Console.ForegroundColor = ConsoleColor.Black;
            Console.WriteLine("");
            Console.WriteLine(@"        .--------.  .--------.    .--------.                                   ");
            Console.WriteLine(@"        : .------´  : .-----. :   : .-----. :                                  ");
            Console.WriteLine(@"        : `------.  : :_____: ;   : :_____: ;   .-----. .-----. .-.  .-.       ");
            Console.WriteLine(@"        : .------´  : .-----.´    : .-.  .-´    : .-. : : .-. : :  \ : :       ");
            Console.WriteLine(@"        : :         : :_____:`:   : :  \  \     : `-´ ; : `-´ : : \ `´ :       ");
            Console.WriteLine(@"        :_:         :________ :   :_:    \ _\   :_:¨¨´  :_:¨:_: :_:  :_:        ");
            Console.BackgroundColor = ConsoleColor.Black;

            Console.ForegroundColor = ConsoleColor.White;
            Console.WriteLine(@"                             Developed by FilipeBR                              ");
            Console.ForegroundColor = ConsoleColor.Black;
            Console.BackgroundColor = ConsoleColor.White;
            Console.WriteLine("> Starting...");
            HttpServer httpServer;
            if (args.GetLength(0) > 0)
            {
                httpServer = new MyHttpServer(Convert.ToInt16(args[0]));
            }
            else
            {
                httpServer = new MyHttpServer(port);
            }
            Thread thread = new Thread(new ThreadStart(httpServer.listen));
            thread.Start();
            Console.WriteLine("> Started");
            Console.WriteLine("> Running on port {0}", port);
            Console.Title = Console.Title + " - Runnig on port " + port;
            while (true)
            {
                Console.ForegroundColor = ConsoleColor.Black;
                MyHttpServer.HandleCommand(Console.ReadLine());
            }
        }