コード例 #1
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            if (remoteObj != null)
            {
                string tempStr = remoteObj.GetMsgFromSvr(key);
                if (tempStr.Trim().Length > 0)
                {
                    key++;
                    txtAllChat.Text = txtAllChat.Text + "\n" + tempStr;
                }

                //if (skipCounter > 3)
                {
                    ArrayList onlineUser = remoteObj.GetOnlineUser();
                    lstOnlineUser.DataSource = onlineUser;
                    skipCounter = 0;

                    if (onlineUser.Count < 2)
                    {
                        txtChatHere.Text    = "Please wait untill atleast two user join in Chat Room.";
                        txtChatHere.Enabled = false;
                    }
                    else if (txtChatHere.Text == "Please wait untill atleast two user join in Chat Room." && txtChatHere.Enabled == false)
                    {
                        txtChatHere.Text    = "";
                        txtChatHere.Enabled = true;
                    }
                }
                //else
                //  skipCounter++;
            }
        }
コード例 #2
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            if (remoteObj != null)
            {
                string tempStr = remoteObj.GetMsgFromSvr(key);
                if (tempStr.Trim().Length > 0)
                {
                    key++;
                    txtAllChat.Text = txtAllChat.Text + "\n" + tempStr;
                }
                //Download source code FREE tai Sharecode.vn
                //if (skipCounter > 3)
                {
                    onlineUser = remoteObj.GetOnlineUser();
                    lstOnlineUser.DataSource = onlineUser;
                    skipCounter = 0;

                    if (onlineUser.Count < 2)
                    {
                        txtChatHere.Text    = "Cần có ít nhất 2 người để chat với nhau. Bạn ko nên tự chat một mình rất nguy hiểm ^-^.";
                        txtChatHere.Enabled = false;
                    }
                    else if (txtChatHere.Text == "Cần có ít nhất 2 người để chat với nhau. Bạn ko nên tự chat một mình rất nguy hiểm ^-^." && txtChatHere.Enabled == false)
                    {
                        txtChatHere.Text    = "";
                        txtChatHere.Enabled = true;
                    }
                }
                //else
                //  skipCounter++;
            }
        }
コード例 #3
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            if (remoteObj != null)
            {
                string tempStr = remoteObj.GetMsgFromSvr(key);
                if (tempStr.Trim().Length > 0)
                {
                    key++;
                    txtAllChat.Text = txtAllChat.Text + "\n" + tempStr;
                }
                //Download source code FREE tai Sharecode.vn
                //if (skipCounter > 3)
                {
                    onlineUser = remoteObj.GetOnlineUser();
                    lstOnlineUser.DataSource = onlineUser;
                    skipCounter = 0;

                    if (onlineUser.Count < 2)
                    {
                        txtChatHere.Text    = "There should be at least 2 people to chat with each other.";
                        txtChatHere.Enabled = false;
                    }
                    else if (txtChatHere.Text == "There should be at least 2 people to chat with each other." && txtChatHere.Enabled == false)
                    {
                        txtChatHere.Text    = "";
                        txtChatHere.Enabled = true;
                    }
                }
                //else
                //  skipCounter++;
            }
        }
コード例 #4
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            if (remoteObj != null)
            {
                string tempStr = remoteObj.GetMsgFromSvr(key);
                if (tempStr.Trim().Length > 0)
                {
                    key++;
                    txtAllChat.Text = txtAllChat.Text + "\n" + tempStr;
                }

                //if (skipCounter > 3)
                {
                    ArrayList onlineUser = remoteObj.GetOnlineUser();
                    lstOnlineUser.DataSource = onlineUser;
                    skipCounter = 0;

                    if (onlineUser.Count < 2)
                    {
                        txtChatHere.Text    = "Пожалуйста подождите, пока собеседник не войдет в диалог";
                        txtChatHere.Enabled = false;
                    }
                    else if (txtChatHere.Text == "Пожалуйста подождите, пока собеседник не войдет в диалог" && txtChatHere.Enabled == false)
                    {
                        txtChatHere.Text    = "";
                        txtChatHere.Enabled = true;
                    }
                }
                //else
                //  skipCounter++;
            }
        }
コード例 #5
0
ファイル: loja.cs プロジェクト: vetongacaferi/Guess-Game_chat
        private void timer1_Tick(object sender, EventArgs e)
        {
            if (remoteObj != null)
            {
                string tempStr = remoteObj.GetMsgFromSvr(key);
                if (tempStr.Trim().Length > 0)
                {
                    key++;
                    txtAllChat.Text = txtAllChat.Text + "\n" + tempStr;
                }
                {
                    ArrayList onlineUser = remoteObj.GetOnlineUser();
                    IstOnlineUser.DataSource = onlineUser;


                    if (onlineUser.Count < 2)
                    {
                        txtChatHere.Text    = "Ju lutem pritni derisa se paku dy perdorues te jen online!";
                        txtChatHere.Enabled = false;
                    }
                    else if (txtChatHere.Text == "Ju lutem pritni derisa se paku dy perdorues te jen online!" && txtChatHere.Enabled == false)
                    {
                        txtChatHere.Text    = "";
                        txtChatHere.Enabled = true;
                    }
                }
            }
        }
コード例 #6
0
ファイル: frmChatWin.cs プロジェクト: tatLvutina/TDDP_lab
 //int skipCounter = 4;
 private void timer1_Tick(object sender, EventArgs e)
 {
     if (remoteObj != null)
     {
         string tempStr = remoteObj.GetMsgFromSvr(item);
         if (tempStr.Trim().Length > 0)
         {
             item++;
         }
         ArrayList onlineUser = remoteObj.GetOnlineUser();
     }
 }
コード例 #7
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            if (remoteObj != null)
            {
                string tempStr = remoteObj.GetMsgFromSvr(key);
                if (tempStr.Trim().Length > 0)
                {
                    key++;
                }

                //if (skipCounter > 3)
                {
                    ArrayList onlineUser = remoteObj.GetOnlineUser();
                }
            }
        }
コード例 #8
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            if (remoteObj != null)
            {
                string tempStr = remoteObj.GetMsgFromSvr(key);
                if (tempStr.Trim().Length > 0)
                {
                    key++;
                    txtAllChat.Text = txtAllChat.Text + "\n" + tempStr;
                }


                {
                    ArrayList onlineUser = remoteObj.GetOnlineUser();
                    lstOnlineUser.DataSource = onlineUser;
                    skipCounter = 0;
                }
            }
        }