Exemple #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 = "";
            }
        }
        /// <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 = "";
            }
        }