-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathEveChatWindow.cs
More file actions
56 lines (51 loc) · 1.52 KB
/
Copy pathEveChatWindow.cs
File metadata and controls
56 lines (51 loc) · 1.52 KB
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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace EveModel
{
public class EveChatWindow : EveWindow
{
List<EveCharacter> _members;
public List<EveCharacter> Members
{
get
{
if (_members == null)
{
_members = new List<EveCharacter>();
var channelId = this["channelID"];
var channels = Frame.Client.LSCService["channels"];
var channel = new EveObject(PyCall.PyDict_GetItem(channels.PointerToObject, channelId.PointerToObject), "channel", false);
var memberList = channel["memberList"];
foreach (var item in memberList.CallMethod("keys", new object[0]).GetList<EveObject>())
{
var newMember = new EveCharacter()
{
PointerToObject = memberList.CallMethod("__getitem__", new object[] { item }).PointerToObject
};
newMember.AllianceId = newMember["allianceID"].GetValueAs<int>();
newMember.CharacterId = newMember["charID"].GetValueAs<int>();
newMember.CorporationId = newMember["corpID"].GetValueAs<int>();
//newMember.Name = newMember["info"]["name"].GetValueAs<string>();
newMember.WarFactionId = newMember["warFactionID"].GetValueAs<int>();
_members.Add(newMember);
}
}
return _members;
}
}
public int MemberCount
{
get
{
return Members.Count;
}
}
public bool Chat(string message)
{
this["input"].CallMethod("SetValue", new object[] { message });
return this.CallMethod("InputKeyUp", new object[0],true).GetValueAs<bool>();
}
}
}