Example #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    = "Пожалуйста подождите, пока собеседник не войдет в диалог";
                        txtChatHere.Enabled = false;
                    }
                    else if (txtChatHere.Text == "Пожалуйста подождите, пока собеседник не войдет в диалог" && txtChatHere.Enabled == false)
                    {
                        txtChatHere.Text    = "";
                        txtChatHere.Enabled = true;
                    }
                }
                //else
                //  skipCounter++;
            }
        }
Example #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++;
            }
        }
Example #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;
                }

                //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++;
            }
        }
Example #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;
                }
                //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++;
            }
        }
Example #5
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();
                    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;
                    }
                }
            }
        }
Example #6
0
 private void timer1_Tick(object sender, EventArgs e)
 {
     if (remoteObj != null)
     {
         ArrayList onlineClients = remoteObj.GetOnlineUser();
         label3.Text         = onlineClients.Count.ToString();
         listBox1.DataSource = onlineClients;
     }
 }
Example #7
0
 //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();
     }
 }
        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();
                }
            }
        }
Example #9
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;
                }
            }
        }