Ejemplo n.º 1
0
        private void buttonSend_Click(object sender, EventArgs e)
        {
            if (textBoxContent.Text == "")
            {
                return;
            }
            if ((FormMain.user.Type == User.USER_TEAM || FormMain.user.Type == User.USER_CAR) &&
                (checkBoxX1.Checked || checkBoxX3.Checked))
            {
                checkBoxX2.Checked = true;
            }
            String s = "";

            if (checkBoxX1.Checked)
            {
                s = Constant.C_CHAT_TO_ALL.ToString();
            }
            else if (checkBoxX2.Checked)
            {
                s = Constant.C_CHAT_TO_ADMIN.ToString();
            }
            else
            {
                s = Constant.C_CHAT_TO_USER.ToString();
            }
            FormMain.C_Chat(s + textBoxContent.Text);
            textBoxContent.Text = "";
        }