forked from ReClassNET/ReClass.NET
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInt64Node.cs
More file actions
34 lines (29 loc) · 688 Bytes
/
Copy pathInt64Node.cs
File metadata and controls
34 lines (29 loc) · 688 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
using System.Drawing;
using ReClassNET.Memory;
using ReClassNET.UI;
namespace ReClassNET.Nodes
{
public class Int64Node : BaseNumericNode
{
public override int MemorySize => 8;
public override Size Draw(ViewInfo view, int x, int y)
{
return DrawNumeric(view, x, y, Icons.Signed, "Int64", ReadValueFromMemory(view.Memory).ToString());
}
public override void Update(HotSpot spot)
{
base.Update(spot);
if (spot.Id == 0)
{
if (long.TryParse(spot.Text, out var val))
{
spot.Memory.Process.WriteRemoteMemory(spot.Address, val);
}
}
}
public long ReadValueFromMemory(MemoryBuffer memory)
{
return memory.ReadInt64(Offset);
}
}
}