|
using System;
using System.Windows.Forms;
using DistributedCommand.Framework;
namespace DistributedCommand.Chat
{
/// <summary>
/// Send message to server
/// </summary>
[Serializable]
public class SendMessageCommand : UICommand, ICommand
{
public string From;
public string Message;
public SendMessageCommand(
string from,
string message)
{
this.From = from;
this.Message = message;
}
void ICommand.Execute()
{
base.UI.ChatHistoryTextBox.AppendText( this.From + " says:" + Environment.NewLine );
base.UI.ChatHistoryTextBox.AppendText( this.Message + Environment.NewLine );
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.