Esempio n. 1
0
        public void ttclient_OnVoiceActivation(bool bVoiceActive)
        {
            TreeNode node = GetUser(ttclient.GetMyUserID());

            if (node != null)
            {
                if (bVoiceActive || ttclient.Flags.HasFlag(ClientFlag.CLIENT_TX_VOICE))
                {
                    node.BackColor = Color.Green;
                }
                else
                {
                    node.BackColor = Color.Transparent;
                }
            }
        }
Esempio n. 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (newmsgTextBox.Text.Length == 0)
            {
                return;
            }

            TextMessage msg;

            msg.nChannelID     = 0;  //only applies to channel messages
            msg.nFromUserID    = ttclient.GetMyUserID();
            msg.szFromUsername = ""; //not required
            msg.nMsgType       = TextMsgType.MSGTYPE_USER;
            msg.nToUserID      = userid;
            msg.szMessage      = newmsgTextBox.Text;
            newmsgTextBox.Text = "";
            if (ttclient.DoTextMessage(msg) > 0)
            {
                NewMessage(msg);
            }
        }