Ejemplo n.º 1
0
 public ServerUI(ServerClient.Server.Server s, string host, int port)
 {
     InitializeComponent();
     this.host   = host;
     this.port   = port;
     label1.Text = "host: " + host;
     label2.Text = "port: " + port;
 }
Ejemplo n.º 2
0
        static void Main()
        {
            //tests();

            try {
                ServerClient.Server.Server server = new ServerClient.Server.Server();

                /*ServerClient.Client.Client client = new ServerClient.Client.Client(),
                 *  client2 = new ServerClient.Client.Client();
                 */
                Thread tServer = new Thread(server.Start);

                /*Thread tClient = new Thread( client.Start );
                 * Thread tClient2 = new Thread( client2.Start );
                 */

                tServer.Start();
                Thread.Sleep(100);
                new Thread(() => Application.Run(new Interface.Form1())).Start();
                Thread.Sleep(100);
                new Thread(() => Application.Run(new Interface.Form1())).Start();
                Thread.Sleep(100);
                new Thread(() => Application.Run(new Interface.Form1())).Start();



                /*tClient.Start();
                *  Thread.Sleep( 1000 );
                *  tClient2.Start();
                *
                *  tClient.Join();
                *  tClient2.Join();*/
                tServer.Join();
            } catch (Exception e) {
                Console.WriteLine("ERROR >> " + e.Message);
            }

            Console.WriteLine("EOP");
            Thread.Sleep(20000);
            //Console.ReadKey();
        }