Exemplo n.º 1
0
        /// <summary>
        ///     Helper method for sending message.
        /// </summary>
        private void SendMessage()
        {
            if (inputTextBox.Text.Length > 0)
            {
                // send FormattedUserMessage object to all channels
                var message = new FormattedUserMessage("{0} says {1}", uniqueInstanceName, inputTextBox.Text);

                if (channel1Check.Checked)
                {
                    broadcast.SendToChannel("BinaryChannel1", message);
                }
                if (channel2Check.Checked)
                {
                    broadcast.SendToChannel("BinaryChannel2", message);
                }
                inputTextBox.Text = "";
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// 	Helper method for sending message.
        /// </summary>
        private void SendMessage()
        {
            if (inputTextBox.Text.Length > 0)
            {
                // send FormattedUserMessage object to all channels
                var message = new FormattedUserMessage("{0} says {1}", uniqueInstanceName, inputTextBox.Text);

                if (channel1Check.Checked)
                {
                    broadcast.SendToChannel("BinaryChannel1", message);
                }
                if (channel2Check.Checked)
                {
                    broadcast.SendToChannel("BinaryChannel2", message);
                }
                inputTextBox.Text = "";
            }
        }