public VideoForm(UserInfo user)
        {
            InitializeComponent();
            DeviceID = user.DeviceId;

            this.Text = user.UserName + " [" + user.IPAddress + "]";
        }
        //使用者連接上了
        private void ClientConnected(string[] messages, Socket client)
        {
            string devideID = messages[2].Trim();
            allClientSockets.Remove(messages[2]); //先刪除與此使用者之前的連接
            allClientSockets.Add(messages[2], client); //建立

            UserInfo user = new UserInfo(); //使用者資料
            user.UserName = messages[1].Trim();
            user.DeviceId = devideID;
            user.LoginTime = DateTime.Now;

            Socket tmpSocket = (Socket)allClientSockets[devideID];
            user.IPAddress = tmpSocket.RemoteEndPoint.ToString();

            int index = userIDArray.IndexOf(devideID);
            if (index >= 0)
            {
                userIDArray[index] = devideID;
                usersArray[index] = user;

                //MemoryStream stream = (MemoryStream)imgStreamArray[index];
                //if (stream != null)
                //{
                //    stream.Close();
                //    stream.Dispose();
                //}
            }
            else //增加一個欄位
            {
                userIDArray.Add(devideID);
                usersArray.Add(user);
                imgStreamArray.Add(null);
            }
        }