using System; using Woodpecker.Specialized.Text; namespace Woodpecker.Game.Messenger { /// /// Represents a sent text message for the in-game messenger. ('Console') /// public class messengerMessage { #region Properties /// /// The ID of this message. /// public int ID; /// /// The database ID of the user that sent this message. /// public int senderID; /// /// The System.DateTime object containing the date and time this message was sent on. /// public DateTime Sent; /// /// This message's sent datetime formatted as a string in the format dd-MM-yyyy HH:mm:ss. /// public string sentString { get { return this.Sent.ToString("dd-MM-yyyy HH:mm:ss"); } } /// /// The message body of this message. (actual text) /// public string Body; #endregion #region Methods /// /// Creates the messenger textmessage message of this string and returns it. /// public override string ToString() { fuseStringBuilder FSB = new fuseStringBuilder(); FSB.appendWired(this.ID); FSB.appendWired(this.senderID); FSB.appendClosedValue(this.sentString); FSB.appendClosedValue(this.Body); return FSB.ToString(); } #endregion } }