Esempio n. 1
0
 /// <summary>
 /// 刷新用户列表
 /// </summary>
 /// <param name="list">用户列表</param>
 private void DoUserChanged(UserCollection list)
 {
     if (_UserChangedHandle != null)
     {
         System.Windows.Forms.Control c = (_UserChangedHandle.Target as Control);
         if (c != null)
         {
             c.Invoke(_UserChangedHandle, list);
         }
         else
         {
             _UserChangedHandle(list);
         }
     }
 }
Esempio n. 2
0
 //刷新用户列表
 private static void OnUserChanged(UserCollection users)
 {
     System.Console.WriteLine("======= Online User Count:{0} ======", users.Count);
     foreach (User u in users)
     {
         System.Console.WriteLine(
             "User:{0},IP:{1}:{2},IsHoled:{3}",
             u.UserName, 
             u.NetPoint.Address, 
             u.NetPoint.Port, 
             u.IsConnected
             );
     }
     System.Console.WriteLine("====================================", users.Count);
 }
Esempio n. 3
0
 public S2C_UserListMessage(UserCollection users)
 {
     this.userList = users;
 }
Esempio n. 4
0
 /// <summary>
 /// 构造器
 /// </summary>
 public Server()
 {
     _userList = new UserCollection();
     _remotePoint = new IPEndPoint(IPAddress.Any, 0);
     _serverThread = new Thread(new ThreadStart(Run));
 }
Esempio n. 5
0
 //刷新用户列表
 private void OnUserChanged(UserCollection users)
 {
     listBox2.DisplayMember = "FullName";
     listBox2.DataSource = null;
     listBox2.DataSource = users;
 }
Esempio n. 6
0
 /// <summary>
 /// 构造器
 /// </summary>
 public Server()
 {
     _userList     = new UserCollection();
     _remotePoint  = new IPEndPoint(IPAddress.Any, 0);
     _serverThread = new Thread(new ThreadStart(Run));
 }
Esempio n. 7
0
 public S2C_UserListMessage(UserCollection users)
 {
     this.userList = users;
 }