-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFollowerChatUser.cs
37 lines (31 loc) · 1.02 KB
/
FollowerChatUser.cs
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
using System.Collections.Generic;
using System.Drawing;
namespace ChatModule
{
public class FollowerChatUser : IChatUser
{
private SortedList<string, List<UserAccount>> accounts;
public Color FontColor { get; set; }
public IProfile Profile { get; set; }
public FollowerChatUser(string username)
{
accounts = new SortedList<string, List<UserAccount>>();
FontColor = Color.Black;
Profile = new Profile(username);
}
public void add(UserAccount account)
{
if (accounts.ContainsKey(account.SourceName))
accounts[account.SourceName].Add(account);
else
accounts.Add(account.SourceName, new List<UserAccount>() { account });
}
public IList<UserAccount> retrieve(IChatSource source)
{
if (accounts.ContainsKey(source.SourceName))
return accounts[source.SourceName];
else
return null;
}
}
}