Ejemplo n.º 1
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            // create a central server instance
            CentralServer server = new CentralServer();

            Application.Run(new CentralServerForm(server));
        }
Ejemplo n.º 2
0
        public CentralServerForm(CentralServer server)
        {
            InitializeComponent();
            this.server    = server;
            socketListener = new AsynchronousSocketListener();
            Messenger <Msg> .Default.AddHandler <string>(Msg.AppLog, UpdateUI);

            Messenger <Msg> .Default.AddHandler(Msg.AppClean, CleanLogs);

            this.FormClosed += CloseServer;     // TO-DO: Update : kill asyncrenous socket listener thread
        }