public ChatReadMessageGump( Mobile sender, Mobile recipient, ChatMessage message ) : base( 10, 10 ) { _sender = sender; _message = message; _recipient = recipient; AddPage( 1 ); AddBackground( 0, 0, 400, 200, 9250 ); AddAlphaRegion( 15, 15, 368, 20 ); AddHtml( 15, 15, 368, 20, String.Format( "<basefont color='white'><center>Message from {0}</center></basefont>", sender.RawName ), false, false ); AddAlphaRegion( 15, 40, 368, 145 ); AddLabelCropped( 20, 40, 175, 20, ChatManager.GumpLabelHue, String.Format( "Name: {0}", sender.RawName ) ); AddLabelCropped( 20, 60, 175, 20, ChatManager.GumpLabelHue, String.Format( "Guild: {0}", (sender.Guild == null ? "N/A" : sender.Guild.Name) ) ); ChatInfo info = ChatManager.GetInfo( recipient ); bool isBuddy = info.BuddyList.Contains( sender ); bool isIgnore = info.IgnoreList.Contains( sender ); AddButton( 200, 40, (isBuddy ? 4020 : 4008), (isBuddy ? 4022 : 4010), 2, GumpButtonType.Reply, 0 ); AddLabel( 235, 40, ChatManager.GumpLabelHue, String.Format( "{0} buddy list", (isBuddy ? "Remove from" : "Add to") ) ); AddButton( 200, 60, (isIgnore ? 4020 : 4002), (isIgnore ? 4022 : 4004), 3, GumpButtonType.Reply, 0 ); AddLabel( 235, 60, ChatManager.GumpLabelHue, String.Format( "{0} ignore list", (isIgnore ? "Remove from" : "Add to") ) ); AddHtml( 20, 82, 357, 80, message.Message, false, true ); AddButton( 15, 165, 4014, 4016, 1, GumpButtonType.Reply, 0 ); AddLabel( 50, 167, ChatManager.GumpLabelHue, "Reply" ); }
public static void RemoveMessage( Mobile m, ChatMessage message ) { if( !_messageTable.ContainsKey( m ) ) return; if( _messageTable[m].Contains( message ) ) _messageTable[m].Remove( message ); }
public static void AddPendingMessage( Mobile m, ChatMessage message ) { if( !_messageTable.ContainsKey( m ) ) _messageTable.Add( m, new List<ChatMessage>() ); _messageTable[m].Add( message ); m.CloseGump( typeof( ChatMessageAlertGump ) ); m.SendGump( new ChatMessageAlertGump( (byte)_messageTable[m].Count ) ); }
public static string FormatTimestamp( ChatMessage message ) { return (message.Timestamp.ToString( "MMMM dd, yyyy | HH:mm" ) ); }
public MessageSentArgs( ChatMessage message ) { _msg = message; }