-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEveInvWindow.cs
158 lines (138 loc) · 4.46 KB
/
EveInvWindow.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
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
using System;
using System.Collections.Generic;
using EVE.ISXEVE.Extensions;
using EVE.ISXEVE.Interfaces;
using LavishScriptAPI;
namespace EVE.ISXEVE
{
/// <summary>
/// Wrapper for the EveInvWindow datatype
/// </summary>
public class EveInvWindow : EVEWindow, IEveInvWindow
{
/// <summary>
/// Create a new EveInvWindow from an existing LSO
/// </summary>
/// <param name="copy"></param>
public EveInvWindow(LavishScriptObject copy) : base(copy)
{
}
private IEveInvChildWindow _activeChild;
/// <summary>
/// Get the active child window.
/// </summary>
public IEveInvChildWindow ActiveChild
{
get { return _activeChild ?? (_activeChild = new EveInvChildWindow(GetMember("ActiveChild"))); }
}
/// <summary>
/// Get a child window by ID.
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
public IEveInvChildWindow GetChildWindow(long id)
{
return new EveInvChildWindow(GetMember("ChildWindow", id.ToString()));
}
/// <summary>
/// Get a child window by name.
/// </summary>
/// <param name="name"></param>
/// <returns></returns>
public IEveInvChildWindow GetChildWindow(string name)
{
return new EveInvChildWindow(GetMember("ChildWindow", name));
}
/// <summary>
/// Get a child window by name and location.
/// </summary>
/// <param name="name"></param>
/// <param name="location"></param>
/// <returns></returns>
public IEveInvChildWindow GetChildWindow(string name, string location)
{
return new EveInvChildWindow(GetMember("ChildWindow", name, location));
}
/// <summary>
/// Get a child window by ID and Name.
/// </summary>
/// <param name="id"></param>
/// <param name="name"></param>
/// <returns></returns>
public IEveInvChildWindow GetChildWindow(long id, string name)
{
return new EveInvChildWindow(GetMember("ChildWindow", id.ToString(), name));
}
/// <summary>
/// Get a child window by ID, Name, and Location.
/// </summary>
/// <param name="id"></param>
/// <param name="name"></param>
/// <param name="location"></param>
/// <returns></returns>
public IEveInvChildWindow GetChildWindow(long id, string name, string location)
{
return new EveInvChildWindow(GetMember("ChildWindow", id.ToString(), name, location));
}
private List<IEveInvChildWindow> _children;
/// <summary>
/// Get the child windows of this EveInvWindow
/// </summary>
/// <returns></returns>
public List<IEveInvChildWindow> GetChildren()
{
return _children ?? (_children = Util.GetListFromMethod<IEveInvChildWindow>(this, "GetChildren", "eveinvchildwindow"));
}
#region Members
/// <summary>
/// The ID of the ship or other object that this window belongs to, i.e. EVEWindow[MyShipCargo].ItemID will be your ship ID
/// </summary>
public Int64 ItemID
{
get { return this.GetInt64("ItemID"); }
}
/// <summary>
/// The capacity of the container represented by this EVEWindow.
/// </summary>
public double Capacity
{
get { return this.GetDouble("Capacity"); }
}
/// <summary>
/// The used capacity of the container represented by this EVEWindow.
/// </summary>
public double UsedCapacity
{
get { return this.GetDouble("UsedCapacity"); }
}
/// <summary>
/// The used LocationFlag of the container represented by this EVEWindow.
/// </summary>
public string LocationFlag
{
get { return this.GetString("LocationFlag"); }
}
/// <summary>
/// The used LocationFlagID of the container represented by this EVEWindow.
/// </summary>
public int LocationFlagID
{
get { return this.GetInt("LocationFlagID"); }
}
/// <summary>
/// The used IsInRange of the container represented by this EVEWindow.
/// </summary>
public bool IsInRange
{
get { return this.GetBool("IsInRange"); }
}
/// <summary>
/// The used HasCapacity of the container represented by this EVEWindow.
/// </summary>
public bool HasCapacity
{
get { return this.GetBool("HasCapacity"); }
}
#endregion
}
}