Ejemplo n.º 1
0
        public Server(StartupSettings settings)
        {
            bootstrap(settings);

            AuthenticationService = new AuthenticationService(this);
            CharacterService      = new CharacterService();
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            StartupSettings settings = new StartupSettings();

            if (args.Contains("nogui"))
            {
                settings.NoGUI = true;
            }

            Server server = new Server(settings);

            Console.ReadKey();
        }
Ejemplo n.º 3
0
        private void bootstrap(StartupSettings settings)
        {
            if (!settings.NoGUI)
            {
                serverGui = new ServerGUI();
                Application.EnableVisualStyles();

                Task mytask = Task.Run(() =>
                {
                    ServerGUI form = new ServerGUI();
                    form.ShowDialog();
                });
            }

            simpleServer = new SimpleServer(settings.Port);

            simpleServer.RegisterHandler(1, handleAuthentication);
        }