My favorites | Sign in
Project Logo
             
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;
using System.Diagnostics;

namespace BNSharp
{
/// <summary>
/// Specifies the contract for chat events that involve another user and communication.
/// </summary>
/// <param name="sender">The object that raised the event.</param>
/// <param name="e">The event arguments.</param>
public delegate void ChatMessageEventHandler(object sender, ChatMessageEventArgs e);

/// <summary>
/// Represents the event information associated with a chat event with a given user and communication.
/// </summary>
[DataContract]
[DebuggerDisplay("Type={EventType}, User={Username}, \"{Text}\"")]
public class ChatMessageEventArgs : ChatEventArgs
{
#region fields
[DataMember(Name = "Flags")]
private UserFlags m_flags;
[DataMember(Name = "Username")]
private string m_un;
[DataMember(Name = "Text")]
private string m_txt;
#endregion

/// <summary>
/// Creates a new instance of <see>ChatMessageEventArgs</see> with the given parameters.
/// </summary>
/// <param name="eventType">The type of event.</param>
/// <param name="flags">The other user's flags.</param>
/// <param name="username">The primarily involved user.</param>
/// <param name="text">The message.</param>
public ChatMessageEventArgs(ChatEventType eventType, UserFlags flags, string username, string text)
: base(eventType)
{
m_flags = flags;
m_un = username;
m_txt = text;
}

/// <summary>
/// Gets the flags of the user.
/// </summary>
public UserFlags Flags { get { return m_flags; } }

/// <summary>
/// Gets the name of the user who communicated.
/// </summary>
public string Username { get { return m_un; } }

/// <summary>
/// Gets the message.
/// </summary>
public string Text { get { return m_txt; } }
}
}
Show details Hide details

Change log

r41 by myndf...@valhallalegends.com on Mar 26, 2009   Diff
Updated BN# to approximately the features
I wanted for beta 3.
Go to: 
Project members, sign in to write a code review

Older revisions

r15 by myndf...@valhallalegends.com on Jul 25, 2008   Diff
Moved JinxBot.Plugins namespace to its
own project; fixed chat ping display;
enabled void view; finished converting
EventArgs data contracts; refactored
UserEventArgs to contain a ChatUser
...
r5 by myndf...@valhallalegends.com on Jul 10, 2008   Diff
Added new snippets.
Refactored the EventArgs classes to
support WCF DataContract-based
serialization.
Refactored the BattleNetClient to
...
r2 by myndf...@valhallalegends.com on Jul 09, 2008   Diff
Imported from my private SVN server.
All revisions of this file

File info

Size: 2177 bytes, 62 lines
Hosted by Google Code