예제 #1
0
 private void button1_Click(object sender, EventArgs e)
 {
     _server = new Server();
     _server.OnWriteLog += new WriteLogHandle(server_OnWriteLog);
     _server.OnUserChanged += new UserChangedHandle(OnUserChanged);
     try
     {
         _server.Start();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
예제 #2
0
 static void Main(string[] args)
 {
     Server _server;
     _server = new Server();
     _server.OnWriteLog += new WriteLogHandle(server_OnWriteLog);
     _server.OnUserChanged += new UserChangedHandle(OnUserChanged);
     try
     {
         _server.Start();
     }
     catch (Exception ex)
     {
         System.Console.WriteLine("[ERROR]{0}", ex.Message);
     }
 }