BusinessCats.WhisperWindow.InitCommands C# (CSharp) Method

InitCommands() protected method

protected InitCommands ( ) : void
return void
        protected void InitCommands()
        {
            SendMessageCmd = new CommandCat(() => {
                string text = tbMessage.Text;

                string cipherText = seriousBusiness.whisperCat.SendWhisper(conversation, participant, text);

                if (string.IsNullOrEmpty(cipherText))
                {
                    return;
                }

                TextBoxHelper.SetWatermark(tbMessage, "...");
                tbMessage.Text = "";

                AddWhisper(new Whisper(true, text, cipherText));
            });
        }