-
Notifications
You must be signed in to change notification settings - Fork 396
Expand file tree
/
Copy pathClassInstanceArrayNode.cs
More file actions
40 lines (33 loc) · 1019 Bytes
/
ClassInstanceArrayNode.cs
File metadata and controls
40 lines (33 loc) · 1019 Bytes
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
using System.Drawing;
using ReClassNET.Extensions;
using ReClassNET.UI;
namespace ReClassNET.Nodes
{
public class ClassInstanceArrayNode : BaseArrayNode
{
public override int MemorySize => InnerNode.MemorySize * Count;
public override bool PerformCycleCheck => true;
public override void GetUserInterfaceInfo(out string name, out Image icon)
{
name = "Class Instance Array";
icon = Properties.Resources.B16x16_Button_Array;
}
public override void Intialize()
{
InnerNode = ClassNode.Create();
InnerNode.Intialize();
}
public override Size Draw(ViewInfo view, int x, int y)
{
return Draw(view, x, y, "Array", HotSpotType.ChangeClassType);
}
protected override Size DrawChild(ViewInfo view, int x, int y)
{
var v = view.Clone();
v.Address = view.Address.Add(Offset) + InnerNode.MemorySize * CurrentIndex;
v.Memory = view.Memory.Clone();
v.Memory.Offset += Offset.ToInt32() + InnerNode.MemorySize * CurrentIndex;
return InnerNode.Draw(v, x, y);
}
}
}